mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
ppc/pnv: Remove user-created PHB{3,4,5} devices
On a real system with POWER{8,9,10} processors, PHBs are sub-units of the processor, they can be deactivated by firmware but not plugged in or out like a PCI adapter on a slot. Nevertheless, having user-created PHBs in QEMU seemed to be a good idea for testing purposes : 1. having a limited set of PHBs speedups boot time. 2. it is useful to be able to mimic a partially broken topology you some time have to deal with during bring-up. PowerNV is also used for distro install tests and having libvirt support eases these tasks. libvirt prefers to run the machine with -nodefaults to be sure not to drag unexpected devices which would need to be defined in the domain file without being specified on the QEMU command line. For this reason : 3. -nodefaults should not include default PHBs User-created PHB{3,4,5} devices satisfied all these needs but reality proves to be a bit more complex, internally when modeling such devices, and externally when dealing with the user interface. Req 1. and 2. can be simply addressed differently with a machine option: "phb-mask=<uint>", which QEMU would use to enable/disable PHB device nodes when creating the device tree. For Req 3., we need to make sure we are taking the right approach. It seems that we should expose a new type of user-created PHB device, a generic virtualized one, that libvirt would use and not one depending on the processor revision. This needs more thinking. For now, remove user-created PHB{3,4,5} devices. All the cleanups we did are not lost and they will be useful for the next steps. Fixes:5bc67b052b
("ppc/pnv: Introduce user creatable pnv-phb4 devices") Fixes:1f6a88fffc
("ppc/pnv: Introduce support for user created PHB3 devices") Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: Frederic Barrat <fbarrat@linux.ibm.com> Signed-off-by: Cédric Le Goater <clg@kaod.org> Message-Id: <20220314130514.529931-1-clg@kaod.org> Signed-off-by: Cédric Le Goater <clg@kaod.org>
This commit is contained in:
parent
8e6f45cc3f
commit
9c10d86fee
5 changed files with 10 additions and 118 deletions
|
@ -120,6 +120,7 @@ static void pnv_pec_default_phb_realize(PnvPhb4PecState *pec,
|
|||
PnvPHB4 *phb = PNV_PHB4(qdev_new(pecc->phb_type));
|
||||
int phb_id = pnv_phb4_pec_get_phb_id(pec, stack_no);
|
||||
|
||||
object_property_add_child(OBJECT(pec), "phb[*]", OBJECT(phb));
|
||||
object_property_set_link(OBJECT(phb), "pec", OBJECT(pec),
|
||||
&error_abort);
|
||||
object_property_set_int(OBJECT(phb), "chip-id", pec->chip_id,
|
||||
|
@ -150,10 +151,8 @@ static void pnv_pec_realize(DeviceState *dev, Error **errp)
|
|||
pec->num_phbs = pecc->num_phbs[pec->index];
|
||||
|
||||
/* Create PHBs if running with defaults */
|
||||
if (defaults_enabled()) {
|
||||
for (i = 0; i < pec->num_phbs; i++) {
|
||||
pnv_pec_default_phb_realize(pec, i, errp);
|
||||
}
|
||||
for (i = 0; i < pec->num_phbs; i++) {
|
||||
pnv_pec_default_phb_realize(pec, i, errp);
|
||||
}
|
||||
|
||||
/* Initialize the XSCOM regions for the PEC registers */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue