From: Ian Campbell Subject: Re: [PATCH] libxl: fix vif.ifname when used with stub device model Date: Fri, 20 Jul 2012 15:17:39 +0100 Message-ID: <1342793859.26734.118.camel@zakaz.uk.xensource.com> References: <79cfa1892a5d55f2c137.1342792268@cosworth.uk.xensource.com> <20489.26066.19407.750087@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20489.26066.19407.750087@mariner.uk.xensource.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: Ian Jackson Cc: Roger Pau Monne , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Fri, 2012-07-20 at 15:06 +0100, Ian Jackson wrote: > Ian Campbell writes ("[PATCH] libxl: fix vif.ifname when used with stub device model"): > > libxl: fix vif.ifname when used with stub device model. > > > > Currently the same libxl_device_nic is used to create both the HVM domain and > > its stub domain's NICs. This means that if a vifname is provided both the HVM > > domains PV NIC and the stub domains PV NIC will get the same name and the > > DM's NIC will fail to be attached. > > > > Instead launder the libxl_device_nic to add the TAP_DEVICE_SUFFIX ("-emu"). > > This is a bit of a misnomer, since the device is actually PV, but it is used to > > "back" the emulated device in the stub domain and this naming scheme is > > consistent with the non-stub case and is known to work e.g. with our hotplug > > scripts. > > Acked-by: Ian Jackson > > as far as it goes. > > However I think this is related to Roger's: > [PATCH v9 12/17] libxl: set correct nic type depending on the guest > > Shouldn't the type field for the nics to be given to the stub dm be > forced to VIF ? I should imagine so, although it's somewhat orthogonal other than both involve frobbing the DM's NIC config. I presume that in practice PV guests can't have an EMU path and therefore the two NIC types collapse into the same thing, although there's no harm being explicit I suppose.