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 carried out in a virtual machine.
EAX
Specifies the channel number.
ESI
Specifies the callback procedure. If this parameter is zero, no callback procedure is called. For more information about the callback procedure, see the following “Comments” section.
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.
EAX, EDX, Flags
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.