Skip to contentSkip to conversation

ppc/pnv: Make PSI device types not user creatable

PATCH Applied Greg Kurz 2 participants 2 messages Jul 7, 2020 – Jul 8, 2020

lore
Share & tools
lore

Greg Kurz

author
#0 lore raw

PATCH 1/1 ppc/pnv: Make PSI device types not user creatable

QEMU aborts with -device pnv-psi-POWER8:

$ qemu-system-ppc64 -device pnv-psi-POWER8
qemu-system-ppc64: hw/intc/xics.c:605: ics_realize: Assertion
`ics->xics' failed.
Aborted (core dumped)

The Processor Service Interface Controller is an internal device. It should only be instantiated by the chip, which takes care of configuring the link required by the ICS object in the case of POWER8. It doesn't make sense for a user to specify it on the command line.

Note that the PSI model for POWER8 was added 3 yrs ago but the devices weren't available on the command line because of a bug that was fixed by recent commit 2f35254aa0 ("pnv/psi: Correct the pnv-psi* devices not to be sysbus devices").

Fixes 54f59d786c ("ppc/pnv: Add cut down PSI bridge model and hookup external interrupt")
---
 hw/ppc/pnv_psi.c |    1 +
 1 file changed, 1 insertion(+)
hw/ppc/pnv_psi.c +1 -0
index 75b8ae9703d0..653b41774c34 100644
@@ -937,6 +937,7 @@ static void pnv_psi_class_init(ObjectClass *klass, void *data)
     dc->desc = "PowerNV PSI Controller";
     device_class_set_props(dc, pnv_psi_properties);
     dc->reset = pnv_psi_reset;
+    dc->user_creatable = false;
 }
 
 static const TypeInfo pnv_psi_info = {
Applied
#1 lore raw
Quoted 13 lines · Greg Kurz

QEMU aborts with -device pnv-psi-POWER8:

$ qemu-system-ppc64 -device pnv-psi-POWER8
qemu-system-ppc64: hw/intc/xics.c:605: ics_realize: Assertion
`ics->xics' failed.
Aborted (core dumped)

The Processor Service Interface Controller is an internal device. It should only be instantiated by the chip, which takes care of configuring the link required by the ICS object in the case of POWER8. It doesn't make sense for a user to specify it on the command line.

Quoted 8 lines

Note that the PSI model for POWER8 was added 3 yrs ago but the devices weren't available on the command line because of a bug that was fixed by recent commit 2f35254aa0 ("pnv/psi: Correct the pnv-psi* devices not to be sysbus devices").

Fixes 54f59d786c ("ppc/pnv: Add cut down PSI bridge model and hookup external interrupt")

Applied to ppc-for-5.1.

Quoted 18 lines
---
 hw/ppc/pnv_psi.c |    1 +
 1 file changed, 1 insertion(+)
hw/ppc/pnv_psi.c +1 -0
index 75b8ae9703d0..653b41774c34 100644
@@ -937,6 +937,7 @@ static void pnv_psi_class_init(ObjectClass *klass, void *data)
     dc->desc = "PowerNV PSI Controller";
     device_class_set_props(dc, pnv_psi_properties);
     dc->reset = pnv_psi_reset;
+    dc->user_creatable = false;
 }
 
 static const TypeInfo pnv_psi_info = {
Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson