|
L4Re - L4 Runtime Environment
|
Virtual machine API for VMX. More...
Collaboration diagram for VM API for VMX:Functions | |
| l4_uint64_t | l4_vm_vmx_get_caps (void const *vcpu_state, unsigned cap_msr) L4_NOTHROW |
| Get a capability register for VMX. More... | |
| l4_uint32_t | l4_vm_vmx_get_caps_default1 (void const *vcpu_state, unsigned cap_msr) L4_NOTHROW |
| Get a default to one capability register for VMX. More... | |
| unsigned | l4_vm_vmx_field_len (unsigned field) L4_NOTHROW |
| Return length in bytes of a VMCS field. More... | |
| unsigned | l4_vm_vmx_field_order (unsigned field) L4_NOTHROW |
| Return length in power of two (bytes) of a VMCS field. More... | |
| void | l4_vm_vmx_clear (void *vmcs, void *user_vmcs) L4_NOTHROW |
| Saves cached state from the kernel VMCS to the user VMCS. More... | |
| void | l4_vm_vmx_ptr_load (void *vmcs, void *user_vmcs) L4_NOTHROW |
| Loads the user_vmcs as the current VMCS. More... | |
| l4_uint32_t | l4_vm_vmx_get_cr2_index (void const *vmcs) L4_NOTHROW |
| Get the VMCS field index of the virtual CR2 register. More... | |
| l4_umword_t | l4_vm_vmx_read_nat (void *vmcs, unsigned field) L4_NOTHROW |
| Read a natural width VMCS field. More... | |
| l4_uint16_t | l4_vm_vmx_read_16 (void *vmcs, unsigned field) L4_NOTHROW |
| Read a 16bit VMCS field. More... | |
| l4_uint32_t | l4_vm_vmx_read_32 (void *vmcs, unsigned field) L4_NOTHROW |
| Read a 32bit VMCS field. More... | |
| l4_uint64_t | l4_vm_vmx_read_64 (void *vmcs, unsigned field) L4_NOTHROW |
| Read a 64bit VMCS field. More... | |
| l4_uint64_t | l4_vm_vmx_read (void *vmcs, unsigned field) L4_NOTHROW |
| Read any VMCS field. More... | |
| void | l4_vm_vmx_write_nat (void *vmcs, unsigned field, l4_umword_t val) L4_NOTHROW |
| Write to a natural width VMCS field. More... | |
| void | l4_vm_vmx_write_16 (void *vmcs, unsigned field, l4_uint16_t val) L4_NOTHROW |
| Write to a 16bit VMCS field. More... | |
| void | l4_vm_vmx_write_32 (void *vmcs, unsigned field, l4_uint32_t val) L4_NOTHROW |
| Write to a 32bit VMCS field. More... | |
| void | l4_vm_vmx_write_64 (void *vmcs, unsigned field, l4_uint64_t val) L4_NOTHROW |
| Write to a 64bit VMCS field. More... | |
| void | l4_vm_vmx_write (void *vmcs, unsigned field, l4_uint64_t val) L4_NOTHROW |
| Write to an arbitrary VMCS field. More... | |
Virtual machine API for VMX.
| anonymous enum |
Additional (virtual) VMCS fields.
The VMCS offsets defined here are actually not in the hardware VMCS. However our VMMs run in user mode and need to have access to certain registers available in kernel mode only. So we put them into our version of the VMCS.
| Enumerator | |
|---|---|
| L4_VM_VMX_VMCS_CR2 | VMCS offset for CR2.
|
| L4_VM_VMX_VMCS_XCR0 | VMCS offset of extended control register XCR0. |
| L4_VM_VMX_VMCS_MSR_SYSCALL_MASK | VMCS offset of system call flag mask MSR. |
| L4_VM_VMX_VMCS_MSR_LSTAR | VMCS offset of IA32e mode system call target address MSR. |
| L4_VM_VMX_VMCS_MSR_CSTAR | VMCS offset of IA32 mode system call target address MSR. |
| L4_VM_VMX_VMCS_MSR_TSC_AUX | VMCS offset of auxiliary TSC signature MSR. |
| L4_VM_VMX_VMCS_MSR_STAR | VMCS offset of system call target address MSR. |
| L4_VM_VMX_VMCS_MSR_KERNEL_GS_BASE | VMCS offset of GS base address swap target MSR. |
Definition at line 105 of file __vm-vmx.h.
| enum L4_vm_vmx_caps_regs |
Exported VMX capability registers.
Definition at line 39 of file __vm-vmx.h.
| enum L4_vm_vmx_dfl1_regs |
Exported VMX capability registers (default to 1 bits).
Definition at line 62 of file __vm-vmx.h.
|
inline |
Saves cached state from the kernel VMCS to the user VMCS.
| vmcs | Pointer to the kernel VMCS. |
| user_vmcs | Pointer to the user VMCS. |
This function is comparable to VMX vmclear.
Definition at line 433 of file __vm-vmx.h.
Referenced by l4_vm_vmx_ptr_load().
Here is the caller graph for this function:
|
inline |
Return length in bytes of a VMCS field.
| field | Field number. |
Definition at line 357 of file __vm-vmx.h.
References L4_NOTHROW, and l4_vm_vmx_field_order().
Here is the call graph for this function:
|
inline |
Return length in power of two (bytes) of a VMCS field.
| field | Field number. |
Definition at line 342 of file __vm-vmx.h.
Referenced by l4_vm_vmx_field_len().
Here is the caller graph for this function:
|
inline |
Get a capability register for VMX.
| vcpu_state | Pointer to the VCPU state of the VCPU. |
| cap_msr | Caps register index (see L4_vm_vmx_caps_regs). |
Definition at line 529 of file __vm-vmx.h.
References L4_VCPU_OFFSET_EXT_INFOS.
|
inline |
Get a default to one capability register for VMX.
| vcpu_state | Pointer to the VCPU state of the VCPU. |
| cap_msr | Default 1 caps register index (see L4_vm_vmx_dfl1_regs). |
Definition at line 537 of file __vm-vmx.h.
References L4_VCPU_OFFSET_EXT_INFOS, L4_VM_VMX_NUM_CAPS_REGS, and L4_VM_VMX_PINBASED_CTLS_DFL1_REG.
|
inline |
Get the VMCS field index of the virtual CR2 register.
| vmcs | Pointer to the software VMCS. |
The CR2 register is actually not in the hardware VMCS, however our VMMs run in user mode and need to have access to this register so we put it into our software version of the VMCS.
Definition at line 545 of file __vm-vmx.h.
|
inline |
Loads the user_vmcs as the current VMCS.
| vmcs | Pointer to the kernel VMCS. |
| user_vmcs | Pointer to the user VMCS. |
This function is comparable to VMX vmptrld.
Definition at line 445 of file __vm-vmx.h.
References l4_vm_vmx_clear().
Here is the call graph for this function:
|
inline |
Read any VMCS field.
| vmcs | Pointer to the software VMCS. |
| field | The VMCS field index as used on VMX hardware. |
Definition at line 481 of file __vm-vmx.h.
References l4_vm_vmx_read_16(), l4_vm_vmx_read_32(), l4_vm_vmx_read_64(), and l4_vm_vmx_read_nat().
Here is the call graph for this function:
|
inline |
Read a 16bit VMCS field.
| vmcs | Pointer to the software VMCS. |
| field | The VMCS field index as used on VMX hardware. |
Definition at line 466 of file __vm-vmx.h.
Referenced by l4_vm_vmx_read().
Here is the caller graph for this function:
|
inline |
Read a 32bit VMCS field.
| vmcs | Pointer to the software VMCS. |
| field | The VMCS field index as used on VMX hardware. |
Definition at line 471 of file __vm-vmx.h.
Referenced by l4_vm_vmx_read().
Here is the caller graph for this function:
|
inline |
Read a 64bit VMCS field.
| vmcs | Pointer to the software VMCS. |
| field | The VMCS field index as used on VMX hardware. |
Definition at line 476 of file __vm-vmx.h.
Referenced by l4_vm_vmx_read().
Here is the caller graph for this function:
|
inline |
Read a natural width VMCS field.
| vmcs | Pointer to the software VMCS. |
| field | The VMCS field index as used on VMX hardware. |
Definition at line 461 of file __vm-vmx.h.
Referenced by l4_vm_vmx_read().
Here is the caller graph for this function:
|
inline |
Write to an arbitrary VMCS field.
| vmcs | Pointer to the software VMCS. |
| field | The VMCS field index as used on VMX hardware. |
| val | The value that shall be written to the given field. |
Definition at line 516 of file __vm-vmx.h.
References l4_vm_vmx_write_16(), l4_vm_vmx_write_32(), l4_vm_vmx_write_64(), and l4_vm_vmx_write_nat().
Here is the call graph for this function:
|
inline |
Write to a 16bit VMCS field.
| vmcs | Pointer to the software VMCS. |
| field | The VMCS field index as used on VMX hardware. |
| val | The value that shall be written to the given field. |
Definition at line 500 of file __vm-vmx.h.
Referenced by l4_vm_vmx_write().
Here is the caller graph for this function:
|
inline |
Write to a 32bit VMCS field.
| vmcs | Pointer to the software VMCS. |
| field | The VMCS field index as used on VMX hardware. |
| val | The value that shall be written to the given field. |
Definition at line 505 of file __vm-vmx.h.
Referenced by l4_vm_vmx_write().
Here is the caller graph for this function:
|
inline |
Write to a 64bit VMCS field.
| vmcs | Pointer to the software VMCS. |
| field | The VMCS field index as used on VMX hardware. |
| val | The value that shall be written to the given field. |
Definition at line 510 of file __vm-vmx.h.
Referenced by l4_vm_vmx_write().
Here is the caller graph for this function:
|
inline |
Write to a natural width VMCS field.
| vmcs | Pointer to the software VMCS. |
| field | The VMCS field index as used on VMX hardware. |
| val | The value that shall be written to the given field. |
Definition at line 495 of file __vm-vmx.h.
Referenced by l4_vm_vmx_write().
Here is the caller graph for this function: