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

Konstantin Khorenko khorenko at virtuozzo.com
Tue Jul 10 19:20:06 MSK 2018


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 at 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 at 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 at 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)
    https://access.redhat.com/labs/psb/versions/kernel-3.10.0-862.el7/patches/x86-kvm-lapic-do-not-scan-IRR-when-delivering-an-interrupt?raw=true
    
    Undo this breakage.
    
    https://jira.sw.ru/browse/PSBM-86431
    
    Signed-off-by: Roman Kagan <rkagan at virtuozzo.com>
---
 arch/x86/kvm/lapic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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


More information about the Devel mailing list