From patchwork Thu Nov 20 16:14:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 41247 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f70.google.com (mail-ee0-f70.google.com [74.125.83.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9BCEB23C27 for ; Thu, 20 Nov 2014 16:17:03 +0000 (UTC) Received: by mail-ee0-f70.google.com with SMTP id b57sf2288800eek.9 for ; Thu, 20 Nov 2014 08:17:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:date:from:to:in-reply-to:message-id :references:user-agent:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-post:list-help:list-subscribe:content-type :content-transfer-encoding:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:list-archive; bh=qf1yaqKGVn1jvvz7jp+jeLWyZE27AdJ1FOqyrT99EoE=; b=YHl1O2mptTHhuaLmF+Uh12WsVGZ92ynqZM4i0bgh9JxXR4yHupfWaUFUWsnKZMRuAG Am3Ngyey617kW9ZX8sYUD4HKVAvEgC14v9XDNg5Rcu1XLR2ZWAHFAvhBR7xj+gEAHx8g woOQGcD3r1byvqJdOb39GC2RzfJ+VS2+L/U9uZMCrR5ktP2C9nYIJ9VTVALku2bSQ37l QGJkzdBPMLjG4dmcm2mLIa88t/++ey7DhnnYkjKCNC+haROjUFhQOFZ8kVz1BOOmsiry 3eLUYPHP6d0AppVOjRABuAr2P7Yc0Ls4ac4dl36s0+1m0nUjhTYB6flVMQDB2WaScGdM 1GKQ== X-Gm-Message-State: ALoCoQkSuGMxqjwMFzpeO8ULDU642zsU1Cmqx1MYSGFBW2TvFQ6G6lZgGUEemSI97KOxmB+PyUCR X-Received: by 10.180.189.116 with SMTP id gh20mr3100085wic.2.1416500222835; Thu, 20 Nov 2014 08:17:02 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.8.68 with SMTP id p4ls84676laa.52.gmail; Thu, 20 Nov 2014 08:17:02 -0800 (PST) X-Received: by 10.112.24.130 with SMTP id u2mr12025082lbf.57.1416500222473; Thu, 20 Nov 2014 08:17:02 -0800 (PST) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com. [209.85.215.50]) by mx.google.com with ESMTPS id p10si2431332lap.125.2014.11.20.08.17.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Nov 2014 08:17:02 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) client-ip=209.85.215.50; Received: by mail-la0-f50.google.com with SMTP id pv20so2679180lab.37 for ; Thu, 20 Nov 2014 08:17:02 -0800 (PST) X-Received: by 10.112.52.37 with SMTP id q5mr11886177lbo.32.1416500215257; Thu, 20 Nov 2014 08:16:55 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp289478lbc; Thu, 20 Nov 2014 08:16:54 -0800 (PST) X-Received: by 10.220.196.83 with SMTP id ef19mr1906011vcb.5.1416500213860; Thu, 20 Nov 2014 08:16:53 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id vu5si1001946vcb.70.2014.11.20.08.16.52 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 20 Nov 2014 08:16:53 -0800 (PST) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XrUO9-00086m-0Y; Thu, 20 Nov 2014 16:15:21 +0000 Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XrUO8-00086X-1a; Thu, 20 Nov 2014 16:15:20 +0000 Received: from [85.158.143.35] by server-2.bemta-4.messagelabs.com id A5/62-25276-7931E645; Thu, 20 Nov 2014 16:15:19 +0000 X-Env-Sender: Stefano.Stabellini@citrix.com X-Msg-Ref: server-6.tower-21.messagelabs.com!1416500114!14147022!1 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n X-StarScan-Received: X-StarScan-Version: 6.12.4; banners=-,-,- X-VirusChecked: Checked Received: (qmail 4579 invoked from network); 20 Nov 2014 16:15:18 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-6.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 20 Nov 2014 16:15:18 -0000 X-IronPort-AV: E=Sophos;i="5.07,424,1413244800"; d="scan'208";a="194861237" Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.80) with Microsoft SMTP Server id 14.3.181.6; Thu, 20 Nov 2014 11:15:13 -0500 Received: from kaball.uk.xensource.com ([10.80.2.59]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1XrUO1-00068m-8H; Thu, 20 Nov 2014 16:15:13 +0000 Date: Thu, 20 Nov 2014 16:14:51 +0000 From: Stefano Stabellini X-X-Sender: sstabellini@kaball.uk.xensource.com To: Ian Campbell In-Reply-To: <1416494946.14429.13.camel@citrix.com> Message-ID: References: <1ac72b0.26f7c.149ae18f6bb.Coremail.hanyandong@iie.ac.cn> <1415967767.7113.19.camel@citrix.com> <1416217990.27385.10.camel@citrix.com> <1416474814.29243.59.camel@citrix.com> <1416483731.14429.8.camel@citrix.com> <1416494946.14429.13.camel@citrix.com> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 X-DLP: MIA1 Cc: Wei Liu , Stefano Stabellini , Ian Jackson , xen-devel , Jim Fehlig , Anthony Perard , xen-users@lists.xen.org, hanyandong Subject: Re: [Xen-devel] Number of NICs per VM with qemu-upstream (Was: Re: Re: [Xen-users] libvirt /usr/local/lib/xen/bin/qemu-dm did not work on xen-4.4) X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: stefano.stabellini@eu.citrix.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: On Thu, 20 Nov 2014, Ian Campbell wrote: > On Thu, 2014-11-20 at 14:46 +0000, Stefano Stabellini wrote: > > On Thu, 20 Nov 2014, Ian Campbell wrote: > > > There is, it's the romfile option to -device e.g. > > > -device $NICMODEL,vlan=0,romfile=$ROMFILE > > > > > > where NICMODEL is e100, rtl8139, virtio-blah > > > and ROMFILE is e.g. an ipxe binary. > > > > I think that option was intended to point QEMU to a different file, not > > to disable the romfile. > > romfile="" does that, I think. Or use /dev/null etc etc. Confirmed working. --- libxl: do not load roms for any NICs except the first to avoid wasting memory Signed-off-by: Stefano Stabellini diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c index 3e191c3..f907ca9 100644 --- a/tools/libxl/libxl_dm.c +++ b/tools/libxl/libxl_dm.c @@ -674,9 +674,10 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc, LIBXL_NIC_TYPE_VIF_IOEMU); flexarray_append(dm_args, "-device"); flexarray_append(dm_args, - libxl__sprintf(gc, "%s,id=nic%d,netdev=net%d,mac=%s", + libxl__sprintf(gc, "%s,id=nic%d,netdev=net%d,mac=%s%s", nics[i].model, nics[i].devid, - nics[i].devid, smac)); + nics[i].devid, smac, + i ? ",romfile=\"\"" : "")); flexarray_append(dm_args, "-netdev"); flexarray_append(dm_args, GCSPRINTF( "type=tap,id=net%d,ifname=%s,"