[vz7.62] kvm:x86:lapic: undo RH's breaking hyperv synic auto_eoi

Submitted by Roman Kagan on July 10, 2018, 6:56 a.m.


Message ID 20180710065603.8256-1-rkagan@virtuozzo.com
State New
Series "kvm:x86:lapic: undo RH's breaking hyperv synic auto_eoi"
Headers show

Commit Message

Roman Kagan July 10, 2018, 6:56 a.m.
RedHat has backported mainline

  commit 4d82d12b39132e820b9ac4aa058ccc733db98917
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   Sun Dec 18 21:43:41 2016 +0100

      KVM: lapic: do not scan IRR when delivering an interrupt

      On interrupt delivery the PPR can only grow (except for auto-EOI),
      so it is impossible that non-auto-EOI interrupt delivery results
      in KVM_REQ_EVENT.  We can therefore use __apic_update_ppr.

      Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

However, they added a small change, documented in brackets as

  [RHEL: no auto_eoi_bitmap because there's no Hyper-V synthetic
   interrupts support]

What this little change did was to *silently* break Hyper-V synthetic
interrupts with AutoEOI *only*, making our vmbus-enabled VMs to hang
early at boot.  (If they really wanted to disable Hyper-V SynIC they
just needed a one-liner to drop the corresponding capability from the
list of supported ones.)

For details see (RHEL subscription required)

Undo this breakage.

VZ-Bug: #PSBM-86431
Signed-off-by: Roman Kagan <rkagan@virtuozzo.com>
 arch/x86/kvm/lapic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index ba5a841e1d98..3058ba9ed4a9 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -2167,7 +2167,7 @@  int kvm_get_apic_interrupt(struct kvm_vcpu *vcpu)
 	apic_clear_irr(vector, apic);
-	if (0 /* test_bit(vector, vcpu_to_synic(vcpu)->auto_eoi_bitmap) */) {
+	if (test_bit(vector, vcpu_to_synic(vcpu)->auto_eoi_bitmap)) {
 		 * For auto-EOI interrupts, there might be another pending
 		 * interrupt above PPR, so check whether to raise another