From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59301) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnLjZ-0000Xa-K9 for qemu-devel@nongnu.org; Thu, 22 May 2014 01:40:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WnLjU-0000ur-QQ for qemu-devel@nongnu.org; Thu, 22 May 2014 01:40:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38089) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnLjU-0000ua-Gq for qemu-devel@nongnu.org; Thu, 22 May 2014 01:40:00 -0400 Message-ID: <1400737176.25874.10.camel@nilsson.home.kraxel.org> From: Gerd Hoffmann Date: Thu, 22 May 2014 07:39:36 +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> <1400498570.32155.59.camel@nilsson.home.kraxel.org> <1400507431.32155.75.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" , "stefano.stabellini@eu.citrix.com" , "mst@redhat.com" , "Kay, Allen M" , "Kelly.Zytaruk@amd.com" , "qemu-devel@nongnu.org" , "Zhang, Yang Z" , "anthony@codemonkey.ws" , Anthony PERARD Hi, > > According to our discussions, I realize we may have some plans or policies > > dedicated to how to assign devfn, but to support GFX passthrough for XEN, I > > think currently it may be a better solution to adopt #1 simply like this: > > > > diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index eaf3e61..500b3c2 > > 100644 > > --- a/hw/i386/pc_piix.c > > +++ b/hw/i386/pc_piix.c > > @@ -386,7 +386,7 @@ static void pc_xen_hvm_init(QEMUMachineInitArgs > > *args) > > > > bus = pci_find_primary_bus(); > > if (bus != NULL) { > > - pci_create_simple(bus, -1, "xen-platform"); > > + pci_create_simple(bus, PCI_DEVFN(3,0), "xen-platform"); > > } > > } > > #endif > > > > Then we can go out to plan how to assign devfn in common, is this fine? Somewhere else in the thread someone listed a libxl config file snippet which is supposed to disable the xen platform device. Which doesn't work with upstream qemu for some reason. Searching ... ah, here: http://lists.gnu.org/archive/html/qemu-devel/2014-05/msg03996.html So, how about making "xen_platform_pci=0" working correctly ? Another useful thing would be to not create the xen platform device in case "-nodefaults" was specified on the command line (that switch turns off a bunch of other devices present by default: vga, nic, cdrom, ...). cheers, Gerd From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerd Hoffmann Subject: Re: [v2][PATCH 4/8] xen, gfx passthrough: reserve 00:02.0 for INTEL IGD Date: Thu, 22 May 2014 07:39:36 +0200 Message-ID: <1400737176.25874.10.camel@nilsson.home.kraxel.org> 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> <1400507431.32155.75.camel@nilsson.home.kraxel.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: 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: "Chen, Tiejun" Cc: "peter.maydell@linaro.org" , "xen-devel@lists.xensource.com" , "stefano.stabellini@eu.citrix.com" , "mst@redhat.com" , "Kay, Allen M" , "Kelly.Zytaruk@amd.com" , "qemu-devel@nongnu.org" , "Zhang, Yang Z" , "anthony@codemonkey.ws" , Anthony PERARD List-Id: xen-devel@lists.xenproject.org Hi, > > According to our discussions, I realize we may have some plans or policies > > dedicated to how to assign devfn, but to support GFX passthrough for XEN, I > > think currently it may be a better solution to adopt #1 simply like this: > > > > diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index eaf3e61..500b3c2 > > 100644 > > --- a/hw/i386/pc_piix.c > > +++ b/hw/i386/pc_piix.c > > @@ -386,7 +386,7 @@ static void pc_xen_hvm_init(QEMUMachineInitArgs > > *args) > > > > bus = pci_find_primary_bus(); > > if (bus != NULL) { > > - pci_create_simple(bus, -1, "xen-platform"); > > + pci_create_simple(bus, PCI_DEVFN(3,0), "xen-platform"); > > } > > } > > #endif > > > > Then we can go out to plan how to assign devfn in common, is this fine? Somewhere else in the thread someone listed a libxl config file snippet which is supposed to disable the xen platform device. Which doesn't work with upstream qemu for some reason. Searching ... ah, here: http://lists.gnu.org/archive/html/qemu-devel/2014-05/msg03996.html So, how about making "xen_platform_pci=0" working correctly ? Another useful thing would be to not create the xen platform device in case "-nodefaults" was specified on the command line (that switch turns off a bunch of other devices present by default: vga, nic, cdrom, ...). cheers, Gerd