From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roger Pau Monne Subject: Re: [PATCH v11 09/17] libxl: set nic type of stub to PV instead of copying from the parent Date: Tue, 24 Jul 2012 17:05:23 +0100 Message-ID: <500EC7C3.7090900@citrix.com> References: <1343064465-17864-1-git-send-email-roger.pau@citrix.com> <1343064465-17864-10-git-send-email-roger.pau@citrix.com> <20494.48841.830761.344513@mariner.uk.xensource.com> <1343143933.18971.40.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1343143933.18971.40.camel@zakaz.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 Campbell Cc: Ian Jackson , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org Ian Campbell wrote: > On Tue, 2012-07-24 at 16:27 +0100, Ian Jackson wrote: >> Roger Pau Monne writes ("[PATCH v11 09/17] libxl: set nic type of stub to PV instead of copying from the parent"): > >>> +{ >>> + const libxl_domain_build_info *b_info = &guest_config->b_info; >>> + int i; >>> + >>> + if (b_info->type != LIBXL_DOMAIN_TYPE_HVM) >>> + return ERROR_INVAL; >>> + >>> + for (i = 0; i < guest_config->num_nics; i++) { >>> + libxl_device_nic_init(&nic[i]); >>> + memcpy(&nic[i], &guest_config->nics[i], sizeof(nic[i])); >>> + nic[i].nictype = LIBXL_NIC_TYPE_VIF; >>> + nic[i].backend_domid = 0; >> As discussed, this should not be hardcoded to 0. > > Nor should the devid which was the next line which you trimmed: >>> + nic[i].devid = 0; I've reworked this on top of IanC patch, I'm only setting nictype to VIF.