diff options
author | Jim Mattson <jmattson@google.com> | 2017-09-15 01:31:40 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-09-15 16:57:14 +0200 |
commit | 7881f96cac4d420c94e62a4e1eea243899a7052e (patch) | |
tree | 41da2f8bc91a70a1aba0aeb72243b2e99d8b7933 /arch/x86 | |
parent | kvm,mips: Fix potential swait_active() races (diff) | |
download | linux-7881f96cac4d420c94e62a4e1eea243899a7052e.tar.xz linux-7881f96cac4d420c94e62a4e1eea243899a7052e.zip |
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>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kvm/vmx.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 0b15b43ef45d..29f85ed5a329 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -11491,16 +11491,18 @@ static void nested_vmx_vmexit(struct kvm_vcpu *vcpu, u32 exit_reason, */ kvm_make_request(KVM_REQ_APIC_PAGE_RELOAD, vcpu); - /* - * Exiting from L2 to L1, we're now back to L1 which thinks it just - * finished a VMLAUNCH or VMRESUME instruction, so we need to set the - * success or failure flag accordingly. - */ if (unlikely(vmx->fail)) { + /* + * After an early L2 VM-entry failure, we're now back + * in L1 which thinks it just finished a VMLAUNCH or + * VMRESUME instruction, so we need to set the failure + * flag and the VM-instruction error field of the VMCS + * accordingly. + */ vmx->fail = 0; nested_vmx_failValid(vcpu, vm_inst_error); - } else - nested_vmx_succeed(vcpu); + } + if (enable_shadow_vmcs) vmx->nested.sync_shadow_vmcs = true; |