aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kvm/vmx.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 29f85ed5a329..a0a78f09b22d 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -9424,12 +9424,6 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
9424 | (1 << VCPU_EXREG_CR3)); 9424 | (1 << VCPU_EXREG_CR3));
9425 vcpu->arch.regs_dirty = 0; 9425 vcpu->arch.regs_dirty = 0;
9426 9426
9427 vmx->idt_vectoring_info = vmcs_read32(IDT_VECTORING_INFO_FIELD);
9428
9429 vmx->loaded_vmcs->launched = 1;
9430
9431 vmx->exit_reason = vmcs_read32(VM_EXIT_REASON);
9432
9433 /* 9427 /*
9434 * eager fpu is enabled if PKEY is supported and CR4 is switched 9428 * eager fpu is enabled if PKEY is supported and CR4 is switched
9435 * back on host, so it is safe to read guest PKRU from current 9429 * back on host, so it is safe to read guest PKRU from current
@@ -9451,6 +9445,14 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
9451 kvm_make_request(KVM_REQ_EVENT, vcpu); 9445 kvm_make_request(KVM_REQ_EVENT, vcpu);
9452 9446
9453 vmx->nested.nested_run_pending = 0; 9447 vmx->nested.nested_run_pending = 0;
9448 vmx->idt_vectoring_info = 0;
9449
9450 vmx->exit_reason = vmx->fail ? 0xdead : vmcs_read32(VM_EXIT_REASON);
9451 if (vmx->fail || (vmx->exit_reason & VMX_EXIT_REASONS_FAILED_VMENTRY))
9452 return;
9453
9454 vmx->loaded_vmcs->launched = 1;
9455 vmx->idt_vectoring_info = vmcs_read32(IDT_VECTORING_INFO_FIELD);
9454 9456
9455 vmx_complete_atomic_exit(vmx); 9457 vmx_complete_atomic_exit(vmx);
9456 vmx_recover_nmi_blocking(vmx); 9458 vmx_recover_nmi_blocking(vmx);