]> xenbits.xensource.com Git - qemu-xen-traditional.git/commitdiff
Revert "passthrough: Correctly expose PCH ISA bridge for IGD passthrough"
authorIan Jackson <ian.jackson@eu.citrix.com>
Mon, 25 Feb 2013 16:44:20 +0000 (16:44 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 25 Feb 2013 16:44:20 +0000 (16:44 +0000)
This reverts commit bd9e97271db5edc07e3e0d45bdf6ccd5a9bba3de.

Revert-requested-by: Jan Beulich <JBeulich@suse.com>
hw/pci.c
hw/pci.h
hw/pt-graphics.c

index d371bd78c539b83071b27fcd49e84adadbbf9270..f051de16956bade2d3dfd9bb1828c7c6172034c4 100644 (file)
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -871,6 +871,11 @@ void pci_unplug_netifs(void)
     }
 }
 
+typedef struct {
+    PCIDevice dev;
+    PCIBus *bus;
+} PCIBridge;
+
 void pci_bridge_write_config(PCIDevice *d,
                              uint32_t address, uint32_t val, int len)
 {
index c2acab9f1e4bd8c8d1e41a1d9771ed316805bd42..edc58b6663cbf298e71636177ea66e91ce380248 100644 (file)
--- a/hw/pci.h
+++ b/hw/pci.h
@@ -222,11 +222,6 @@ struct PCIDevice {
     int irq_state[4];
 };
 
-typedef struct {
-    PCIDevice dev;
-    PCIBus *bus;
-} PCIBridge;
-
 extern char direct_pci_str[];
 extern int direct_pci_msitranslate;
 extern int direct_pci_power_mgmt;
index 5d4cf4a9c8bcabd2e846b4c2c489a048a94e74c8..c6f886958d8445e49d8fdcdda7669adc51ed40b1 100644 (file)
@@ -3,7 +3,6 @@
  */
 
 #include "pass-through.h"
-#include "pci.h"
 #include "pci/header.h"
 #include "pci/pci.h"
 
@@ -41,26 +40,9 @@ void intel_pch_init(PCIBus *bus)
     did = pt_pci_host_read(pci_dev_1f, PCI_DEVICE_ID, 2);
     rid = pt_pci_host_read(pci_dev_1f, PCI_REVISION, 1);
 
-    if (vid == PCI_VENDOR_ID_INTEL) {
-        PCIBridge *s = (PCIBridge *)pci_register_device(bus, "intel_bridge_1f",
-                sizeof(PCIBridge), PCI_DEVFN(0x1f, 0), NULL, pci_bridge_write_config);
-
-        pci_config_set_vendor_id(s->dev.config, vid);
-        pci_config_set_device_id(s->dev.config, did);
-
-        s->dev.config[PCI_COMMAND] = 0x06; // command = bus master, pci mem
-        s->dev.config[PCI_COMMAND + 1] = 0x00;
-        s->dev.config[PCI_STATUS] = 0xa0; // status = fast back-to-back, 66MHz, no error
-        s->dev.config[PCI_STATUS + 1] = 0x00; // status = fast devsel
-        s->dev.config[PCI_REVISION] = rid;
-        s->dev.config[PCI_CLASS_PROG] = 0x00; // programming i/f
-        pci_config_set_class(s->dev.config, PCI_CLASS_BRIDGE_ISA);
-        s->dev.config[PCI_LATENCY_TIMER] = 0x10;
-        s->dev.config[PCI_HEADER_TYPE] = 0x80;
-        s->dev.config[PCI_SEC_STATUS] = 0xa0;
-
-        s->bus = pci_register_secondary_bus(&s->dev, pch_map_irq);
-    }
+    if ( vid == PCI_VENDOR_ID_INTEL )
+        pci_bridge_init(bus, PCI_DEVFN(0x1f, 0), vid, did, rid,
+                        pch_map_irq, "intel_bridge_1f");
 }
 
 uint32_t igd_read_opregion(struct pt_dev *pci_dev)