Received: from eggs.gnu.org ([2001:4830:134:3::10]:41150) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPVnP-0002do-2T for qemu-devel@nongnu.org; Fri, 27 Sep 2013 07:01:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VPVnK-0002Pe-O5 for qemu-devel@nongnu.org; Fri, 27 Sep 2013 07:01:15 -0400 Received: from smtp02.citrix.com ([66.165.176.63]:56692) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPVnK-0002Np-JF for qemu-devel@nongnu.org; Fri, 27 Sep 2013 07:01:10 -0400 Date: Fri, 27 Sep 2013 12:01:08 +0100 From: Anthony PERARD Message-ID: <20130927110108.GK6013@perard.uk.xensource.com> References: <1379533858-7645-1-git-send-email-roger.pau@citrix.com> <20130926164630.GJ6013@perard.uk.xensource.com> <52446CDF.4070509@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <52446CDF.4070509@citrix.com> 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: Roger Pau =?iso-8859-1?Q?Monn=E9?= Cc: xen-devel@lists.xenproject.org, qemu-devel@nongnu.org, Stefano Stabellini On Thu, Sep 26, 2013 at 07:20:31PM +0200, Roger Pau Monné wrote: > 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? I have tried with the patch applied to libxl, and stubdom work fine with the changes to the xenstore paths. So, once the xen_backend.c file is in the new path, you can add my: Reviewed-by: Anthony PERARD -- Anthony PERARD