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

Re: [Xen-devel] weird problem in event channel setup

To: Anthony Liguori <anthony@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] weird problem in event channel setup
From: Xin Zhao <zhaoxin@xxxxxxxxxxxxxx>
Date: Tue, 18 Jan 2005 10:59:00 -0500 (EST)
Cc: xen-devel@xxxxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 18 Jan 2005 18:02:00 +0000
Envelope-to: xen+James.Bulpin@xxxxxxxxxxxx
In-reply-to: <200501172313.AEZ04158@xxxxxxxxxxxxxxxxxxx>
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
References: <200501172313.AEZ04158@xxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
The pseudo code is like this:

At the Dom0 side:

1. xu_port_new(domid,0,0)  // create a new port and connect dom0 and
domU(domid)

2. create a new message

    ctrl_msg_t cmsg;
    cmsg.type      = CMSG_SVDIF_FE;
    cmsg.id  = 1;
    cmsg.subtype   = 1;

    channel_msg.local = scp->local_port;
    channel_msg.remote = scp->remote_port;
    memcpy(cmsg.msg,&channel_msg,sizeof(channel_msg));
    cmsg.length    = sizeof(channel_msg);

3. xu_port_write_request() send out the new msg

4. xu_port_notify() send out notification to the DomU, the local port is
retrieved with the following codes:

local_port = 0;
remote_port = 1;
xc_evtchn_bind_interdomain(self->xc_handle,DOMID_SELF,domid,&local_port,
&remote_port);

5. quit.

At the DomU side, we use a simple kernel module, it first register a
receiver with ctrl_if_register_receiver(CMSG_SVDIF_FE, ctrl_if_rx);
In ctrl_if_rx, we just print out the received msg.

That's it. If the Dom0 app runs in a slow manner, everything seems to be
fine. But if the Dom0 app runs very fast, after 2 or 3 rounds, DomU will
suspend.

Can someone help me out? I was stuck for quite long time. :( Thanks in
advance.

Xin

On Mon, 17 Jan 2005, Anthony Liguori wrote:

> ---- Original message ----
> >Date: Mon, 17 Jan 2005 16:57:53 -0500 (EST)
> >From: Xin Zhao <zhaoxin@xxxxxxxxxxxxxx>
> >Subject: [Xen-devel] weird problem in event channel setup
> >To: xen-devel@xxxxxxxxxxxxxxxxxxxxx
> >
> >Hi, folks,
> >
> >I ran into a weird problem when I tried to setup an event channel between
> >dom0 and domU:
>
> Using which ports?
>
> >My code is quite simple: first, a dom0 application create a new channel
> >and bind dom0 and domU with this channel, second, the dom0 send a message
> >over control interface and send a notification via the control channel
> to the domU,
> >then the dom0 application quited.
>
> Where you using the control_msg_t ring queues?  If so, what did you base
> your code on?
>
> >At the domU side, I used a kernel module to listen on the message by
> >calling ctrl_if_register_receiver, when a message is available, the kernel
> >module will print out the message.
> >
> >When I run the dom0 app for a couple of times in a fast manner, domU will
> >be suspended. But if I run the dom0 application in a slow way (run, wait
> >for a while, run again), domU works fine.
>
> Maybe the queue is filling up and you're not gracefully handling it.
> Hard to say, would it be possible to post your code somewhere?
>
> Regards,
>
> Anthony Liguori
> email: aliguori@xxxxxxxxxx
>
> >Anybody knows why? Please give me hand. Thanks.
> >
> >-X
> >
> >
> >-------------------------------------------------------
> >The SF.Net email is sponsored by: Beat the post-holiday blues
> >Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
> >It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
> >_______________________________________________
> >Xen-devel mailing list
> >Xen-devel@xxxxxxxxxxxxxxxxxxxxx
> >https://lists.sourceforge.net/lists/listinfo/xen-devel
>


-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel

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