From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45763) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzdGv-0008TY-Sn for qemu-devel@nongnu.org; Tue, 24 Jun 2014 22:49:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WzdGl-0007C1-Si for qemu-devel@nongnu.org; Tue, 24 Jun 2014 22:49:17 -0400 Received: from mga09.intel.com ([134.134.136.24]:6480) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzdGl-0007Bt-NZ for qemu-devel@nongnu.org; Tue, 24 Jun 2014 22:49:07 -0400 Message-ID: <53AA389D.3010709@intel.com> Date: Wed, 25 Jun 2014 10:49:01 +0800 From: "Chen, Tiejun" MIME-Version: 1.0 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> <1400498570.32155.59.camel@nilsson.home.kraxel.org> In-Reply-To: <1400498570.32155.59.camel@nilsson.home.kraxel.org> Content-Type: text/plain; charset=UTF-8; format=flowed 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: Gerd Hoffmann 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" On 2014/5/19 19:22, Gerd Hoffmann wrote: > 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=... > Gerd, Sorry I return this discussion again. As we discussed here, we should never use -vga xxx to avoid occupying slot 2. Instead, we will just use -device to create that emulated vga device as you said like this: -device VGA,vgamem_mb=8,addr=0x4 But looks this may issue another problem. That is we can't see anything until the vga driver is initialized. I means if we pass `-device VGA,vgamem_mb=8,addr=0x4', qemu doesn't expose any vga interface to BIOS. Right? Or I'm still missing something. Thanks Tiejun From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Chen, Tiejun" Subject: Re: [v2][PATCH 4/8] xen, gfx passthrough: reserve 00:02.0 for INTEL IGD Date: Wed, 25 Jun 2014 10:49:01 +0800 Message-ID: <53AA389D.3010709@intel.com> 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> <1400498570.32155.59.camel@nilsson.home.kraxel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1400498570.32155.59.camel@nilsson.home.kraxel.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org To: Gerd Hoffmann 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" List-Id: xen-devel@lists.xenproject.org On 2014/5/19 19:22, Gerd Hoffmann wrote: > 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=... > Gerd, Sorry I return this discussion again. As we discussed here, we should never use -vga xxx to avoid occupying slot 2. Instead, we will just use -device to create that emulated vga device as you said like this: -device VGA,vgamem_mb=8,addr=0x4 But looks this may issue another problem. That is we can't see anything until the vga driver is initialized. I means if we pass `-device VGA,vgamem_mb=8,addr=0x4', qemu doesn't expose any vga interface to BIOS. Right? Or I'm still missing something. Thanks Tiejun