From: Keir Fraser Subject: Re: back/frontend drivers HelloWorld Date: Sun, 25 Sep 2005 19:56:30 +0100 Message-ID: References: <200509221746.32758.tiger@swsoft.mipt.ru> <5d7aca9505092302532b4e88eb@mail.gmail.com> <766473d1a313531c949034405df37ec5@cl.cam.ac.uk> <5d7aca9505092410405b07022@mail.gmail.com> <1d35e5803140b27e1535e7c1c146d5c4@cl.cam.ac.uk> <5d7aca95050925092427b30189@mail.gmail.com> Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5d7aca95050925092427b30189@mail.gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: NAHieu Cc: xen-devel List-Id: xen-devel@lists.xenproject.org On 25 Sep 2005, at 17:24, NAHieu wrote: > - 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?) All correct, but you skip a few details. In step 1, domU gets the event channel port via EVTCHNOP_alloc_unbound. It then writes that port value to xenstore. In step 2, dom0 binds to the remote event-channel port via EVTCHNOP_bind_interdomain. This returns the allocated local port which is what is passed to bind_evtchn_to_irqhandler(). See code in drivers/xen/blkback/interface.c for a precise example of doing this -- probably best to steal that portion of code as a template. Also, you can find code in blkfront/blkback to allocate a shared page in blkfront, allocate a grant reference for it, pass that to blkback and map the page thru the grant reference. -- Keir