On 08/03/2026 00.05, BALATON Zoltan wrote:
Use memory_region_init_rom() instead which is what other devices do.
This breaks migration but these devices are only used by sparc Sun
machines which have no migration compatibility guarantee.

Signed-off-by: BALATON Zoltan <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Reviewed-by: Akihiko Odaki <[email protected]>
---
...
diff --git a/hw/display/tcx.c b/hw/display/tcx.c
index 36cad82abd..16114b9bb8 100644
--- a/hw/display/tcx.c
+++ b/hw/display/tcx.c
@@ -756,8 +756,8 @@ static void tcx_initfn(Object *obj)
      SysBusDevice *sbd = SYS_BUS_DEVICE(obj);
      TCXState *s = TCX(obj);
- memory_region_init_rom_nomigrate(&s->rom, obj, "tcx.prom",
-                                     FCODE_MAX_ROM_SIZE, &error_fatal);
+    memory_region_init_rom(&s->rom, obj, "tcx.prom", FCODE_MAX_ROM_SIZE,
+                           &error_fatal);
      sysbus_init_mmio(sbd, &s->rom);

 Hi!

This unfortunately break the device-introspect-test in thorough mode:

 $ export QTEST_QEMU_BINARY=./qemu-system-sparc
 $ tests/qtest/device-introspect-test -m thorough
 ...
 # Testing device 'sun-tcx'
 RAMBlock "tcx.prom" already registered, abort!
 Broken pipe
 ../../devel/qemu/tests/qtest/libqtest.c:210: kill_qemu() detected QEMU
 death from signal 6 (Aborted) (core dumped)
 Aborted (core dumped)

Could you please have a look? I guess the memory_region_init_rom should rather be done from the realize() function instead of doing it in instance_init()?

 Thanks,
  Thomas


Reply via email to