Instruction set extensions that have been added to the x86instruction set in order to support hardware virtualization. These extensions provide instructions for entering and leaving a virtualized execution context and for loading virtual-machine control structures (VMCSs), which hold the state of the guest and host, along with fields which control processor behavior within the virtual machine.
Call to VM monitor from guest by causing a VMEXIT.
Guest
SKINIT EAX
0F 01 DE
Secure Init and Jump with Attestation. Initializes CPU to known state, designates a 64 Kbyte memory area specified by EAX as an SLB ("Secure Loader Block"), submits a copy of the memory area to the system TPM for validation using a digital signature, then jumps into the SLB.
Page Smash: expands a 2MB-page RMP entry into a corresponding set of contiguous 4KB-page RMP entries. The 2 MB page's system physical address is specified in the RAX register.
Write a new RMP entry. The system physical address of a page whose RMP entry is modified is specified in the RAX register. The RCX register provides the effective address of a 16-byte data structure which contains the new RMP state.
PVALIDATE
F2 0F 01 FF
Validate or rescind validation of a guest page's RMP entry. The guest virtual address is specified in the register operand rAX.[a]
Guest
RMPADJUST
F3 0F 01 FE
Adjust RMP permissions for a guest page. The guest virtual address is specified in the RAX register. The page size is specified in RCX[0]. The target VMPL (Virtual Machine Privilege Level) and its permissions are specified in the RDX register.
RMPQUERY
F3 0F 01 FD
Reads an RMP permission mask for a guest page. The guest virtual address is specified in the RAX register. The target VMPL is specified in RDX[7:0]. RMP permissions for the specified VMPL are returned in RDX[63:8] and the RCX register.
Read an RMP entry. The system physical address of the page whose RMP entry is to be read is specified in the RAX register. The RCX register provides the effective address of a 16-byte data structure that the RMP entry will be written to.
^ abcdeFor the rAX argument to the VMRUN, VMLOAD, VMSAVE, INVLPGA and PVALIDATE instructions, the choice of AX/EAX/RAX depends on address-size, which can be overridden with the 67h prefix.
^Support for AMD-V was added in stepping F of the AMD K8, and is not available on earlier steppings.
^ abThe VMRUN instruction will load only a limited subset of CPU state - VMLOAD should be run before VMRUN to load additional state. Similarly, #VMEXIT will store only a limited amount of guest state to the VMCB, and VMSAVE is needed to store additional state. For simple intercept conditions where the VMM doesn't need to make use of the state items handled by VMSAVE/VMLOAD, the VMM may improve performance by abstaining from performing VMSAVE/VMLOAD before re-entering the virtual machine with VMRUN.
^On CPUs that support VMLOAD/VMSAVE virtualization (Excavator and later), the VMLOAD and VMSAVE instructions can be executed in guest mode as well.
^On CPUs that support Virtual GIF (Excavator and later), the STGI and CLGI instructions can be executed in guest mode as well.
^VMGEXIT is executed as VMMCALL if not executed by a SEV-ES guest.
Write to specified field of current-VMCS. The reg argument specifies which field to write, and the r/m argument provides the data item to write to the field.
VMCALL
NP 0F 01 C1
Call to VM monitor from guest by causing a VMEXIT.
Invalidates EPT-derived entries in the TLBs and paging-structure caches. The reg argument specifies an invalidation type, the memory argument specifies a 128-bit descriptor.[f]
Invalidates entries in the TLBs and paging-structure caches based on VPID (Virtual Processor ID). The reg argument specifies an invalidation type, the memory argument specifies a 128-bit descriptor.[g]
Return to legacy VMX root operation from SEAM VMX root operation.
SEAMCALL
66 0F 01 CF
Call to SEAM VMX root operation from legacy VMX root operation.
VMM
TDCALL
66 0F 01 CC
Call to VM monitor from TD guest by causing a VMEXIT.
TD Guest
^Executing any of the VT-x VMM instructions while within the VM guest will cause a VMEXIT. If VMX operation has not been entered through VMXON, then all of the VT-x instructions (except VMXON) will cause #UD.
^ abcdThe m64 argument to VMPTRLD, VMPTRST, VMCLEAR and VMXON is a 64-bit physical address.
^The m64 argument to VMXON is the 64-bit physical address to a "VMXON region", which is a 4Kbyte region that must be 4 Kbyte aligned. This region may be used by the processor to support VMX operation in an implementation-dependent manner and should never be accessed by software until the processor has left VMX operation through the VMXOFF instruction.
^If "VMCS Shadowing" is enabled (available on Haswell and later), the VMREAD and VMWRITE instructions can be executed by the guest as well.
^The VMCALL instruction can be executed by the VMM as well – doing so will cause a special SMM VM exit.
^The invalidation types available for the reg argument of INVEPT are:
Value
Function
1
Single-context invalidation: invalidate all mappings associated with EPT-pointer in bits 63:0 of descriptor.
2
Global invalidation: invalidate all mappings associated with all EPT-pointers.
^The invalidation types available for the reg argument of INVVPID are:
Value
Function
0
Invalidate mapping for linear address and VPID specified in descriptor. (Unlike INVLPG, INVVPID will fail when used with non-canonical addresses.[4])
1
Invalidate all mappings for VPID specified in descriptor.
2
All-contexts invalidation: invalidate all mappings for all VPIDs except VPID 0.
3
Invalidate all mappings for VPID specified in descriptor, except global translations.
^The functions available for VMFUNC in the EAX register are:
EAX
Function
0
EPTP switching: switch extended page table pointer to one of up to 512 table pointers prepared in advance by the VM host. ECX specifies which one of the 512 pointers to use.
1-63
(Reserved, will cause VMEXIT)
≥64
Invalid, will cause #UD.
^The operations available for SEAMOPS in the RAX register are:
RAX
Operation
0 (CAPABILITIES)
Return bitmap of supported SEAMOPS leaves in RAX.
1 (SEAMREPORT)
Generate SEAMREPORT structure.
Any unsupported value in RAX will cause a #GP(0) exception.