ia64/xen-unstable

changeset 16597:686b75b31f3c

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@intel.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Dec 12 10:40:02 2007 +0000 (2007-12-12)
parents 23febc32fc1b
children f2f7c92bf1c1
files xen/arch/x86/hvm/irq.c
line diff
     1.1 --- a/xen/arch/x86/hvm/irq.c	Wed Dec 12 10:38:14 2007 +0000
     1.2 +++ b/xen/arch/x86/hvm/irq.c	Wed Dec 12 10:40:02 2007 +0000
     1.3 @@ -362,12 +362,13 @@ int get_isa_irq_vector(struct vcpu *v, i
     1.4  int is_isa_irq_masked(struct vcpu *v, int isa_irq)
     1.5  {
     1.6      unsigned int gsi = hvm_isa_irq_to_gsi(isa_irq);
     1.7 +    uint8_t pic_imr;
     1.8  
     1.9      if ( is_lvtt(v, isa_irq) )
    1.10          return !is_lvtt_enabled(v);
    1.11  
    1.12 -    return ((v->domain->arch.hvm_domain.vpic[isa_irq >> 3].imr &
    1.13 -             (1 << (isa_irq & 7))) &&
    1.14 +    pic_imr = v->domain->arch.hvm_domain.vpic[isa_irq >> 3].imr;
    1.15 +    return (((pic_imr & (1 << (isa_irq & 7))) || !vlapic_accept_pic_intr(v)) &&
    1.16              domain_vioapic(v->domain)->redirtbl[gsi].fields.mask);
    1.17  }
    1.18