[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] back/frontend drivers HelloWorld
On 9/25/05, Keir Fraser <Keir.Fraser@xxxxxxxxxxxx> wrote: > > On 24 Sep 2005, at 18:40, NAHieu wrote: > > > Could you tell me which code in Xen uses the above 1->4 setup > > procedure? I searched for some examples, but couldnt find any. > > There are several examples in the kernel: grep for uses of > 'alloc_unbound' in every frontend driver and 'bind_interdomain' in > every backend driver. Unfortunately I think we currently have no > example of doing this from user space, but the principles are the same! I am writing a small "virtual" device driver for Xen (virtual means not "real" device). After looking at those code, I think the steps we must do to exchange data between dom0 and domU - using backend and frontend method: 1. domU get the event channel, and write to xenstore 2. dom0 watches the xenstore (xs_watch) for the event channel of domU, to detect when domU writes channel value to xenstore. dom0 then bind to domU's channel (using bind_evtchn_to_irqhandler()) 3. whenever dom0 and domU want to exchange data, they update the corresponding share-ring/grant-table and then inform the other using notify_via_evtchn() - Is that correct? ( I have some doubts about (2), as I see that the drivers available in xen uses xenbus_driver.probe to detect domU's driver?) - Another question: I found it is difficult to understand xenbus_driver/xenbus_device architecture. They must be rooted from Linux architecture? Any good documentation to understand those things, in order to understand xenbus_device? Many thanks, Hieu _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |