From: Blue Swirl Date: Tue, 26 Jan 2010 21:59:57 +0000 (+0000) Subject: PCI: fix bridge configuration X-Git-Tag: v0.13.0-rc0~1552 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=776e1bbb6cf4fe66a93c1a5dd814bbb650deca00;p=thirdparty%2Fqemu.git PCI: fix bridge configuration PCI bridges' qdev info structures must indicate bridge header type, otherwise critical bridge registers (esp. PCI_PRIMARY_BUS, PCI_SECONDARY_BUS, PCI_SUBORDINATE_BUS) will not be writable. Signed-off-by: Blue Swirl --- diff --git a/hw/apb_pci.c b/hw/apb_pci.c index a72c6568181..7f458c60da6 100644 --- a/hw/apb_pci.c +++ b/hw/apb_pci.c @@ -365,6 +365,7 @@ static PCIDeviceInfo pbm_pci_host_info = { .qdev.name = "pbm", .qdev.size = sizeof(PCIDevice), .init = pbm_pci_host_init, + .header_type = PCI_HEADER_TYPE_BRIDGE, }; static void pbm_register_devices(void) diff --git a/hw/grackle_pci.c b/hw/grackle_pci.c index ee4fed53ed0..f455c5991b1 100644 --- a/hw/grackle_pci.c +++ b/hw/grackle_pci.c @@ -181,6 +181,7 @@ static PCIDeviceInfo dec_21154_pci_host_info = { .qdev.name = "dec-21154", .qdev.size = sizeof(PCIDevice), .init = dec_21154_pci_host_init, + .header_type = PCI_HEADER_TYPE_BRIDGE, }; static void grackle_register_devices(void) diff --git a/hw/pci.c b/hw/pci.c index b83fd532bc8..023f7b6f4a7 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -1874,6 +1874,7 @@ static PCIDeviceInfo bridge_info = { .init = pci_bridge_initfn, .exit = pci_bridge_exitfn, .config_write = pci_bridge_write_config, + .header_type = PCI_HEADER_TYPE_BRIDGE, .qdev.props = (Property[]) { DEFINE_PROP_HEX32("vendorid", PCIBridge, vid, 0), DEFINE_PROP_HEX32("deviceid", PCIBridge, did, 0), diff --git a/hw/unin_pci.c b/hw/unin_pci.c index 3ae4e7a14d0..b8a805b7dfe 100644 --- a/hw/unin_pci.c +++ b/hw/unin_pci.c @@ -269,6 +269,7 @@ static PCIDeviceInfo dec_21154_pci_host_info = { .qdev.name = "dec-21154", .qdev.size = sizeof(PCIDevice), .init = dec_21154_pci_host_init, + .header_type = PCI_HEADER_TYPE_BRIDGE, }; static PCIDeviceInfo unin_agp_pci_host_info = {