Intel Privileged and Sensitive Instructions (114473)
The information in this article applies to:
- Microsoft Windows Software Development Kit (SDK) 3.1
This article was previously published under Q114473 SUMMARY
The Intel architecture defines "privileged" instructions and "sensitive"
instructions. The privileged instructions may only be executed when the
Current Privilege Level is zero (CPL = 0). Attempting to execute a
privileged instruction when CPL != 0 will generate a general protection
(GP) exception. Windows traps GP exceptions caused by executing
privileged instructions and usually generates an application error.
The sensitive instructions (also called IOPL-sensitive) may only be
executed when CPL <= IOPL (I/O Privilege Level). Attempting to execute a
sensitive instruction when CPL > IOPL will generate a GP exception. This
should usually not cause a fatal error. The Windows Virtual Machine
Manager (VMM) traps GP exceptions caused by executing sensitive
instructions and (depending on the instruction) either simulates the
instruction's behavior in the VM in which the instruction was executed,
or dispaches it to a virtual device driver, which simulates the
instruction's behavior.
The Virtual Machine Manager (VMM), which is in WIN386 along with the
core Virtual Device Drivers (VxDs), runs at CPL = 0. By Intel hardware
definition, Virtual 8086 (V86) mode always runs at CPL = 3. In enhanced
mode, the machine can be either in IOPL = 0 or IOPL = 3.
REFERENCES
For additional information, please see the following article(s) in the
Microsoft Knowledge Base:
100947 Port Trapping in Windows 3.0/3.1
112298 DOCERR: Port I/O with inp() and outp() Fails on Windows NT
Also see the Intel "i486(TM) Microprocessor Programmer's Reference Manual"
and the section "The Effect of Priviledge Levels" in the article "The Tao
of Interrupts" on the Microsoft Developer Network (MSDN) Development
Library CD.
Modification Type: | Major | Last Reviewed: | 2/1/2002 |
---|
Keywords: | kb16bitonly KB114473 |
---|
|