aboutsummaryrefslogtreecommitdiff
path: root/scripts/python_qmp_updater.py
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2025-01-20 08:07:05 +0100
committerThomas Huth <thuth@redhat.com>2025-01-22 08:28:49 +0100
commit807830e809bc684dc3344e78dd32f0cb6e5c6c37 (patch)
tree4b9452f32ceecbfab608eb5056bccf501117206a /scripts/python_qmp_updater.py
parent145f12ea885c8fcfbe2d0ac5230630f071b5a9fb (diff)
downloadqemu-807830e809bc684dc3344e78dd32f0cb6e5c6c37.zip
qemu-807830e809bc684dc3344e78dd32f0cb6e5c6c37.tar.gz
qemu-807830e809bc684dc3344e78dd32f0cb6e5c6c37.tar.bz2
hw/s390x: Fix crash that occurs when inspecting older versioned machines types
qemu-system-s390x currently crashes when trying to inspect older machines types, for example: $ echo '{ "execute": "qmp_capabilities" } { "execute": "qom-list-properties","arguments": { "typename": "s390-ccw-virtio-3.0-machine"}}' \ | ./qemu-system-s390x -qmp stdio -no-shutdown {"QMP": {"version": {"qemu": {"micro": 50, "minor": 2, "major": 9}, "package": "v9.2.0-1071-g81e97df3e7"}, "capabilities": ["oob"]}} {"return": {}} ** Bail out! ERROR:../target/s390x/cpu_models.c:832:s390_set_qemu_cpu_model: assertion failed: (QTAILQ_EMPTY_RCU(&cpus_queue)) Aborted (core dumped) The problem is that the versioned s390-ccw-virtio machine types use instance_init() to set global state that should be initialized before the CPUs get instantiated. But instance_init() is not called only for the machine that is finally used, it is also called for temporary instances of objects that are e.g. just created for introspection. That means that those instance_init() functions can also be called while a machine (and its CPUs) is already created, which triggers the assertion in cpu_models.c. So we must not use instance_init() for setting global state, but use the machine->init() function instead, which is really only called once when the machine comes to life. Fixes: 3b00f702c2 ("s390x/cpumodel: add zpci, aen and ais facilities") Message-ID: <20250120085059.239345-1-thuth@redhat.com> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'scripts/python_qmp_updater.py')
0 files changed, 0 insertions, 0 deletions