From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47382) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WlFn9-0004Mu-BY for qemu-devel@nongnu.org; Fri, 16 May 2014 06:55:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WlFn1-0001bQ-IP for qemu-devel@nongnu.org; Fri, 16 May 2014 06:55:07 -0400 Received: from mga01.intel.com ([192.55.52.88]:62789) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WlFn1-0001ab-DL for qemu-devel@nongnu.org; Fri, 16 May 2014 06:54:59 -0400 From: Tiejun Chen Date: Fri, 16 May 2014 18:53:40 +0800 Message-Id: <1400237624-8505-5-git-send-email-tiejun.chen@intel.com> In-Reply-To: <1400237624-8505-1-git-send-email-tiejun.chen@intel.com> References: <1400237624-8505-1-git-send-email-tiejun.chen@intel.com> Subject: [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: anthony.perard@citrix.com, stefano.stabellini@eu.citrix.com, mst@redhat.com, Kelly.Zytaruk@amd.com Cc: peter.maydell@linaro.org, xen-devel@lists.xensource.com, weidong.han@intel.com, allen.m.kay@intel.com, qemu-devel@nongnu.org, jean.guyader@eu.citrix.com, anthony@codemonkey.ws, yang.z.zhang@Intel.com Some VBIOSs and drivers assume the IGD BDF (bus:device:function) is always 00:02.0, so we need to reserves 00:02.0 for assigned IGD in guest. Signed-off-by: Tiejun Chen Signed-off-by: Yang Zhang --- v2: * Use a common way patch #2 introduce to reserve PCI devfn. hw/pci-host/piix.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c index ffdc853..b6f49bd 100644 --- a/hw/pci-host/piix.c +++ b/hw/pci-host/piix.c @@ -329,6 +329,14 @@ PCIBus *i440fx_init(PCII440FXState **pi440fx_state, s = PCI_HOST_BRIDGE(dev); b = pci_bus_new(dev, NULL, pci_address_space, address_space_io, 0, TYPE_PCI_BUS); + + /* + * Some video bioses and gfx drivers will assume the bdf of IGD is 00:02.0. + * So user need to set it to 00:02.0 in Xen configure file explicitly, + * otherwise IGD will fail to work. + */ + pci_reserve_pci_devfn(b, PCI_DEVFN(2, 0)); + s->bus = b; object_property_add_child(qdev_get_machine(), "i440fx", OBJECT(dev), NULL); qdev_init_nofail(dev); -- 1.9.1 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tiejun Chen Subject: [v2][PATCH 4/8] xen, gfx passthrough: reserve 00:02.0 for INTEL IGD Date: Fri, 16 May 2014 18:53:40 +0800 Message-ID: <1400237624-8505-5-git-send-email-tiejun.chen@intel.com> References: <1400237624-8505-1-git-send-email-tiejun.chen@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1400237624-8505-1-git-send-email-tiejun.chen@intel.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: anthony.perard@citrix.com, stefano.stabellini@eu.citrix.com, mst@redhat.com, Kelly.Zytaruk@amd.com Cc: peter.maydell@linaro.org, xen-devel@lists.xensource.com, weidong.han@intel.com, allen.m.kay@intel.com, qemu-devel@nongnu.org, jean.guyader@eu.citrix.com, anthony@codemonkey.ws, yang.z.zhang@Intel.com List-Id: xen-devel@lists.xenproject.org Some VBIOSs and drivers assume the IGD BDF (bus:device:function) is always 00:02.0, so we need to reserves 00:02.0 for assigned IGD in guest. Signed-off-by: Tiejun Chen Signed-off-by: Yang Zhang --- v2: * Use a common way patch #2 introduce to reserve PCI devfn. hw/pci-host/piix.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c index ffdc853..b6f49bd 100644 --- a/hw/pci-host/piix.c +++ b/hw/pci-host/piix.c @@ -329,6 +329,14 @@ PCIBus *i440fx_init(PCII440FXState **pi440fx_state, s = PCI_HOST_BRIDGE(dev); b = pci_bus_new(dev, NULL, pci_address_space, address_space_io, 0, TYPE_PCI_BUS); + + /* + * Some video bioses and gfx drivers will assume the bdf of IGD is 00:02.0. + * So user need to set it to 00:02.0 in Xen configure file explicitly, + * otherwise IGD will fail to work. + */ + pci_reserve_pci_devfn(b, PCI_DEVFN(2, 0)); + s->bus = b; object_property_add_child(qdev_get_machine(), "i440fx", OBJECT(dev), NULL); qdev_init_nofail(dev); -- 1.9.1