From: nicko.koinkoin@free.fr Subject: Re: Trans.: Device drivers and Xend Date: Tue, 17 Oct 2006 16:06:48 +0200 Message-ID: <1161094008.4534e378a4279@imp1-g19.free.fr> References: <1157551826.44fed6d2a7126@imp5-g19.free.fr> <200610170448.03281.mark.williamson@cl.cam.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <200610170448.03281.mark.williamson@cl.cam.ac.uk> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Mark Williamson Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Hi, First thanks for your answer and your encouragements. So first, why I am using Xen 2.0.7 instead of Xen 3.x, whereas things I w= ant would be easier to implement with the Xen3 API, is because I need a XenoL= inux 2.4 kernel. And, if I am right, Xen3 currently support Linux 2.6 but not = 2.4. And... in fact it is the only reason. Now, what I want to be implemented in my driver : when the front-end (corresponding to my driver) is loaded in a domU, I need an event channel= to be set up and a shared memory page. By this way the front-end will communica= te data to the back-end, by writing data in the shared memory page and sending a notification event. Something very classical. Of course, several front-en= d could connect to the same back-end. So (I think) what I need (with Xen2) is to add in Xend the management of = my new driver, by adding the right python script, like mydevif.py. I need to def= ine my control message, like CMSG_MYDEV_CONNECT, to add them to /usr/lib/python/xend/server/messages.py. By this way when a front-end sta= rts, it sends a CMSG_MYDEV_CONNECT via the control interface, and Xend creates= the event channel between the back and front end and set up a shared memory p= age. If I am right above, I just need to understand where to add the needed co= de in Xend, how to add a new device type, which are the methods / class to impl= ement, ..., which seems difficult to me, as Xend is not well documented. Also if= I want this virtual driver to be set up juste for particular guests, I need= to modify the configuration script for domain and so xm, to add a new parame= ter, like mydev =3D 0 | 1. But once again, as the process of adding a new devi= ce type in Xend is not described, it seems difficult to me. Of course, it seems that such things are really easier to implement in Xe= n3.x, as I saw in some examples. But I do really need a Linux 2.4 kernel, unfortunately. So what I wondered first if is I am right on the above explanations, and = if some body can tell me the tips I need about Xend. Thanks again. PS : If nobody can help me and that I don't succeed by myself in adding w= hat I want in Xend, I will try with Xen3, but I really need a 2.4 Linux kernel = (for dom0). Selon Mark Williamson : > Hi there, > > It's great that you're working on Xen. Sounds like you're making good > progress. > > However, do you really have to use Xen 2.0.7? It's not really supporte= d any > more - the 3.x series gets all the attention these days. The main diff= erence > between the two from your point of view is probably in the control inte= rface. > > The Xend parts of the code are concerned with sending control messages = to > domains in the right sequence so that their drivers may handshake and s= et up > shared memory / event channel. In Xen 3.x, the Xend components of a sp= lit > driver are very different and *much* simpler, but you need to use XenSt= ore in > the devices. > > Could you give any more detail about your device drivers? What require= ments > do they have? (shared memory pages, event channels, other metadata etc.= ..) > > Cheers, > Mark > > On Wednesday 06 September 2006 15:10, nicko.koinkoin@free.fr wrote: > > Hi everybody > > > > I am currently writting a split device driver for a custom device. > > > > I have understood the way it works, I wrote the code (kernel module) = but > > currently it is static (i.e. port number) because I am not using Xend= . > > > > And I want to use it, but I don't know how to add a new device type i= n > > Xend, i.e. which files are needed, ... I looked at blkif.py and netif= .py, I > > know I have to write such a script for my new device, but what are th= e > > classes/object that must be present, the same for the methods ? > > > > Also how do I set up a virtual custom device for the domains > > (XendDomainInfo.py ?) ? > > > > In fact I search for a manual describing in details Xend, like a HowT= o Xend > > device drivers, what I didn't find in the ML. I am using xen-2.0.7, s= o I > > think there is no XenBus and XenStore. > > > > If somebody can give me advice. > > > > Thanks. > > > > > > > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xensource.com > > http://lists.xensource.com/xen-devel > > -- > Dave: Just a question. What use is a unicyle with no seat? And no peda= ls! > Mark: To answer a question with a question: What use is a skateboard? > Dave: Skateboards have wheels. > Mark: My wheel has a wheel! > -- Nicolas CLERMONT