summaryrefslogtreecommitdiffstats
path: root/include/hw/pci
diff options
context:
space:
mode:
authorGreg Kurz2019-04-01 19:55:02 +0200
committerDavid Gibson2019-04-09 01:14:47 +0200
commit1c685a9026349752c3627aa24b090973e35b83c3 (patch)
tree8618f5915e18c85135e6b72507e1a300a6109e9a /include/hw/pci
parentMerge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (diff)
downloadqemu-1c685a9026349752c3627aa24b090973e35b83c3.tar.gz
qemu-1c685a9026349752c3627aa24b090973e35b83c3.tar.xz
qemu-1c685a9026349752c3627aa24b090973e35b83c3.zip
pci: Allow PCI bus subtypes to support extended config space accesses
Some PHB implementations, eg. PAPR used on pseries machine, act like a regular PCI bus rather than a PCIe bus, but allow access to the PCIe extended config space anyway. Introduce a new PCI bus class method to modelize this behaviour and use it when adjusting the config space size limit during accesses. No behaviour change for existing PCI bus types. Signed-off-by: Greg Kurz <groug@kaod.org> Message-Id: <155414130271.574858.4253514266378127489.stgit@bahia.lan> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'include/hw/pci')
-rw-r--r--include/hw/pci/pci.h2
-rw-r--r--include/hw/pci/pci_bus.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
index d87f5f93e9..0abb06b357 100644
--- a/include/hw/pci/pci.h
+++ b/include/hw/pci/pci.h
@@ -396,6 +396,8 @@ typedef PCIINTxRoute (*pci_route_irq_fn)(void *opaque, int pin);
bool pci_bus_is_express(PCIBus *bus);
bool pci_bus_is_root(PCIBus *bus);
+bool pci_bus_allows_extended_config_space(PCIBus *bus);
+
void pci_root_bus_new_inplace(PCIBus *bus, size_t bus_size, DeviceState *parent,
const char *name,
MemoryRegion *address_space_mem,
diff --git a/include/hw/pci/pci_bus.h b/include/hw/pci/pci_bus.h
index dfb75752cb..f6df834170 100644
--- a/include/hw/pci/pci_bus.h
+++ b/include/hw/pci/pci_bus.h
@@ -18,6 +18,7 @@ typedef struct PCIBusClass {
bool (*is_root)(PCIBus *bus);
int (*bus_num)(PCIBus *bus);
uint16_t (*numa_node)(PCIBus *bus);
+ bool (*allows_extended_config_space)(PCIBus *bus);
} PCIBusClass;
struct PCIBus {