hvm/vpt: Check that an irq is not blocked before waking the vcpu
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 9 Mar 2009 13:50:45 +0000 (13:50 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 9 Mar 2009 13:50:45 +0000 (13:50 +0000)
Currently, when a timer fires for a vpt interrupt, the interrupt
handler calls vcpu_kick() without checking to see if the IRQ is
blocked.  This causes the vcpu to wake up out of a halt when it
shouldn't.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
xen/arch/x86/hvm/vpt.c

index fe4ec99129e9f1647fa25a4318c05326436e2435..929d4cf57d2a1b07a80614ba61c503732c852566 100644 (file)
@@ -209,7 +209,8 @@ static void pt_timer_fn(void *data)
         set_timer(&pt->timer, pt->scheduled);
     }
 
-    vcpu_kick(pt->vcpu);
+    if ( !pt_irq_masked(pt) )
+        vcpu_kick(pt->vcpu);
 
     pt_unlock(pt);
 }