direct-io.hg

changeset 11595:decde35c6abf

[HVM] Fix timer interrupt underflow bug.

Without the patch, vlapic->intr_pending_count could become a very
small negative, causing some local APIC timer interrupts lost.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
author kfraser@localhost.localdomain
date Sat Sep 23 14:04:22 2006 +0100 (2006-09-23)
parents 6d7bba6443ef
children f983ed5e9098
files xen/arch/x86/hvm/vlapic.c
line diff
     1.1 --- a/xen/arch/x86/hvm/vlapic.c	Sat Sep 23 14:01:53 2006 +0100
     1.2 +++ b/xen/arch/x86/hvm/vlapic.c	Sat Sep 23 14:04:22 2006 +0100
     1.3 @@ -946,9 +946,11 @@ void vlapic_post_injection(struct vcpu *
     1.4  
     1.5          if ( vector == vlapic_lvt_vector(vlapic, APIC_LVTT) )
     1.6          {
     1.7 -            vlapic->intr_pending_count[vector]--;
     1.8              if ( vlapic->intr_pending_count[vector] > 0 )
     1.9 +            {
    1.10 +                vlapic->intr_pending_count[vector]--;
    1.11                  vlapic_test_and_set_vector(vector, vlapic->regs + APIC_IRR);
    1.12 +            }
    1.13          }
    1.14          break;
    1.15