_Simulate_VM_IO

include vmm.inc

mov     edx, PortID
mov     ecx, IOType
mov     eax, OutputData
VMMCall _Simulate_VM_IO
mov     [InputData], eax
 

Simulates ring 3 port I/O from a VxD.

PortID
Identifies the port for which input or output is simulated.
IOType
Specifies the type of I/O. It can be one of the following values:
Value Meaning
Byte_Input Inputs a single byte.
Byte_Output Outputs a single byte.
Dword_Input Inputs a doubleword.
Dword_Output Outputs a doubleword.
Word_Input Inputs a word.
Word_Output Outputs a word.

OutputData
The data to be output. (This parameter is only used if the service is called to simulate output.)

This service is called to simulate ring 3 port I/O from a (ring 0) VxD executing in the current VM. It is useful for VxDs that need to alter the state of other VxDs. For example, a VxD could perform a simulated EOI by calling this procedure with:

mov     al, 20h
mov     edx, 20h
mov     ecx, Byte_Output
VMMCall Simulate_VM_IO
 

Which is the same as a ring 3 VM executing:

mov     al, 20h
out         20h, al