Skip to contentSkip to conversation

hw/microblaze: Do not allow xlnx-zynqmp-pmu-soc to be created by the user

PATCH New Thomas Huth 1 participant 1 message Mar 22, 2024 Arm/Zynq architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/microblaze: Do not allow xlnx-zynqmp-pmu-soc to be created by the user

Using xlnx-zynqmp-pmu-soc on the command line causes QEMU to crash:

./qemu-system-microblazeel -M petalogix-ml605 -device xlnx-zynqmp-pmu-soc **
ERROR:tcg/tcg.c:813:tcg_register_thread: assertion failed: (n < tcg_max_ctxs) Bail out!
Aborted (core dumped)

Mark the device with "user_creatable = false" to avoid that this can happen.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2229

---
 hw/microblaze/xlnx-zynqmp-pmu.c | 2 ++
 1 file changed, 2 insertions(+)
hw/microblaze/xlnx-zynqmp-pmu.c +2 -0
index 5a2016672a..1bfc9641d2 100644
@@ -125,6 +125,8 @@ static void xlnx_zynqmp_pmu_soc_class_init(ObjectClass *oc, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(oc);
 
+    /* xlnx-zynqmp-pmu-soc causes crashes when cold-plugged twice */
+    dc->user_creatable = false;
     dc->realize = xlnx_zynqmp_pmu_soc_realize;
 }
 
Signature · 1 line
2.44.0