On 18/10/2023 16.11, Philippe Mathieu-Daudé wrote:
Hi,
This series ensure:
- qbus_new() and sysbus_init_mmio() are called *before*
a device is realized,
- sysbus_mmio_map() is called *after* it is realized.
First we fix some abuse, then we enforce in qdev/sysbus
core code.
I like the idea, and just had a try with "make check-qtest" with the
patches here, but seems like there are more spots that need attention:
10/433 qemu:qtest+qtest-ppc64 / qtest-ppc64/qom-test
ERROR 0.72s killed by signal 6 SIGABRT
>>> MALLOC_PERTURB_=217 QTEST_QEMU_IMG=./qemu-img
G_TEST_DBUS_DAEMON=/home/thuth/devel/qemu/tests/dbus-vmstate-daemon.sh
PYTHON=/home/thuth/tmp/qemu-build/pyvenv/bin/python3
QTEST_QEMU_STORAGE_DAEMON_BINARY=./storage-daemon/qemu-storage-daemon
QTEST_QEMU_BINARY=./qemu-system-ppc64
/home/thuth/tmp/qemu-build/tests/qtest/qom-test --tap -k
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
✀ ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
stderr:
qemu-system-ppc64: sysbus_mmio_map(type:power9_v2.2-pnv-chip, index:0,
addr:0x603fc00000000, prio:0) but object is not realized
Broken pipe
../../devel/qemu/tests/qtest/libqtest.c:203: kill_qemu() detected QEMU
death from signal 6 (Aborted) (core dumped)
(test program exited with status code -6)
TAP parsing error: Too few tests run (expected 17, got 0)