debuggers.hg
changeset 10936:637b6d60e792
[HVM] Fix an issue with APIC priority checks.
Signed-off-by; Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by; Yunhong Jiang <yunhong.jiang@intel.com>
author | kfraser@localhost.localdomain |
---|---|
date | Wed Aug 02 10:04:27 2006 +0100 (2006-08-02) |
parents | f5b9b8439012 |
children | a6cb8ba24a91 |
files | xen/arch/x86/hvm/vlapic.c |
line diff
1.1 --- a/xen/arch/x86/hvm/vlapic.c Wed Aug 02 10:03:04 2006 +0100 1.2 +++ b/xen/arch/x86/hvm/vlapic.c Wed Aug 02 10:04:27 2006 +0100 1.3 @@ -210,7 +210,7 @@ static int vlapic_accept_irq(struct vcpu 1.4 if ( unlikely(vlapic == NULL || !vlapic_enabled(vlapic)) ) 1.5 break; 1.6 1.7 - if ( test_and_set_bit(vector, &vlapic->irr[0]) ) 1.8 + if ( test_and_set_bit(vector, &vlapic->irr[0]) && level) 1.9 { 1.10 HVM_DBG_LOG(DBG_LEVEL_VLAPIC, 1.11 "level trig mode repeatedly for vector %d\n", vector); 1.12 @@ -922,7 +922,8 @@ int cpu_get_apic_interrupt(struct vcpu * 1.13 { 1.14 int highest_irr = vlapic_find_highest_irr(vlapic); 1.15 1.16 - if ( highest_irr != -1 && highest_irr >= vlapic->processor_priority ) 1.17 + if ( highest_irr != -1 && 1.18 + ( (highest_irr & 0xF0) > vlapic->processor_priority ) ) 1.19 { 1.20 if ( highest_irr < 0x10 ) 1.21 { 1.22 @@ -952,7 +953,8 @@ int cpu_has_apic_interrupt(struct vcpu* 1.23 if (vlapic && vlapic_enabled(vlapic)) { 1.24 int highest_irr = vlapic_find_highest_irr(vlapic); 1.25 1.26 - if (highest_irr != -1 && highest_irr >= vlapic->processor_priority) { 1.27 + if ( highest_irr != -1 && 1.28 + ( (highest_irr & 0xF0) > vlapic->processor_priority ) ) { 1.29 return 1; 1.30 } 1.31 }