]> 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)
commit9cad2bc1c9530a1242d447174ccdea7c65db40a8
tree3d6e697c59c09596eb6f371b53d09b3b66ac4ece
parentb62aa352ef78ce4e86826bf49c28cc066740780f
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