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] DomU-Dom0 communication question

To: "mk.xen-devel@xxxxxxxxxxxxxxx" <mk.xen-devel@xxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] DomU-Dom0 communication question
From: "Ryan Riley" <rileyrd@xxxxxxxxx>
Date: Wed, 2 May 2007 12:04:25 -0400
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 02 May 2007 09:02:56 -0700
Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=YE+zKk1lxGcEUYLUUh4UyVoJAs6fP7BtrkZXqxNuQ0K+KBKblMsQ3HFKWAhPy6/dZkTcSKDrl8kfaBuUf/lSnetLzFwNqwhK1ku9LChVDnbBrbLEfABlrjsX7V58Kxs58l6IxMgUUhFwZ4Hk5qBk82/D4p/mBYj0ubFQIHLYNQw=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=IgBa6xU4oDyH3zaQf4LdDo7naW/nhc0Nh35dxXB+AMY4G2EEYM/ZcdkYTxBaU5/moAqph62OHLUT42Qqk0IZB45Bve1MrWSwblEjt8kl2wLcc+MGxiiVtjGPPd7G4QOAkKDPQzrQ9NAoOI2u5aB0QjQXAxj/yyT0ngL1+mF7wlY=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <4591123.662921178115991050.JavaMail.servlet@perfora>
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>
References: <4591123.662921178115991050.JavaMail.servlet@perfora>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On 5/2/07, mk.xen-devel@xxxxxxxxxxxxxxx <mk.xen-devel@xxxxxxxxxxxxxxx> wrote:
Hi all,

I need to create a custom communication channel between DomU and Dom0 in order to send arbitrary messages/buffers between applications in Dom0 and DomU.

That sounds strangely familiar to what I had to do last month.  Basically building a mechanism to transport arbitrary strings out of the guest and into Dom0.

Basically, I am thinking about making a char control driver on both sides that would transport those messages to subscribers on either end using defined IOCL calls.

Seems very doable.

I am looking at backend/frontend drivers and I don't think it would work for what I want to do as fron/back ends don't have any devices associated with it.

Hmm, it sounds like you may be a bit confused regarding how the split drivers work.  For any useful frontend/backend device each side ends up being two drivers in one.  One is the frontend/backend driver, the other is the device that the OS sees.  For example, the networking frontend has all of the code the being a Xen frontend driver (event channels, probe handling, etc) and is also a network device that the guest interacts with.  In a sense it registers itself as two drivers.

You could definitely write a split driver that has character devices on both ends that share data.  My backend driver for the project I mentioned above is exactly that.  (Frontend kernel puts data onto a ring buffer, backend kernel reads it off and makes it available as a character device.)

Would it be better to utilize event channel directly or write frontend/backend drivers and control drivers on both ends? Or maybe there is another mechanism that already exists in xen environment and I am just trying to do things the hard way? Any advise is greatly appreciated.

This probably sounds bad, but if you can get away with it I would do everything is user space and send your arbitrary data/buffers over the network link.  Trust me when I say that you'll lose less hair that way.

If you decide to go the split driver route, I can supply you with my code.  It isn't pretty, but it may help you out.  Let me know if you're interested.

Thanks
Ryan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>