[RHEL7,COMMIT] kvm:x86:lapic: undo RH's breaking hyperv synic auto_eoi

Submitted by Konstantin Khorenko on July 10, 2018, 4:20 p.m.


Message ID 201807101620.w6AGK6Cx029134@finist_ce7.work
State New
Series "kvm:x86:lapic: undo RH's breaking hyperv synic auto_eoi"
Headers show

Commit Message

Konstantin Khorenko July 10, 2018, 4:20 p.m.
The commit is pushed to "branch-rh7-3.10.0-862.6.3.vz7.62.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-862.6.3.vz7.62.2
commit 31c4594b01fe83750f2818e29be3389bea338e23
Author: Roman Kagan <rkagan@virtuozzo.com>
Date:   Tue Jul 10 19:20:05 2018 +0300

    kvm:x86:lapic: undo RH's breaking hyperv synic auto_eoi
    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.
    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