]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: inhibit APICv when KVM_GUESTDBG_BLOCKIRQ active
authorMaxim Levitsky <mlevitsk@redhat.com>
Mon, 8 Nov 2021 09:02:45 +0000 (11:02 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 11 Nov 2021 15:56:20 +0000 (10:56 -0500)
commit4fe180dc1b9a6e6755921eabdc0b228cad8da437
tree9b16f7a9608012029394ae21e5564c04461987f9
parent73fe032b8f9b321087f5f35f5425ceb4a56abb18
KVM: x86: inhibit APICv when KVM_GUESTDBG_BLOCKIRQ active

KVM_GUESTDBG_BLOCKIRQ relies on interrupts being injected using
standard kvm's inject_pending_event, and not via APICv/AVIC.

Since this is a debug feature, just inhibit APICv/AVIC while
KVM_GUESTDBG_BLOCKIRQ is in use on at least one vCPU.

Fixes: 997520b3b92d5 ("KVM: x86: implement KVM_GUESTDBG_BLOCKIRQ")
Reported-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Sean Christopherson <seanjc@google.com>
Tested-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20211108090245.166408-1-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/svm/avic.c
arch/x86/kvm/vmx/vmx.c
arch/x86/kvm/x86.c