diff options
author | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2011-06-16 16:17:35 +0100 |
---|---|---|
committer | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2011-06-16 16:17:35 +0100 |
commit | f90382990285ff1267051c181f90531808c369ff (patch) | |
tree | b13df7885a0d8def94b4f506fab84cce9c96f658 /xen/arch/x86/irq.c | |
parent | 16e0daef46d2a557b4327540eae99e4572b24feb (diff) | |
download | xen-f90382990285ff1267051c181f90531808c369ff.tar.gz xen-f90382990285ff1267051c181f90531808c369ff.tar.bz2 xen-f90382990285ff1267051c181f90531808c369ff.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>
Diffstat (limited to 'xen/arch/x86/irq.c')
-rw-r--r-- | xen/arch/x86/irq.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index 635c7801f9..0a84bf8dfb 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -1951,14 +1951,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); } |