[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Fix virq delivery in Xend.
ChangeSet 1.1439, 2005/05/17 23:15:17+01:00, cl349@xxxxxxxxxxxxxxxxxxxx Fix virq delivery in Xend. xcs.c: Fix binding to virq's -- setup evtchn binding. channel.py: Use VIRQ_DOM_EXC as exported from xc. Also don't bind to virq's we don't care for or which won't get delivered to us anyway. xc.c: Export VIRQ_DOM_EXC to python. Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx> python/xen/lowlevel/xc/xc.c | 1 + python/xen/xend/server/channel.py | 16 +++------------- xcs/xcs.c | 11 +++++++++++ 3 files changed, 15 insertions(+), 13 deletions(-) diff -Nru a/tools/python/xen/lowlevel/xc/xc.c b/tools/python/xen/lowlevel/xc/xc.c --- a/tools/python/xen/lowlevel/xc/xc.c 2005-05-17 19:04:54 -04:00 +++ b/tools/python/xen/lowlevel/xc/xc.c 2005-05-17 19:04:54 -04:00 @@ -1279,6 +1279,7 @@ d = PyModule_GetDict(m); xc_error = PyErr_NewException(XENPKG ".error", NULL, NULL); PyDict_SetItemString(d, "error", xc_error); + PyDict_SetItemString(d, "VIRQ_DOM_EXC", PyInt_FromLong(VIRQ_DOM_EXC)); zero = PyInt_FromLong(0); diff -Nru a/tools/python/xen/xend/server/channel.py b/tools/python/xen/xend/server/channel.py --- a/tools/python/xen/xend/server/channel.py 2005-05-17 19:04:54 -04:00 +++ b/tools/python/xen/xend/server/channel.py 2005-05-17 19:04:54 -04:00 @@ -10,12 +10,6 @@ from messages import * -VIRQ_MISDIRECT = 0 # Catch-all interrupt for unbound VIRQs. -VIRQ_TIMER = 1 # Timebase update, and/or requested timeout. -VIRQ_DEBUG = 2 # Request guest to dump debug info. -VIRQ_CONSOLE = 3 # (DOM0) bytes received on emergency console. -VIRQ_DOM_EXC = 4 # (DOM0) Exceptional event for some domain. - DEBUG = 0 RESPONSE_TIMEOUT = 20.0 @@ -66,13 +60,8 @@ def __init__(self): """Constructor - do not use. Use the channelFactory function.""" self.notifier = xu.notifier() - # Register interest in all virqs. - # Unfortunately virqs do not seem to be delivered. - self.bind_virq(VIRQ_MISDIRECT) - self.bind_virq(VIRQ_TIMER) - self.bind_virq(VIRQ_DEBUG) - self.bind_virq(VIRQ_CONSOLE) - self.bind_virq(VIRQ_DOM_EXC) + # Register interest in virqs. + self.bind_virq(xen.lowlevel.xc.VIRQ_DOM_EXC) self.virqHandler = None def bind_virq(self, virq): @@ -81,6 +70,7 @@ log.info("Virq %s on port %s", virq, port) def virq(self): + log.error("virq") self.notifier.virq_send(self.virqPort) def start(self): diff -Nru a/tools/xcs/xcs.c b/tools/xcs/xcs.c --- a/tools/xcs/xcs.c 2005-05-17 19:04:54 -04:00 +++ b/tools/xcs/xcs.c 2005-05-17 19:04:54 -04:00 @@ -192,10 +192,21 @@ cc = (control_channel_t *)malloc(sizeof(control_channel_t)); if ( cc == NULL ) return NULL; + memset(cc, 0, sizeof(control_channel_t)); cc->type = CC_TYPE_VIRQ; cc->local_port = virq_port; cc->virq = virq; + cc->ref_count = 1; + if (evtchn_bind(cc->local_port) != 0) + { + DPRINTF("Got control interface, but couldn't bind evtchan!\n"); + free(cc); + return NULL; + } + + cc_list[cc->local_port] = cc; + return cc; } _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |