1 /* SPDX-License-Identifier: GPL-2.0 */
2 #include <linux/linkage.h>
8 * vmx_vmenter - VM-Enter the current loaded VMCS
10 * %RFLAGS.ZF: !VMCS.LAUNCHED, i.e. controls VMLAUNCH vs. VMRESUME
13 * %RFLAGS.CF is set on VM-Fail Invalid
14 * %RFLAGS.ZF is set on VM-Fail Valid
15 * %RFLAGS.{CF,ZF} are cleared on VM-Success, i.e. VM-Exit
17 * Note that VMRESUME/VMLAUNCH fall-through and return directly if
18 * they VM-Fail, whereas a successful VM-Enter + VM-Exit will jump
22 /* EFLAGS.ZF is set if VMCS.LAUNCHED == 0 */
31 3: cmpb $0, kvm_rebooting
33 call kvm_spurious_fault
36 .pushsection .fixup, "ax"
46 * vmx_vmexit - Handle a VMX VM-Exit
49 * %RFLAGS.{CF,ZF} are cleared on VM-Success, i.e. VM-Exit
51 * This is vmx_vmenter's partner in crime. On a VM-Exit, control will jump
52 * here after hardware loads the host's state, i.e. this is the destination
53 * referred to by VMCS.HOST_RIP.