]> git.baikalelectronics.ru Git - kernel.git/commitdiff
KVM: VMX: Don't freeze guest when event delivery causes an APIC-access exit
authorWanpeng Li <wanpengli@tencent.com>
Wed, 19 Aug 2020 08:55:27 +0000 (16:55 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 12 Sep 2020 06:21:17 +0000 (02:21 -0400)
According to SDM 27.2.4, Event delivery causes an APIC-access VM exit.
Don't report internal error and freeze guest when event delivery causes
an APIC-access exit, it is handleable and the event will be re-injected
during the next vmentry.

Signed-off-by: Wanpeng Li <wanpengli@tencent.com>
Message-Id: <1597827327-25055-2-git-send-email-wanpengli@tencent.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/vmx.c

index 19a599bebd5cf3878b3bda77187a98bf03f46e36..75cd720c9e8c35a70cef216766a4ba6250b6149e 100644 (file)
@@ -6054,6 +6054,7 @@ static int vmx_handle_exit(struct kvm_vcpu *vcpu, fastpath_t exit_fastpath)
                        (exit_reason != EXIT_REASON_EXCEPTION_NMI &&
                        exit_reason != EXIT_REASON_EPT_VIOLATION &&
                        exit_reason != EXIT_REASON_PML_FULL &&
+                       exit_reason != EXIT_REASON_APIC_ACCESS &&
                        exit_reason != EXIT_REASON_TASK_SWITCH)) {
                vcpu->run->exit_reason = KVM_EXIT_INTERNAL_ERROR;
                vcpu->run->internal.suberror = KVM_INTERNAL_ERROR_DELIVERY_EV;