xemu/include/hw/pci-host
Daniel Henrique Barboza 8ec1e4f1ef ppc/pnv: add phb-id/chip-id PnvPHB3RootBus properties
We rely on the phb-id and chip-id, which are PHB properties, to assign
chassis and slot to the root port. For default devices this is no big
deal: the root port is being created under pnv_phb_realize() and the
values are being passed on via the 'index' and 'chip-id' of the
pnv_phb_attach_root_port() helper.

If we want to implement user created root ports we have a problem. The
user created root port will not be aware of which PHB it belongs to,
unless we're willing to violate QOM best practices and access the PHB
via dev->parent_bus->parent. What we can do is to access the root bus
parent bus.

Since we're already assigning the root port as QOM child of the bus, and
the bus is initiated using PHB properties, let's add phb-id and chip-id
as properties of the bus. This will allow us trivial access to them, for
both user-created and default root ports, without doing anything too
shady with QOM.

Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Frederic Barrat <fbarrat@linux.ibm.com>
Message-Id: <20220811163950.578927-2-danielhb413@gmail.com>
2022-08-31 14:08:05 -03:00
..
designware.h nomaintainer: Fix Lesser GPL version number 2020-11-15 17:04:40 +01:00
dino.h dino: move from hw/hppa to hw/pci-host 2022-05-08 18:52:36 +01:00
gpex.h hw/pci-host/gpex: Don't fault for unmapped parts of MMIO and PIO windows 2021-04-30 11:16:52 +01:00
i440fx.h i386/pc: create pci-host qdev prior to pc_memory_init() 2022-07-26 10:40:58 -04:00
ls7a.h hw/loongarch: Change macro name 'LS7A_XXX' to 'VIRT_XXX' 2022-07-29 15:07:55 -07:00
mv64361.h hw/pci-host: Add emulation of Marvell MV64361 PPC system controller 2021-05-04 11:41:25 +10:00
pam.h hw/pci-host/pam: Replace magic number by PAM_REGIONS_COUNT definition 2020-12-13 17:07:05 +01:00
pnv_phb3.h ppc/pnv: add phb-id/chip-id PnvPHB3RootBus properties 2022-08-31 14:08:05 -03:00
pnv_phb3_regs.h ppc: Define SETFIELD for the ppc target 2022-07-06 10:22:38 -03:00
pnv_phb4.h ppc/pnv: remove PnvPHB4.version 2022-08-31 14:08:05 -03:00
pnv_phb4_regs.h ppc/pnv: Add support for PHB5 "Address-based trigger" mode 2022-03-02 06:51:39 +01:00
ppce500.h Clean up header guards that don't match their file name 2016-07-12 16:19:16 +02:00
q35.h hw/pci-host/pam: Replace magic number by PAM_REGIONS_COUNT definition 2020-12-13 17:07:05 +01:00
remote.h Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
sabre.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
spapr.h spapr: Adjust firmware path of PCI devices 2021-02-10 10:43:50 +11:00
uninorth.h uninorth: use qdev gpios for PCI IRQs 2020-10-18 16:21:42 +01:00
xilinx-pcie.h hw/mips/boston: Fix Lesser GPL version number 2020-11-03 16:51:13 +01:00