Suspend_VM

include vmm.inc

mov ebx, VM ; VM handle

VMMcall Suspend_VM

jc not_suspended ; carry flag set if virtual machine not suspended


The Suspend_VM service suspends the execution of a specified virtual machine. This service fails if the specified virtual machine either owns the critical section, or is the system virtual machine.

Parameters

VM

Specifies a handle identifying the virtual machine to suspend.

Return Value

The carry flag is clear if the virtual machine is suspended. Otherwise, the carry flag is set to indicate an error.

Comments

An error occurs if the virtual machine is in a critical section, or if the VM parameter specifies the system virtual machine.

This service increments the suspend count for the virtual machine. If the virtual machine was not already suspended, the system notifies virtual devices of the suspension by sending a VM_Suspend message to the control procedure for each virtual device. A virtual device must not refuse to suspend a virtual machine. If a virtual machine remains suspended, subsequent calls to Suspend_VM do not cause the VM_Suspend notification.

When a virtual machine is suspended, the system sets the VMStat_Suspended bit in the CB_VM_Status field of the virtual machine's control block. Although virtual devices may examine and modify the contents of the control block of a virtual machine, the virtual devices must not examine or modify any memory owned by a suspended virtual machine unless the virtual device previously locked that memory.

Uses

Flags

See Also

No_Fail_Resume_VM, Resume_VM