Received: from eggs.gnu.org ([2001:4830:134:3::10]:41638) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVJ7s-0003Be-K1 for qemu-devel@nongnu.org; Mon, 15 Feb 2016 08:23:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aVJ7n-00064V-G5 for qemu-devel@nongnu.org; Mon, 15 Feb 2016 08:23:40 -0500 Received: from smtp.eu.citrix.com ([185.25.65.24]:51790) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVJ7n-00064R-9C for qemu-devel@nongnu.org; Mon, 15 Feb 2016 08:23:35 -0500 From: Paul Durrant Date: Mon, 15 Feb 2016 13:23:32 +0000 Message-ID: References: <20160212191037.GF8818@citrix.com> <3fbbf2a606a14f708655037f5e4fb31e@AMSPEX02CL03.citrite.net> <20160215131621.GL8818@citrix.com> In-Reply-To: <20160215131621.GL8818@citrix.com> Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [Qemu-devel] RFC: configuring QEMU virtfs for Xen PV(H) guests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wei Liu Cc: "qemu-devel@nongnu.org" , Stefano Stabellini , "aneesh.kumar@linux.vnet.ibm.com" , Anthony Perard , Xen-devel , "gkurz@linux.vnet.ibm.com" > -----Original Message----- > From: Wei Liu [mailto:wei.liu2@citrix.com] > Sent: 15 February 2016 13:16 > To: Paul Durrant > Cc: Wei Liu; qemu-devel@nongnu.org; Xen-devel; Anthony Perard; > gkurz@linux.vnet.ibm.com; aneesh.kumar@linux.vnet.ibm.com; Stefano > Stabellini > Subject: Re: [Qemu-devel] RFC: configuring QEMU virtfs for Xen PV(H) > guests >=20 > On Mon, Feb 15, 2016 at 09:07:13AM +0000, Paul Durrant wrote: > > > > [...] > > > # Option 2: Invent a xen-9p device > > > > > > Another way of doing it is to expose a dummy xen-9p device, so that w= e > > > can use -fsdev XXX -device xen-9p,YYY. This simple device should be > > > used to capture the parameters like mount_tag and fsdev_id, and then > > > chained itself to a known location. Later Xen transport can traverse > > > this known location. This xen-9p device doesn't seem to fit well into > > > the hierarchy. The best I can think of its parent should be > > > TYPE_DEVICE. In this case: > > > > > > 1. Toolstack arranges some xenstore entries. > > > 2. Toolstack arranges command line options for QEMU: > > > -fsdev XXX -device xen-9p,XXX > > > 3. QEMU starts up in xen-attach mode, scans xenstore for relevant > > > entries, then traverses the known location. > > > > > > Downside: Inventing a dummy device looks suboptimal to me. > > > > > >=20 > I wasn't talking about inventing a whole new hierarchy for XENBUS > devices. I didn't talk about that because that's not strictly related to > 9p project and maybe a project in its own right. But I'm glad you > notice this possibility. >=20 > > This sounds like a reasonable approach to me and surely it can be made > > generic (i.e. not tied to virtfs specifically). All we need as a new > > device type 'xenbus-device' or somesuch and a parameter to that device > > which specifies the exact xenstore entry for that device and all other > > configuration information is specified there e.g whether it's a vif, > > vbd, 9p or whatever. The correct backend can then be kicked off > > directly. No scanning required. No stealing required. As for the > > device type, would it not be best to have a proper XENBUS bus type? >=20 > Yes, that would be good. It's just not implemented yet. >=20 > > All the code which actually talks to xenstore could be collected there > > and then you could have all XENBUS_DEVICEs using that common code via > > the class hierarchy? > > >=20 > I can have a look into this. We can probably start with 9p and gradually > graft all other devices to XENBUS device hierarchy. I don't think all > other PV devices are in dire need for this hierarchy at the moment. >=20 That may be true, but with the infrastructure in place in a common class (f= or things like manipulation of the xenbus state machine), I suspect the oth= er backends could be easily be ported over with a substantial reduction in = complexity and quantity of code. Paul > Wei. >=20 > > Paul