include vmm.inc
VMMCall _TestGlobalV86Mem, <VMLinAddr, nBytes, flags>
mov [Result], eax ; 0 if local, 1 if global, 2 if mixed,
; 3 if includes instance data region
Tests whether a V86 address range is global, local, or instanced. Uses EAX, ECX, EDX, and Flags.
0 | Address range either contains local memory, or is not a valid V86 address range. |
1 | Address range contains global memory. |
2 | Address range contains both local and global memory. |
3 | Address range contains global memory, but also includes an instance data region. |
Global V86 memory has addresses that are valid and identical in all virtual machines. Local memory has addresses that are only valid in one virtual machine. Instanced memory has addresses that are valid in all virtual machines, but the content of the memory varies with each virtual machine.
This service may incorrectly report the type of memory in addresses above page 0A0h (in the device adapter area). If this service returns global for memory in this area, it is global. If the service returns local, however, the memory may actually be global. Generally, this region is local.
Operations involving global address ranges typically do not need to be virtualized since the range is valid and addressable in all virtual machines. Operations involving local address ranges may have to be virtualized since it is possible for software, such as an interrupt handler, to use a local address in the wrong virtual machine.