🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms.programmer
Article #991

DDK question: Simulate_Call to not-present segment

#991
From: Ed Schwalenberg
Date: Tue, 01 Jan 1991 17:03
24 lines
1565 bytes
I'm writing a virtual device for a 386-enhanced mode program using the 3.0 DDK.
Sometimes this virtual device (running in ring 0) needs to cause the System VM
(running in ring 1) to execute arbitrary Windows code; I do this by using
the Simulate_Call family of services.  It mostly works.

Sometimes the routine I'm calling is in a segment that is not present at the
time I call it, typically because nobody has called anything in that segment
since Windows was booted or Windows has discarded the segment.  If this
happens, the IRETD instruction that returns control to the System VM faults,
and the VMM doesn't know what to do and crashes Windows.  (If an ordinary
ring-1 CALL instruction faults, Windows traps the fault, loads the segment
and reexecutes the instruction, but it appears that there is no corresponding
handler for ring-0 faults.)

I can get around this problem by using Simulate_Call to call a special, fixed,
nondiscardable segment which then calls the desired routine, but this seems
to be a kludgy fix for an outright bug.

Anybody else been bit by this?
Is it a bug?  Has it been fixed?  How can I get the fix?
Is there a better workaround?
Or am I just daft?

Happy New Year.
Technical Details
Message-ID: <1991Jan1.170327.26117@odi.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!wuarchive!uunet!odi!ed

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!wuarchive!uunet!odi!ed
From: ed@odi.com (Ed Schwalenberg)
Newsgroups: comp.windows.ms.programmer
Subject: DDK question: Simulate_Call to not-present segment
Message-ID: <1991Jan1.170327.26117@odi.com>
Date: 1 Jan 91 17:03:27 GMT
Organization: Object Design, Inc.
Lines: 24