ia64/xen-unstable

changeset 5486:5fc176d2b3a9

bitkeeper revision 1.1713.2.6 (42b305b9mdLLzenpwCqtnZeLKLPMXw)

Check to ensure no interrupts to deliver before allowing
a guest to "pause" itself
author djm@kirby.fc.hp.com
date Fri Jun 17 17:17:45 2005 +0000 (2005-06-17)
parents 764d98ff8c26
children 9ae40d2e6c1d
files xen/arch/ia64/hypercall.c
line diff
     1.1 --- a/xen/arch/ia64/hypercall.c	Fri Jun 17 16:18:11 2005 +0000
     1.2 +++ b/xen/arch/ia64/hypercall.c	Fri Jun 17 17:17:45 2005 +0000
     1.3 @@ -40,6 +40,17 @@ ia64_hypercall (struct pt_regs *regs)
     1.4  #endif
     1.5  		x = pal_emulator_static(regs->r28);
     1.6  		if (regs->r28 == PAL_HALT_LIGHT) {
     1.7 +#if 1
     1.8 +#define SPURIOUS_VECTOR 15
     1.9 +			if (vcpu_check_pending_interrupts(v)!=SPURIOUS_VECTOR) {
    1.10 +//printf("Domain trying to go idle when interrupt pending!\n");
    1.11 +//this shouldn't happen, but it apparently does quite a bit!  so don't
    1.12 +//allow it to happen... i.e. if a domain has an interrupt pending and
    1.13 +//it tries to halt itself because it thinks it is idle, just return here
    1.14 +//as deliver_pending_interrupt is called on the way out and will deliver it
    1.15 +			}
    1.16 +			else
    1.17 +#endif
    1.18  			do_sched_op(SCHEDOP_yield);
    1.19  			//break;
    1.20  		}