[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [v2][PATCH 4/8] xen, gfx passthrough: reserve 00:02.0 for INTEL IGD



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 <tiejun.chen@xxxxxxxxx>
Signed-off-by: Yang Zhang <yang.z.zhang@xxxxxxxxx>
---
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


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.