qemu-patch-raspberry4/include/hw/ppc
Greg Kurz cf36e5b376 ppc/xive: Rework setup of XiveSource::esb_mmio
Depending on whether XIVE is emultated or backed with a KVM XIVE device,
the ESB MMIOs of a XIVE source point to an I/O memory region or a mapped
memory region.

This is currently handled by checking kvm_irqchip_in_kernel() returns
false in xive_source_realize(). This is a bit awkward as we usually
need to do extra things when we're using the in-kernel backend, not
less. But most important, we can do better: turn the existing "xive.esb"
memory region into a plain container, introduce an "xive.esb-emulated"
I/O subregion and rename the existing "xive.esb" subregion in the KVM
code to "xive.esb-kvm". Since "xive.esb-kvm" is added with overlap
and a higher priority, it prevails over "xive.esb-emulated" (ie.
a guest using KVM XIVE will interact with "xive.esb-kvm" instead of
the default "xive.esb-emulated" region.

While here, consolidate the computation of the MMIO region size in
a common helper.

Suggested-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <159679992680.876294.7520540158586170894.stgit@bahia.lan>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2020-08-13 20:50:17 +10:00
..
fdt.h target/ppc: Pass cpu instead of env to ppc_create_page_sizes_prop() 2018-04-27 18:05:22 +10:00
mac_dbdma.h mac_dbdma: remove DBDMA_init() function 2017-09-27 13:05:41 +10:00
openpic.h hw/core: Move cpu.c, cpu.h from qom/ to hw/core/ 2019-08-21 13:24:01 +02:00
openpic_kvm.h openpic: move KVM-specific declarations into separate openpic_kvm.h file 2018-03-06 13:16:29 +11:00
pnv.h ppc/pnv: Create BMC devices only when defaults are enabled 2020-04-07 08:55:11 +10:00
pnv_core.h ppc/pnv: Add support for "hostboot" mode 2020-02-02 14:07:57 +11:00
pnv_homer.h ppc/pnv: Introduce PBA registers 2019-12-17 10:39:48 +11:00
pnv_lpc.h ppc/pnv: add a LPC Controller model for POWER10 2019-12-17 10:39:48 +11:00
pnv_occ.h ppc/pnv: Fix OCC common area region mapping 2019-12-17 10:39:48 +11:00
pnv_pnor.h ppc/pnv: fix check on return value of blk_getlength() 2020-01-08 12:01:14 +11:00
pnv_psi.h pnv/psi: Correct the pnv-psi* devices not to be sysbus devices 2020-06-15 21:36:21 +02:00
pnv_xive.h pnv/xive: Use device_class_set_parent_realize() 2020-01-08 11:01:59 +11:00
pnv_xscom.h ppc/pnv: Add models for POWER8 PHB3 PCIe Host bridge 2020-02-02 14:07:57 +11:00
ppc.h hw/ppc/prep: Remove the deprecated "prep" machine and the OpenHackware BIOS 2020-02-02 14:07:57 +11:00
ppc4xx.h ppc/{ppc440_bamboo, sam460ex}: use memdev for RAM 2020-02-19 16:50:00 +00:00
ppc_e500.h intc/openpic: Build openpic only once 2013-07-09 21:33:02 +02:00
spapr.h spapr: Add a new level of NUMA for GPUs 2020-07-20 09:21:39 +10:00
spapr_cpu_core.h ppc/spapr: Move GPRs setup to one place 2020-03-17 15:08:50 +11:00
spapr_drc.h spapr: Don't use spapr_drc_needed() in CAS code 2020-02-21 09:15:04 +11:00
spapr_irq.h spapr: Pass the maximum number of vCPUs to the KVM interrupt controller 2019-12-17 10:39:48 +11:00
spapr_nvdimm.h spapr: Add NVDIMM device support 2020-02-21 09:15:04 +11:00
spapr_ovec.h spapr: Rename DT functions to newer naming convention 2020-03-17 17:00:19 +11:00
spapr_rtas.h tests: add RTAS command in the protocol 2016-09-23 10:29:40 +10:00
spapr_tpm_proxy.h spapr: initial implementation for H_TPM_COMM/spapr-tpm-proxy 2019-08-21 17:17:12 +10:00
spapr_vio.h spapr: Implement get_dt_compatible() callback 2020-02-02 14:07:57 +11:00
spapr_xive.h spapr/xive: Use device_class_set_parent_realize() 2020-01-08 11:01:59 +11:00
xics.h ppc/pnv: Add models for POWER8 PHB3 PCIe Host bridge 2020-02-02 14:07:57 +11:00
xics_spapr.h spapr: Pass the maximum number of vCPUs to the KVM interrupt controller 2019-12-17 10:39:48 +11:00
xive.h ppc/xive: Rework setup of XiveSource::esb_mmio 2020-08-13 20:50:17 +10:00
xive_regs.h spapr: Fix typos in comments and macro indentation 2020-06-26 09:22:30 +10:00