aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>2011-06-23 12:01:58 +0100
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>2011-06-23 12:01:58 +0100
commitee367eff1f837ac6e997c41bcbc0b85fb9fedad2 (patch)
treee20d452e07b3b650d6afbd740af4696abb4e5516
parent837e2846531a4b4e561f17e741f8a25c9e0b059c (diff)
downloadxen-ee367eff1f837ac6e997c41bcbc0b85fb9fedad2.tar.gz
xen-ee367eff1f837ac6e997c41bcbc0b85fb9fedad2.tar.bz2
xen-ee367eff1f837ac6e997c41bcbc0b85fb9fedad2.zip
pv-on-hvm: 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. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> xen-unstable changeset: 23550:fb5f0febeddc xen-unstable date: Thu Jun 16 16:17:35 2011 +0100
-rw-r--r--xen/arch/x86/irq.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c
index 9958b3c1c0..ef3cb89027 100644
--- a/xen/arch/x86/irq.c
+++ b/xen/arch/x86/irq.c
@@ -1869,14 +1869,8 @@ int unmap_domain_pirq_emuirq(struct domain *d, int pirq)
int hvm_domain_use_pirq(struct domain *d, int pirq)
{
- int emuirq;
-
if ( !is_hvm_domain(d) || pirq < 0 )
return 0;
- emuirq = domain_pirq_to_emuirq(d, pirq);
- if ( emuirq != IRQ_UNBOUND && d->pirq_to_evtchn[pirq] != 0 )
- return 1;
- else
- return 0;
+ return (domain_pirq_to_emuirq(d, pirq) != IRQ_UNBOUND);
}