]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: Check for in-kernel xAPIC when querying APICv for directed yield
authorSean Christopherson <seanjc@google.com>
Tue, 14 Jun 2022 23:05:46 +0000 (23:05 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 20 Jun 2022 10:21:23 +0000 (06:21 -0400)
commit1759bd9893fafcabfa74598442254d6b4b3d7a3f
tree01602dc57628dab99ad2a6f5623ef19355c9affc
parent8273d12444c8afcd113cacb070e2099b6be5e8de
KVM: x86: Check for in-kernel xAPIC when querying APICv for directed yield

Use kvm_vcpu_apicv_active() to check if APICv is active when seeing if a
vCPU is a candidate for directed yield due to a pending ACPIv interrupt.
This will allow moving apicv_active into kvm_lapic without introducing a
potential NULL pointer deref (kvm_vcpu_apicv_active() effectively adds a
pre-check on the vCPU having an in-kernel APIC).

No functional change intended.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20220614230548.3852141-4-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c