include vmm.inc mov eax, Flags ; status flags mov ebx, VM ; VM handle mov ecx, Foreground ; foreground priority mov edx, Background ; background priority VMMcall Set_Time_Slice_Priority |
The Set_Time_Slice_Priority service sets the time-slice execution flags, and the foreground and background priorities for a specified virtual machine.
Flags
Specifies status flags for the CB_VM_Status field in the virtual machine's control block. It can be one of the following values:
Value | Meaning |
VMStat_Background | Background execution |
VMStat_Exclusive | Exclusive execution |
VMStat_High_Pri_Back | High-priority background execution |
VM
Specifies a handle identifying the virtual machine to change.
Foreground
Specifies the foreground time-slice priority. The high word must be 0.
Background
Specifies the background time-slice priority. The high word must be 0.
The carry flag is clear if the service successfully sets the time-slice priority. Otherwise, the carry flag is set.
To change the time-slice priority, a virtual should retrieve the current time-slice priority using the Get_Time_Slice_Priority service, modify the returned values, and use the modified values as input parameters to this service.
The following example assigns a virtual machine to the background:
mov ebx, [VM]
VMMcall Get_Time_Slice_Priority
or eax, VMStat_Background
VMMcall Set_Time_Slice_Priority
Flags