From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35835) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WmLf0-0001Q7-Gu for qemu-devel@nongnu.org; Mon, 19 May 2014 07:23:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WmLeu-0004KL-2o for qemu-devel@nongnu.org; Mon, 19 May 2014 07:23:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45574) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WmLet-0004KC-QK for qemu-devel@nongnu.org; Mon, 19 May 2014 07:23:08 -0400 Message-ID: <1400498570.32155.59.camel@nilsson.home.kraxel.org> From: Gerd Hoffmann Date: Mon, 19 May 2014 13:22:50 +0200 In-Reply-To: References: <1400237624-8505-1-git-send-email-tiejun.chen@intel.com> <1400237624-8505-5-git-send-email-tiejun.chen@intel.com> <1400481887.32155.34.camel@nilsson.home.kraxel.org> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [v2][PATCH 4/8] xen, gfx passthrough: reserve 00:02.0 for INTEL IGD List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Chen, Tiejun" Cc: "peter.maydell@linaro.org" , "xen-devel@lists.xensource.com" , "mst@redhat.com" , "jean.guyader@eu.citrix.com" , "stefano.stabellini@eu.citrix.com" , "Kay, Allen M" , "Kelly.Zytaruk@amd.com" , "qemu-devel@nongnu.org" , "Zhang, Yang Z" , "anthony@codemonkey.ws" , "anthony.perard@citrix.com" Hi, > I think '-vga none' just guarantees the qemu vga cards doesn't occupy > 00:02.0, but this doesn't mean others use this specific slot since in > qemu internal, we always pass -1 to assign a slot automatically to > register a PCI device. So in some cases, we can't get this slot as we > expect since that is already assigned previously before we need this. Yes, -vga, -net nic, -drive if=scsi (maybe more) can internally create pci devices with auto slot assignment, which will occupy slot 2 indeed. Use -device instead to create the devices. > PCI: slot 2 function 0 not available for xen-pci-passthrough, in use by xen-platform Ah, the xen platform device. /me looks. Ah, pc_xen_hvm_init creates this automatically. Two options here IMHO: (1) Just move it somewhere else explicitly. For example slot 3, or make it a southbridge function (say 00:01.7). (2) Don't create it automatically, instead expect management add it if needed, using -device xen-plaform,addr=... I personally would suggest to go for #2. As far I know the platform device is only needed if you want attach xenbus devices to the guest (correct?), so creating virtual machines without the xen platform device is a valid use case and you should allow it. cheers, Gerd