From: Wei Liu Subject: Re: [PATCH] libxl: ignore run_hotplug_scripts setting when backend_domid!=0 Date: Thu, 4 Jul 2013 15:10:14 +0100 Message-ID: <20130704141014.GV7483@zion.uk.xensource.com> References: <20130409184101.07E2D52@duch.mimuw.edu.pl> <51D55F07.3010102@citrix.com> <51D56D32.20107@eu.citrix.com> <51D57767.60903@citrix.com> <20130704135151.GU7483@zion.uk.xensource.com> <51D58142.30700@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: <51D58142.30700@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: George Dunlap Cc: Marek Marczykowski , "xen-devel@lists.xen.org" , Wei Liu , Ian Campbell , Roger Pau =?iso-8859-1?Q?Monn=E9?= List-Id: xen-devel@lists.xenproject.org On Thu, Jul 04, 2013 at 03:05:54PM +0100, George Dunlap wrote: > On 04/07/13 14:51, Wei Liu wrote: > >On Thu, Jul 04, 2013 at 03:23:51PM +0200, Roger Pau Monn=E9 wrote: > >>On 04/07/13 14:40, George Dunlap wrote: > >>>On 04/07/13 12:39, Roger Pau Monn=E9 wrote: > >>>>On 04/07/13 12:42, George Dunlap wrote: > >>>>>On Tue, Apr 9, 2013 at 9:49 AM, Marek Marczykowski > >>>>> wrote: > >>>>>>Instead of forcing the user to change run_hotplug_scripts setting > >>>>>>globally, just ignore it for backends outside of dom0. > >>>>>> > >>>>>>Signed-off-by: Marek Marczykowski > >>>>>This seems like a good idea -- Roger / Ian, any thoughts? > >>>>We already have this behaviour in libxl (see > >>>>libxl_device.c:device_hotplug): > >>>> > >>>>/* > >>>> * If device is attached from a driver domain don't try to execute > >>>> * hotplug scripts > >>>> */ > >>>>if (aodev->dev->backend_domid !=3D LIBXL_TOOLSTACK_DOMID) > >>>> goto out; > >>>> > >>>>This was introduced by commit 05bfd984dfe7014f1f5ea1133608b9bab589c120 > >What Marek's patch does is effectively Roger's commit 05bfd984 plus some > >network specific bits. N.B. this patch predates 05bfd984. > > > >>>But you still get an error on domain creation if you actually set a > >>>non-dom0 backend and run_hotplug_scripts is set; so you can't actually > >>>run in "mixed mode" anyway. This patch should, I think, enable you to > >>>have libxl run the scripts in dom0, but udev run them in domu. > >Long time ago Konrad sent me an email about running network backend in > >another domain. The first thing to do is to disable hotplug script > >globally. > = > Sure, that's easy. The problem is, there's no reason to disable it > globally -- you can run udev in the domnet, but have libxl run the > scripts in dom0. > = > I'll try just taking out that check and seeing what happens... > = I'm not suggesting we disable it globally. I'm suggesting disabling hotplug script makes domnet work (whether globally or locally). Wei. > -George