[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] hvm: Fix is_isa_irq_masked().



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1197456002 0
# Node ID 686b75b31f3cc10453119dd23eac4e7ac3f9e9ad
# Parent  23febc32fc1b8fbf1753dbec3abb003357267ab5
hvm: Fix is_isa_irq_masked().

Incorrectly it was not checking whether the vlapic is masking the pic.

Signed-off-by: Dexuan Cui <dexuan.cui@xxxxxxxxx>
---
 xen/arch/x86/hvm/irq.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff -r 23febc32fc1b -r 686b75b31f3c xen/arch/x86/hvm/irq.c
--- a/xen/arch/x86/hvm/irq.c    Wed Dec 12 10:38:14 2007 +0000
+++ b/xen/arch/x86/hvm/irq.c    Wed Dec 12 10:40:02 2007 +0000
@@ -362,12 +362,13 @@ int is_isa_irq_masked(struct vcpu *v, in
 int is_isa_irq_masked(struct vcpu *v, int isa_irq)
 {
     unsigned int gsi = hvm_isa_irq_to_gsi(isa_irq);
+    uint8_t pic_imr;
 
     if ( is_lvtt(v, isa_irq) )
         return !is_lvtt_enabled(v);
 
-    return ((v->domain->arch.hvm_domain.vpic[isa_irq >> 3].imr &
-             (1 << (isa_irq & 7))) &&
+    pic_imr = v->domain->arch.hvm_domain.vpic[isa_irq >> 3].imr;
+    return (((pic_imr & (1 << (isa_irq & 7))) || !vlapic_accept_pic_intr(v)) &&
             domain_vioapic(v->domain)->redirtbl[gsi].fields.mask);
 }
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.