summaryrefslogtreecommitdiffstats
path: root/hw/ppc
diff options
context:
space:
mode:
authorLaurent Vivier <lvivier@redhat.com>2015-07-24 10:35:13 +0200
committerMichael S. Tsirkin <mst@redhat.com>2015-08-13 14:08:29 +0300
commite402463073ae51d00dc6cf98556e2f5c4b008a31 (patch)
tree2f1d897da56da6ee0b038c6285378d9ecce88391 /hw/ppc
parentc8d163bc9e037ec32b2250b2d7950b1d1bc3fd61 (diff)
downloadhqemu-e402463073ae51d00dc6cf98556e2f5c4b008a31.zip
hqemu-e402463073ae51d00dc6cf98556e2f5c4b008a31.tar.gz
pci: allow 0 address for PCI IO/MEM regions
Some kernels program a 0 address for io regions. PCI 3.0 spec section 6.2.5.1 doesn't seem to disallow this. based on patch by Michael Roth <mdroth@linux.vnet.ibm.com> Add pci_allow_0_addr in MachineClass to conditionally allow addr 0 for pseries, as this can break other architectures. This patch allows to hotplug PCI card in pseries machine, as the first added card BAR0 is always set to 0 address. This as a temporary hack, waiting to fix PCI memory priorities for more machine types... Signed-off-by: Laurent Vivier <lvivier@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/ppc')
-rw-r--r--hw/ppc/spapr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index a6f1947..bf0c64f 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -1835,6 +1835,7 @@ static void spapr_machine_class_init(ObjectClass *oc, void *data)
mc->default_ram_size = 512 * M_BYTE;
mc->kvm_type = spapr_kvm_type;
mc->has_dynamic_sysbus = true;
+ mc->pci_allow_0_address = true;
fwc->get_dev_path = spapr_get_fw_dev_path;
nc->nmi_monitor_handler = spapr_nmi;
OpenPOWER on IntegriCloud