qemu-patch-raspberry4/hw/ppc
Alexey Kardashevskiy 6c3829a265 spapr_pci: Advertise BAR reallocation capability
The pseries guests do not normally allocate PCI resources and rely on
the system firmware doing so. Furthermore at least at some point in
the past the pseries guests won't even allowed to change BARs, probably
it is still the case for phyp. So since the initial commit we have [1]
which prevents resource reallocation.

This is not a problem until we want specific BAR alignments, for example,
PAGE_SIZE==64k to make sure we can still map MMIO BARs directly. For
the boot time devices we handle this in SLOF [2] but since QEMU's RTAS
does not allocate BARs, the guest does this instead and does not align
BARs even if Linux is given pci=resource_alignment=16@pci:0:0 as
PCI_PROBE_ONLY makes Linux ignore alignment requests.

ARM folks added a dial to control PCI_PROBE_ONLY via the device tree [3].
This makes use of the dial to advertise to the guest that we can handle
BAR reassignments. This limits the change to the latest pseries machine
to avoid old guests explosion.

We do not remove the flag from [1] as pseries guests are still supported
under phyp so having that removed may cause problems.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/powerpc/platforms/pseries/setup.c?h=v5.1#n773
[2] https://git.qemu.org/?p=SLOF.git;a=blob;f=board-qemu/slof/pci-phb.fs;h=06729bcf77a0d4e900c527adcd9befe2a269f65d;hb=HEAD#l338
[3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f81c11af
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Message-Id: <20190719043734.108462-1-aik@ozlabs.ru>
Reviewed-by: Greg Kurz <groug@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-08-29 09:46:07 +10:00
..
e500-ccsr.h ppc: do not use ../ in include files 2013-03-01 13:57:33 +01:00
e500.c sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
e500.h platform-bus-device: use device plug callback instead of machine_done notifier 2018-05-10 18:10:56 +01:00
e500plat.c Include hw/boards.h a bit less 2019-08-16 13:31:53 +02:00
fdt.c target/ppc: Split page size information into a separate allocation 2018-04-27 18:05:22 +10:00
fw_cfg.c hw/ppc: Implement fw_cfg_arch_key_name() 2019-05-23 14:10:31 +02:00
Kconfig spapr/xive: add KVM support 2019-05-29 11:39:45 +10:00
mac.h ide: Include hw/ide/internal a bit less outside hw/ide/ 2019-08-16 13:31:52 +02:00
mac_newworld.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
mac_oldworld.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
Makefile.objs spapr: initial implementation for H_TPM_COMM/spapr-tpm-proxy 2019-08-21 17:17:12 +10:00
mpc8544_guts.c sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
mpc8544ds.c Include hw/boards.h a bit less 2019-08-16 13:31:53 +02:00
pnv.c ppc/pnv: Introduce PowerNV machines with fixed CPU models 2019-08-29 09:45:53 +10:00
pnv_bmc.c Clean up inclusion of sysemu/sysemu.h 2019-08-16 13:31:53 +02:00
pnv_core.c Clean up inclusion of sysemu/sysemu.h 2019-08-16 13:31:53 +02:00
pnv_lpc.c Clean up inclusion of sysemu/sysemu.h 2019-08-16 13:31:53 +02:00
pnv_occ.c Clean up inclusion of sysemu/sysemu.h 2019-08-16 13:31:53 +02:00
pnv_psi.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
pnv_xscom.c ppc/pnv: add more dummy XSCOM addresses for the P9 CAPP 2019-08-29 09:45:18 +10:00
ppc.c migration: Do not re-read the clock on pre_save in case of paused guest 2019-08-21 17:17:11 +10:00
ppc4xx_devs.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
ppc4xx_pci.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
ppc405.h ppc4xx: Export ECB and PLB emulation 2017-09-08 09:30:55 +10:00
ppc405_boards.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
ppc405_uc.c Include hw/boards.h a bit less 2019-08-16 13:31:53 +02:00
ppc440.h ppc440_uc: Basic emulation of PPC440 DMA controller 2018-07-03 09:56:52 +10:00
ppc440_bamboo.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
ppc440_pcix.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
ppc440_uc.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
ppc_booke.c sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
ppce500_spin.c Clean up inclusion of sysemu/sysemu.h 2019-08-16 13:31:53 +02:00
prep.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
prep_systemio.c sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
rs6000_mc.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
sam460ex.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
spapr.c spapr_pci: Advertise BAR reallocation capability 2019-08-29 09:46:07 +10:00
spapr_caps.c ppc: fix memory leak in spapr_caps_add_properties 2019-08-21 17:17:11 +10:00
spapr_cpu_core.c pseries: Fix compat_pvr on reset 2019-08-29 09:46:07 +10:00
spapr_drc.c ppc: fix memory leak in spapr_dt_drc() 2019-08-21 17:17:11 +10:00
spapr_events.c spapr_events: Rewrite a fall through comment 2019-08-21 10:59:10 +02:00
spapr_hcall.c spapr: Use SHUTDOWN_CAUSE_SUBSYSTEM_RESET for CAS reboots 2019-08-29 09:46:07 +10:00
spapr_iommu.c spapr_iommu: Fix xlate trace to print translated address 2019-08-21 11:32:11 +10:00
spapr_irq.c spapr/irq: Drop spapr_irq_msi_reset() 2019-08-21 17:17:39 +10:00
spapr_ovec.c Include migration/vmstate.h less 2019-08-16 13:31:52 +02:00
spapr_pci.c spapr_pci: remove all child functions in function zero unplug 2019-08-29 09:46:07 +10:00
spapr_pci_nvlink2.c spapr: Support NVIDIA V100 GPU with NVLink2 2019-04-26 10:41:23 +10:00
spapr_pci_vfio.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
spapr_rng.c Clean up inclusion of sysemu/sysemu.h 2019-08-16 13:31:53 +02:00
spapr_rtas.c powerpc/spapr: Add host threads parameter to ibm,get_system_parameter 2019-08-29 09:46:07 +10:00
spapr_rtas_ddw.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
spapr_rtc.c Include migration/vmstate.h less 2019-08-16 13:31:52 +02:00
spapr_tpm_proxy.c spapr: initial implementation for H_TPM_COMM/spapr-tpm-proxy 2019-08-21 17:17:12 +10:00
spapr_vio.c Clean up inclusion of sysemu/sysemu.h 2019-08-16 13:31:53 +02:00
trace-events spapr: initial implementation for H_TPM_COMM/spapr-tpm-proxy 2019-08-21 17:17:12 +10:00
virtex_ml507.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00