aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc
diff options
context:
space:
mode:
authorCédric Le Goater <clg@kaod.org>2021-08-09 15:45:25 +0200
committerDavid Gibson <david@gibson.dropbear.id.au>2021-08-27 12:41:13 +1000
commitab17a3fe7454c61d358b5fd47c05336687b78690 (patch)
tree1ad5bbd6753992029c0f4bf5141fe63e08ab1595 /hw/ppc
parentc944a3ba7bae52512a8cb781a2e3ffe8c678fc9c (diff)
downloadqemu-ab17a3fe7454c61d358b5fd47c05336687b78690.zip
qemu-ab17a3fe7454c61d358b5fd47c05336687b78690.tar.gz
qemu-ab17a3fe7454c61d358b5fd47c05336687b78690.tar.bz2
ppc/pnv: Use a simple incrementing index for the chip-id
When the QEMU PowerNV machine was introduced, multi chip support modeled a two socket system with dual chip modules as found on some P8 Tuleta systems (8286-42A). But this is hardly used and not relevant for QEMU. Use a simple index instead. With this change, we can now increase the max socket number to 16 as found on high end systems. Signed-off-by: Cédric Le Goater <clg@kaod.org> Message-Id: <20210809134547.689560-5-clg@kaod.org> Reviewed-by: Greg Kurz <groug@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/ppc')
-rw-r--r--hw/ppc/pnv.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
index b122251..025f01c 100644
--- a/hw/ppc/pnv.c
+++ b/hw/ppc/pnv.c
@@ -809,9 +809,10 @@ static void pnv_init(MachineState *machine)
* TODO: should we decide on how many chips we can create based
* on #cores and Venice vs. Murano vs. Naples chip type etc...,
*/
- if (!is_power_of_2(pnv->num_chips) || pnv->num_chips > 4) {
+ if (!is_power_of_2(pnv->num_chips) || pnv->num_chips > 16) {
error_report("invalid number of chips: '%d'", pnv->num_chips);
- error_printf("Try '-smp sockets=N'. Valid values are : 1, 2 or 4.\n");
+ error_printf(
+ "Try '-smp sockets=N'. Valid values are : 1, 2, 4, 8 and 16.\n");
exit(1);
}
@@ -819,6 +820,7 @@ static void pnv_init(MachineState *machine)
for (i = 0; i < pnv->num_chips; i++) {
char chip_name[32];
Object *chip = OBJECT(qdev_new(chip_typename));
+ int chip_id = i;
pnv->chips[i] = PNV_CHIP(chip);
@@ -831,10 +833,9 @@ static void pnv_init(MachineState *machine)
&error_fatal);
}
- snprintf(chip_name, sizeof(chip_name), "chip[%d]", PNV_CHIP_HWID(i));
+ snprintf(chip_name, sizeof(chip_name), "chip[%d]", chip_id);
object_property_add_child(OBJECT(pnv), chip_name, chip);
- object_property_set_int(chip, "chip-id", PNV_CHIP_HWID(i),
- &error_fatal);
+ object_property_set_int(chip, "chip-id", chip_id, &error_fatal);
object_property_set_int(chip, "nr-cores", machine->smp.cores,
&error_fatal);
object_property_set_int(chip, "nr-threads", machine->smp.threads,