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] To use xcs or not?

To: Jacob Gorm Hansen <jacobg@xxxxxxx>
Subject: Re: [Xen-devel] To use xcs or not?
From: Anthony Liguori <anthony@xxxxxxxxxxxxx>
Date: Sun, 20 Feb 2005 23:04:08 -0600
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 21 Feb 2005 05:05:27 +0000
Envelope-to: xen+James.Bulpin@xxxxxxxxxxxx
In-reply-to: <421951AE.2030805@xxxxxxx>
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: <42184ECD.1080904@xxxxxxx> <4218C302.2070900@xxxxxxxxxxxxx> <421951AE.2030805@xxxxxxx>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
User-agent: Mozilla Thunderbird 1.0 (X11/20041206)
Jacob Gorm Hansen wrote:

OK, I actually got the impression that using XCS was the easiest way around the problem, as you seem to need a lot of code for setting up your own channel (which I can copy-paste from somewhere I am sure).

For just using notify, it's quite simply. The control channels are complicated because of the ring queue stuff. If you were implementing this as a virtual device in vm-tools (of course, I'm not bias ;-)), all you would do is open /dev/evtchn and add that to the set of listener fds (see the console device for an example of this).

You would also need to allocate a port for notifications (vmm_alloc_port in vm-tools or xc_evtchn_bind_interdomain otherwise). The easiest thing to do would be to use a well known endpoint (anything above 10 should be relatively safe for now although you'll probably need to negotiate it in the future).

When you get a read event on /dev/evtchn, all you do is read a 2 byte value from it. This will be the port the event happened on. You'll also have to unmask the event by writing that same value back to the device.

Can I setup my own event channel in the guest, and still access it using /dev/evtchn in dom0?

Yup.

Regards,

Thanks,
Jacob



--
Anthony Liguori
anthony@xxxxxxxxxxxxx



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel

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