Virtual Devices (3.1) (vdag31qh.hlp) (Table of Contents; Topic list)
VDMAD_Virtualize_Channel
                                                     Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
include vdmad.inc
 
VxDcall VDMAD_Virtualize_Channel
 
The VDMAD_Virtualize_Channel service allows another virtual device to claim
ownership of a standard DMA channel. The new owner registers a callback
procedure that is called whenever the virtual state of the channel is
changed as a result of I/O done in a virtual machine.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
EAX        Specifies the channel number.
 
ESI        Specifies the callback procedure. If this parameter is zero, no
           callback procedure is called. See the Comments section for more
           information about the procedure.
 
Return Value
 
The carry flag is clear and the EAX register contains the DMA handle if the
service is successful. Otherwise, the carry flag is set if channel is
already owned.
 
Uses
 
EAX, EDX, Flags
 
Comments
 
The system calls the callback procedure by passing it the following input
parameters:
 
EAX     ; DMA handle
EBX     ; virtual machine handle
 
The procedure can modify EAX, EBX, ECX, EDX, ESI, EDI, and Flags.
 
In some cases a virtual device does not allow a virtual machine to perform
DMA to a channel. Instead, the virtual device handles programming based on a
private API and not on virtualized hardware I/O. This means it is possible
to pass a zero to specify no callback procedure. VDMAD continues to trap the
I/O for the channel, but never changes the physical state of the channel as
a result of any virtual machine I/O.
 
                                      ♦