WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Event channel problems

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Event channel problems
From: Kieran Mansley <kmansley@xxxxxxxxxxxxxx>
Date: Tue, 13 Mar 2007 17:07:03 +0000
Delivery-date: Tue, 13 Mar 2007 10:06:19 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
I'm having problems using Xen event channels after the change to replace
bind_evtchn_to_irqhandler() with bind_listening_port_to_irqhandler() and
bind_calling_port_to_irqhandler().  i.e.:
http://lists.xensource.com/archives/html/xen-
changelog/2006-12/msg00567.html

I'm not entirely sure how these two new functions should be called, or
what the significant difference is between them.  However, using other
frontend/backends as an example to get an event channel between the two
with an irq handler bound at both ends, I do something like this:

Frontend:
        err = bind_listening_port_to_irqhandler(dev->otherend_id,
                                                irq_from_backend,
                                                SA_SAMPLE_RANDOM, 
                                                "myfrontend", dev);
        if (err < 0) {
                DPRINTK("Couldn't bind evtchn to irqhandler\n");
                goto fail;
        }
        channel_irq = err;
        channel = irq_to_evtchn_port(channel_irq);

Then the frontend passes the channel ID through xenstore to the backend,
which gets it and does the following:

        err = bind_interdomain_evtchn_to_irqhandler(dev->otherend_id,
                                                    channel,
                                                    irq_from_frontend,
                                                    0,
                                                    "mybackend",
                                                    dev);
        if (err < 0) {
                DPRINTK("failed to bind event channel: %d\n", err);
                goto fail;
        }
        channel_irq = err;

However, when the backend then calls:

        notify_remote_via_evtchn(channel);

Nothing happens at the frontend.  I was expecting the irq_from_backend()
function to be called.  There are no errors from any of the above code,
and the returned values for channels and irqs look very sensible.  Any
suggestions what I'm doing wrong?

Kieran


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>