From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36255) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPFFW-0005b5-7J for qemu-devel@nongnu.org; Thu, 26 Sep 2013 13:21:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VPFFQ-0007yL-5k for qemu-devel@nongnu.org; Thu, 26 Sep 2013 13:21:10 -0400 Received: from smtp.citrix.com ([66.165.176.89]:48021) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPFFP-0007xl-Q2 for qemu-devel@nongnu.org; Thu, 26 Sep 2013 13:21:04 -0400 Message-ID: <52446CDF.4070509@citrix.com> Date: Thu, 26 Sep 2013 19:20:31 +0200 From: =?ISO-8859-1?Q?Roger_Pau_Monn=E9?= MIME-Version: 1.0 References: <1379533858-7645-1-git-send-email-roger.pau@citrix.com> <20130926164630.GJ6013@perard.uk.xensource.com> In-Reply-To: <20130926164630.GJ6013@perard.uk.xensource.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH] qemu-xen: make use of xenstore relative paths List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony PERARD Cc: xen-devel@lists.xenproject.org, qemu-devel@nongnu.org, Stefano Stabellini On 26/09/13 18:46, Anthony PERARD wrote: > On Wed, Sep 18, 2013 at 09:50:58PM +0200, Roger Pau Monne wrote: >> Qemu has several hardcoded xenstore paths that are only valid on Dom0. >> Attempts to launch a Qemu instance (to act as a userspace backend for >> PV disks) will fail because Qemu is not able to access those paths >> when running on a domain different than Dom0. >> >> Instead make the xenstore paths relative to the domain where Qemu is >> actually running. >> >> Signed-off-by: Roger Pau Monné >> Cc: xen-devel@lists.xenproject.org >> Cc: Anthony PERARD >> Cc: Stefano Stabellini > > This look fine. One issue with the patch: the file xen_backend.c have > been moved to hw/xen/xen_backend.c. Thanks, this is based on the stable Qemu version in Xen tree, I should have done the change on top of the main qemu.git repo. > I've also tryied it in a stubdomain, and it does not boot anymore > because the qemu in the stubdom can not read the state. I have tried > again without the change in xen-all.c, and the stubdom does not complain > anymore. So in the change in xenstore_record_dm_state() needed as well? Yes, if we run a Qemu instance inside a driver domain it wouldn't make much sense IMHO to write the state of that Qemu instance on a xenstore path that belongs to the Dom0, and also we would need to give the driver domain permissions to write on a xenstore path that's inside the Dom0 xenstore path, which doesn't seem like a good idea. To make Qemu work on a domain different than Dom0 you will also need the following patch from my driver domain series: http://marc.info/?l=xen-devel&m=137993233817018 If not the guest is unable to create the device-model//state xenstore entry. For stubdomains would it be really hard to change the Dom0 to check for /local/domain//device-model//state instead of /local/domain/0/device-model//state?