aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/hvm/irq.c
diff options
context:
space:
mode:
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>2011-05-12 09:15:05 +0100
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>2011-05-12 09:15:05 +0100
commitb5bf4eedb426810079ca7821497e3ef838277a91 (patch)
tree752cce23bb706faa1727d968eb7feb4ba177b3d1 /xen/arch/x86/hvm/irq.c
parentcfc6cab903b7fecb931b373b35012a259665973b (diff)
downloadxen-b5bf4eedb426810079ca7821497e3ef838277a91.tar.gz
xen-b5bf4eedb426810079ca7821497e3ef838277a91.tar.bz2
xen-b5bf4eedb426810079ca7821497e3ef838277a91.zip
x86/hvm: pv-on-hvm: fix de/assert_irq checks
The checks in assert_irq and deassert_irq to distinguish interrupts that have been remapped onto event channels from the others that have to be injected using the emulated lapic are wrong. Fix the condition checks using the convenient hvm_domain_use_pirq function. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Diffstat (limited to 'xen/arch/x86/hvm/irq.c')
-rw-r--r--xen/arch/x86/hvm/irq.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/xen/arch/x86/hvm/irq.c b/xen/arch/x86/hvm/irq.c
index f1deada076..f560e392e6 100644
--- a/xen/arch/x86/hvm/irq.c
+++ b/xen/arch/x86/hvm/irq.c
@@ -31,7 +31,7 @@
static void assert_irq(struct domain *d, unsigned ioapic_gsi, unsigned pic_irq)
{
int pirq = domain_emuirq_to_pirq(d, ioapic_gsi);
- if ( pirq != IRQ_UNBOUND )
+ if ( hvm_domain_use_pirq(d, pirq) )
{
send_guest_pirq(d, pirq);
return;
@@ -43,7 +43,8 @@ static void assert_irq(struct domain *d, unsigned ioapic_gsi, unsigned pic_irq)
/* Must be called with hvm_domain->irq_lock hold */
static void deassert_irq(struct domain *d, unsigned isa_irq)
{
- if ( domain_emuirq_to_pirq(d, isa_irq) != IRQ_UNBOUND )
+ int pirq = domain_emuirq_to_pirq(d, isa_irq);
+ if ( !hvm_domain_use_pirq(d, pirq) )
vpic_irq_negative_edge(d, isa_irq);
}