From e402463073ae51d00dc6cf98556e2f5c4b008a31 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Fri, 24 Jul 2015 10:35:13 +0200 Subject: 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 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 Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/boards.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/hw/boards.h b/include/hw/boards.h index 2aec9cb..3f84afd 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -100,7 +100,8 @@ struct MachineClass { no_cdrom:1, no_sdcard:1, has_dynamic_sysbus:1, - no_tco:1; + no_tco:1, + pci_allow_0_address:1; int is_default; const char *default_machine_opts; const char *default_boot_order; -- cgit v1.1