include vtd.inc
mov ebx, VMHandle
VxDcall VTD_Disable_Trapping
Forces the VTD to stop I/O trapping on the timer ports for a specified virtual machine. The VTD_Enable_Trapping service must be called once for every call made to this service. Uses Flags.
It is sometimes necessary to temporarily disable I/O trapping for virtual machine code that reads the timer in extremely tight timing loops. A good example is the hard drive BIOS code that reads the ports hundreds of times per disk transfer. The overhead of servicing the I/O traps would cause disk performance to slow significantly.
If this service is called n times, then VTD_Enable_Trapping must also be called n times before trapping is re-enabled. This allows nested calls to this service by more than one virtual device.