debuggers.hg
changeset 3338:3609a4de4be5
bitkeeper revision 1.1159.1.491 (41c1bbaaDkYIjNKFhK85puhPuumo_w)
Merge scramble.cl.cam.ac.uk:/auto/groups/xeno/BK/xeno.bk
into scramble.cl.cam.ac.uk:/local/scratch/kaf24/xen-unstable.bk
Merge scramble.cl.cam.ac.uk:/auto/groups/xeno/BK/xeno.bk
into scramble.cl.cam.ac.uk:/local/scratch/kaf24/xen-unstable.bk
author | kaf24@scramble.cl.cam.ac.uk |
---|---|
date | Thu Dec 16 16:45:30 2004 +0000 (2004-12-16) |
parents | 2711f7eb364c cd90fe329149 |
children | 8d2ea672325a |
files | xen/common/event_channel.c xen/include/public/xen.h xen/include/xen/sched.h |
line diff
1.1 --- a/xen/common/event_channel.c Thu Dec 16 16:42:45 2004 +0000 1.2 +++ b/xen/common/event_channel.c Thu Dec 16 16:45:30 2004 +0000 1.3 @@ -256,11 +256,9 @@ static long evtchn_bind_virq(evtchn_bind 1.4 1.5 /* 1.6 * Port 0 is the fallback port for VIRQs that haven't been explicitly 1.7 - * bound yet. The exception is the 'misdirect VIRQ', which is permanently 1.8 - * bound to port 0. 1.9 + * bound yet. 1.10 */ 1.11 if ( ((port = ed->virq_to_evtchn[virq]) != 0) || 1.12 - (virq == VIRQ_MISDIRECT) || 1.13 ((port = get_free_port(ed)) < 0) ) 1.14 goto out; 1.15 1.16 @@ -353,8 +351,7 @@ static long __evtchn_close(struct domain 1.17 1.18 chn1 = d1->event_channel; 1.19 1.20 - /* NB. Port 0 is special (VIRQ_MISDIRECT). Never let it be closed. */ 1.21 - if ( (port1 <= 0) || (port1 >= d1->max_event_channel) ) 1.22 + if ( (port1 < 0) || (port1 >= d1->max_event_channel) ) 1.23 { 1.24 rc = -EINVAL; 1.25 goto out; 1.26 @@ -363,6 +360,7 @@ static long __evtchn_close(struct domain 1.27 switch ( chn1[port1].state ) 1.28 { 1.29 case ECS_FREE: 1.30 + case ECS_RESERVED: 1.31 rc = -EINVAL; 1.32 goto out; 1.33 1.34 @@ -541,6 +539,7 @@ static long evtchn_status(evtchn_status_ 1.35 switch ( chn[port].state ) 1.36 { 1.37 case ECS_FREE: 1.38 + case ECS_RESERVED: 1.39 status->status = EVTCHNSTAT_closed; 1.40 break; 1.41 case ECS_UNBOUND: 1.42 @@ -645,8 +644,7 @@ int init_event_channels(struct domain *d 1.43 /* Call get_free_port to initialize d->event_channel */ 1.44 if ( get_free_port(d->exec_domain[0]) != 0 ) 1.45 return -EINVAL; 1.46 - d->event_channel[0].state = ECS_VIRQ; 1.47 - d->event_channel[0].u.virq = VIRQ_MISDIRECT; 1.48 + d->event_channel[0].state = ECS_RESERVED; 1.49 return 0; 1.50 } 1.51
2.1 --- a/xen/include/public/xen.h Thu Dec 16 16:42:45 2004 +0000 2.2 +++ b/xen/include/public/xen.h Thu Dec 16 16:45:30 2004 +0000 2.3 @@ -68,13 +68,12 @@ 2.4 * 2.5 * Virtual interrupts that a guest OS may receive from Xen. 2.6 */ 2.7 -#define VIRQ_MISDIRECT 0 /* Catch-all interrupt for unbound VIRQs. */ 2.8 -#define VIRQ_TIMER 1 /* Timebase update, and/or requested timeout. */ 2.9 -#define VIRQ_DEBUG 2 /* Request guest to dump debug info. */ 2.10 -#define VIRQ_CONSOLE 3 /* (DOM0) bytes received on emergency console. */ 2.11 -#define VIRQ_DOM_EXC 4 /* (DOM0) Exceptional event for some domain. */ 2.12 -#define VIRQ_PARITY_ERR 5 /* (DOM0) NMI parity error. */ 2.13 -#define VIRQ_IO_ERR 6 /* (DOM0) NMI I/O error. */ 2.14 +#define VIRQ_TIMER 0 /* Timebase update, and/or requested timeout. */ 2.15 +#define VIRQ_DEBUG 1 /* Request guest to dump debug info. */ 2.16 +#define VIRQ_CONSOLE 2 /* (DOM0) bytes received on emergency console. */ 2.17 +#define VIRQ_DOM_EXC 3 /* (DOM0) Exceptional event for some domain. */ 2.18 +#define VIRQ_PARITY_ERR 4 /* (DOM0) NMI parity error. */ 2.19 +#define VIRQ_IO_ERR 5 /* (DOM0) NMI I/O error. */ 2.20 #define NR_VIRQS 7 2.21 2.22 /*
3.1 --- a/xen/include/xen/sched.h Thu Dec 16 16:42:45 2004 +0000 3.2 +++ b/xen/include/xen/sched.h Thu Dec 16 16:45:30 2004 +0000 3.3 @@ -32,11 +32,12 @@ extern struct domain *dom0; 3.4 typedef struct event_channel_st 3.5 { 3.6 #define ECS_FREE 0 /* Channel is available for use. */ 3.7 -#define ECS_UNBOUND 1 /* Channel is waiting to bind to a remote domain. */ 3.8 -#define ECS_INTERDOMAIN 2 /* Channel is bound to another domain. */ 3.9 -#define ECS_PIRQ 3 /* Channel is bound to a physical IRQ line. */ 3.10 -#define ECS_VIRQ 4 /* Channel is bound to a virtual IRQ line. */ 3.11 -#define ECS_IPI 5 /* Channel is bound to a virtual IPI line. */ 3.12 +#define ECS_RESERVED 1 /* Channel is reserved. */ 3.13 +#define ECS_UNBOUND 2 /* Channel is waiting to bind to a remote domain. */ 3.14 +#define ECS_INTERDOMAIN 3 /* Channel is bound to another domain. */ 3.15 +#define ECS_PIRQ 4 /* Channel is bound to a physical IRQ line. */ 3.16 +#define ECS_VIRQ 5 /* Channel is bound to a virtual IRQ line. */ 3.17 +#define ECS_IPI 6 /* Channel is bound to a virtual IPI line. */ 3.18 u16 state; 3.19 union { 3.20 struct {