aboutsummaryrefslogtreecommitdiff
path: root/hw/pci-host/pnv_phb4.c
diff options
context:
space:
mode:
authorDaniel Henrique Barboza <danielhb413@gmail.com>2022-08-11 13:39:40 -0300
committerDaniel Henrique Barboza <danielhb413@gmail.com>2022-08-31 14:08:05 -0300
commit8ec1e4f1ef974e901b416fef6c3b38a5cc2eeffa (patch)
treee660882ae6c079afa83378954345e83b79481255 /hw/pci-host/pnv_phb4.c
parente5ea94360eba4818467283a259d8d681f0da799f (diff)
downloadqemu-8ec1e4f1ef974e901b416fef6c3b38a5cc2eeffa.zip
qemu-8ec1e4f1ef974e901b416fef6c3b38a5cc2eeffa.tar.gz
qemu-8ec1e4f1ef974e901b416fef6c3b38a5cc2eeffa.tar.bz2
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>
Diffstat (limited to 'hw/pci-host/pnv_phb4.c')
0 files changed, 0 insertions, 0 deletions