Skip to content

Commit 7881f96

Browse files
jsmattsonjrbonzini
authored andcommitted
kvm: nVMX: Remove nested_vmx_succeed after successful VM-entry
After a successful VM-entry, RFLAGS is cleared, with the exception of bit 1, which is always set. This is handled by load_vmcs12_host_state. Signed-off-by: Jim Mattson <jmattson@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent 4c0b4bc commit 7881f96

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

arch/x86/kvm/vmx.c

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11491,16 +11491,18 @@ static void nested_vmx_vmexit(struct kvm_vcpu *vcpu, u32 exit_reason,
1149111491
*/
1149211492
kvm_make_request(KVM_REQ_APIC_PAGE_RELOAD, vcpu);
1149311493

11494-
/*
11495-
* Exiting from L2 to L1, we're now back to L1 which thinks it just
11496-
* finished a VMLAUNCH or VMRESUME instruction, so we need to set the
11497-
* success or failure flag accordingly.
11498-
*/
1149911494
if (unlikely(vmx->fail)) {
11495+
/*
11496+
* After an early L2 VM-entry failure, we're now back
11497+
* in L1 which thinks it just finished a VMLAUNCH or
11498+
* VMRESUME instruction, so we need to set the failure
11499+
* flag and the VM-instruction error field of the VMCS
11500+
* accordingly.
11501+
*/
1150011502
vmx->fail = 0;
1150111503
nested_vmx_failValid(vcpu, vm_inst_error);
11502-
} else
11503-
nested_vmx_succeed(vcpu);
11504+
}
11505+
1150411506
if (enable_shadow_vmcs)
1150511507
vmx->nested.sync_shadow_vmcs = true;
1150611508

0 commit comments

Comments
 (0)