Skip to contentSkip to conversation

xen: hvm_domain_use_pirq return positive no matter if the evtchn is bound

PATCH New Stefano Stabellini 1 participant 1 message Jun 16, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen: hvm_domain_use_pirq return positive no matter if the evtchn is bound

xen: hvm_domain_use_pirq return positive no matter if the evtchn is bound

This patch fixes PV on HVM interrupt remapping with recent Linux kernels and upstream qemu.
hvm_domain_use_pirq should return positive even if the evtchn is not currently bound. If it doesn't assert_irq ends up injecting legacy interrupts even after the guest disabled the irq.

xen/arch/x86/irq.c +1 -1
diff -r f9bb0bbea7c2 xen/arch/x86/irq.c
@@ -1959,7 +1959,7 @@ int hvm_domain_use_pirq(struct domain *d
         return 0;
 
     emuirq = domain_pirq_to_emuirq(d, pirq);
-    if ( emuirq != IRQ_UNBOUND && d->pirq_to_evtchn[pirq] != 0 )
+    if ( emuirq != IRQ_UNBOUND )
         return 1;
     else
         return 0;