]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: VMX: prepare sync_pir_to_irr for running with APICv disabled
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 23 Nov 2021 00:43:09 +0000 (19:43 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 30 Nov 2021 08:51:58 +0000 (03:51 -0500)
commit75b1a34443959831a5562c30179e16e2254e9fef
tree3d6e697c59c09596eb6f371b53d09b3b66ac4ece
parent16224f5b043f458fc0de98dc81f913cde79ba50f
KVM: VMX: prepare sync_pir_to_irr for running with APICv disabled

If APICv is disabled for this vCPU, assigned devices may still attempt to
post interrupts.  In that case, we need to cancel the vmentry and deliver
the interrupt with KVM_REQ_EVENT.  Extend the existing code that handles
injection of L1 interrupts into L2 to cover this case as well.

vmx_hwapic_irr_update is only called when APICv is active so it would be
confusing to add a check for vcpu->arch.apicv_active in there.  Instead,
just use vmx_set_rvi directly in vmx_sync_pir_to_irr.

Cc: stable@vger.kernel.org
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: David Matlack <dmatlack@google.com>
Reviewed-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20211123004311.2954158-3-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/vmx.c