Introduction to Virtual Device Drivers


Virtual Machine Handle, Control Block, and Client Registers



Download 274.5 Kb.
Page7/80
Date19.01.2022
Size274.5 Kb.
#58083
1   2   3   4   5   6   7   8   9   10   ...   80
VXDS

Virtual Machine Handle, Control Block, and Client Registers


Every virtual machine has a virtual machine handle and control block. The handle, created by the VMM when it creates the virtual machine, uniquely identifies the virtual machine. The VMM and virtual devices use the handle when calling services to specify for which virtual machine to carry out the action.

The handle is actually the 32-bit linear address of the virtual machine's control block. The control block is a structure that contains data used by the VMM and virtual devices to manage the virtual machine. The control block specifies the virtual machine status, such as whether the virtual machine is being created or destroyed, is running or suspended, and is in V86 mode or protected mode. The control block also specifies the virtual machine's handle, identifier, high linear address, and address of the virtual machine client registers. Virtual devices add device-specific data to the control block by allocating space in the control block with the _Allocate_Device_CB_Area service. A virtual device typically keeps information about the state of the physical hardware in this block.

Every virtual machine has its own set of client registers. These registers specify the current state of the processor registers for the application running in the virtual machine. Saved on the ring 0 stack when the VMM receives control from an application, the client registers can be examined and modified by virtual devices. The address of the client registers is specified in the CB_Client_Ptr field of the control block. This address is also frequently passed to virtual device procedures in the EBP register. A virtual device uses this address and the fields of the Client_Reg_Struc structure to access the individual registers.

The high linear address of a virtual machine, specified by the CB_High_Linear field in the control block, is an alternate address for the physical memory containing the application and supporting software in the virtual machine. A virtual machine's physical memory is mapped to the low 1 megabyte of the linear address space only when the virtual machine is running. The VMM and virtual devices use the high linear address to examine and modify the physical memory when the virtual machine is not running.



Download 274.5 Kb.

Share with your friends:
1   2   3   4   5   6   7   8   9   10   ...   80




The database is protected by copyright ©ininet.org 2024
send message

    Main page