From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Liu Subject: Re: Block front and back connection Date: Tue, 9 Aug 2011 10:27:55 +0800 Message-ID: <20110809022755.GA1783@limbo> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Daniel Castro Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Mon, Aug 08, 2011 at 11:17:52PM +0900, Daniel Castro wrote: > Hello, > > I am trying to make my frontend block driver connect to xen block > backend. I have the ring and gref, yet I do not know where in xenstore > should I write the keys to tell the backend to connect to my frontend. > You can find some clues in libxl_devices.c . The frontend path is /local/domain/FRONTEND_DOMID/device/DEVICE_KIND/DEVID The backend path is /local/domain/BACKEND_DOMID/backend/BACKEND_KIND/FRONTEND_DOMID/DEVID Often the BACKEND_DOMID is 0. And looking into Linux kernel's xen-{blkfront,blkback} helps you a lot. Then you can switch xenbus state after proper values are in place, so that frontend and backend can connect to each other. Wei.