diff options
author | Jim Mattson <jmattson@google.com> | 2017-09-14 19:31:40 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-09-15 10:57:14 -0400 |
commit | 7881f96cac4d420c94e62a4e1eea243899a7052e (patch) | |
tree | 41da2f8bc91a70a1aba0aeb72243b2e99d8b7933 | |
parent | 4c0b4bc60f95de4741c89b41174760258343f091 (diff) |
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>
-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, | |||
11491 | */ | 11491 | */ |
11492 | kvm_make_request(KVM_REQ_APIC_PAGE_RELOAD, vcpu); | 11492 | kvm_make_request(KVM_REQ_APIC_PAGE_RELOAD, vcpu); |
11493 | 11493 | ||
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 | */ | ||
11499 | if (unlikely(vmx->fail)) { | 11494 | 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 | */ | ||
11500 | vmx->fail = 0; | 11502 | vmx->fail = 0; |
11501 | nested_vmx_failValid(vcpu, vm_inst_error); | 11503 | nested_vmx_failValid(vcpu, vm_inst_error); |
11502 | } else | 11504 | } |
11503 | nested_vmx_succeed(vcpu); | 11505 | |
11504 | if (enable_shadow_vmcs) | 11506 | if (enable_shadow_vmcs) |
11505 | vmx->nested.sync_shadow_vmcs = true; | 11507 | vmx->nested.sync_shadow_vmcs = true; |
11506 | 11508 | ||