_SetResetV86Pageable


include vmm.inc

VMMcall _SetResetV86Pageable, <VM, VMLinPgNum, nPages, flags>

or      eax, eax    ; nonzero if set or reset, zero if error
jz      error

Modifies the locking and unlocking behavior associated with a specific range of V86 memory. Uses EAX, ECX, EDX, and Flags.

VM

Handle of the virtual machine for which the behavior is modified.

VMLinPgNum

Linear page number of the first page in 1 megabyte V86 address space to modify. This parameter must not be below the page number for the first V86 page, or above 100h.

nPages

Number of pages to modify.

flags

Operation flags. Can be one of these values:

Value

Meaning

PageClearV86IntsLocked

Disables locking of all V86 memory that cannot be paged regardless of whether the virtual page swap device uses MS-DOS or BIOS functions.

PageClearV86Pageable

Enables normal locking behavior.

PageSetV86IntsLocked

Enables locking of all V86 memory that cannot be paged regardless of whether the virtual page swap device uses MS-DOS or BIOS functions.

PageSetV86Pageable

Disables normal locking behavior of _MapIntoV86 and allows V86 memory to be paged.


All other values are reserved.

This service is intended to be used to support protected-mode applications running in a virtual machine. Virtual devices must not use this service for any other purpose.

This service returns an error if the VMStat_PageableV86 or VMStat_V86IntsLocked state is inconsistent with the specified PageSetV86Pageable, PageClearV86Pageable, PageSetV86IntsLocked, or PageClearV86IntsLocked values.

This service returns an error if the PageClearV86Pageable or PageSetV86IntsLocked values are given, but the service cannot lock the specified memory.

The V86MMGR device uses the PageSetV86IntsLocked value for virtual machines which are created with their base memory specified as locked.

Virtual device should avoid manipulating the locking and unlocking behavior of regions above page 0A0h. A virtual device should not modify these pages unless it owns a global or local region set by the _Assign_Device_V86_Pages service.

If the PageSetV86IntsLocked or PageClearV86IntsLocked value is given, the service applies the modification to every page that that cannot be paged. For this reason the VMLinPgNum and nPages parameters should be set to zero.

By default, the _MapIntoV86 service locks the memory it maps. For a virtual machine running a protected-mode application, it is desirable change this default behavior.

See also _Assign_Device_V86_Pages