[Qemu-devel] [PULL v2 00/11] Fix device introspection regressions
QMP command device-list-properties regressed in 2.1: it can crash or leave dangling pointers behind. -device FOO,help regressed in 2.2: it no longer works for non-pluggable devices. I tried to fix that some time ago[*], but my fix failed review. This is my second, more comprehensive try. PATCH 1-4 fix two classes of bugs involved in the regressions, PATCH 5-6 are libqtest preliminaries, PATCH 7 adds tests to demonstrate the remaining bugs, PATCH 8-10 fix them to a degree (see PATCH 8 for limitations), and PATCH 11 cleans up. v2: * PATCH 01: new * PATCH 08,10: Drop all changes for devices "sclp" and "s390-sclp-event-facility", because they've been fixed in master The following changes since commit fb6345f452ba7cefb395389abb17d0af0e42c54b: Merge remote-tracking branch 'remotes/ehabkost/tags/numa-pull-request' into staging (2015-10-08 11:28:17 +0100) are available in the git repository at: git://repo.or.cz/qemu/armbru.git tags/pull-monitor-2015-10-08 for you to fetch changes up to 62ddbd770b583ee98fe648c19ea2ec5e0625fe4a: Revert "qdev: Use qdev_get_device_class() for -device ,help" (2015-10-08 14:36:36 +0200) Fix device introspection regressions Markus Armbruster (8): virtio-input: Fix device introspection on non-Linux hosts tests: Fix how qom-test is run libqtest: Clean up unused QTestState member sigact_old libqtest: New hmp() & friends device-introspect-test: New, covering device introspection qmp: Fix device-list-properties not to crash for abstract device qdev: Protect device-list-properties against broken devices Revert "qdev: Use qdev_get_device_class() for -device ,help" Paolo Bonzini (3): memory: allow destroying a non-empty MemoryRegion hw: do not pass NULL to memory_region_init from instance_init macio: move DBDMA_init from instance_init to realize hw/arm/allwinner-a10.c | 6 ++ hw/arm/digic.c | 6 ++ hw/arm/fsl-imx25.c | 6 ++ hw/arm/fsl-imx31.c | 6 ++ hw/arm/pxa2xx.c| 2 +- hw/arm/xlnx-zynqmp.c | 6 ++ hw/display/cg3.c | 4 +- hw/display/tcx.c | 2 +- hw/input/Makefile.objs | 2 +- hw/misc/arm_integrator_debug.c | 2 +- hw/misc/macio/cuda.c | 2 +- hw/misc/macio/macio.c | 14 ++--- hw/pci-host/versatile.c| 11 hw/pcmcia/pxa2xx.c | 6 +- hw/virtio/virtio-pci.c | 20 --- hw/virtio/virtio-pci.h | 4 ++ include/hw/qdev-core.h | 13 + memory.c | 17 +- qdev-monitor.c | 9 ++- qmp.c | 11 target-alpha/cpu.c | 7 +++ target-arm/cpu.c | 11 target-cris/cpu.c | 7 +++ target-i386/cpu.c | 8 +++ target-lm32/cpu.c | 7 +++ target-m68k/cpu.c | 7 +++ target-microblaze/cpu.c| 6 ++ target-mips/cpu.c | 7 +++ target-moxie/cpu.c | 7 +++ target-openrisc/cpu.c | 7 +++ target-ppc/kvm.c | 4 ++ target-s390x/cpu.c | 7 +++ target-sh4/cpu.c | 7 +++ target-sparc/cpu.c | 7 +++ target-tilegx/cpu.c| 7 +++ target-tricore/cpu.c | 6 ++ target-unicore32/cpu.c | 7 +++ target-xtensa/cpu.c| 7 +++ tests/Makefile | 20 --- tests/device-introspect-test.c | 124 + tests/drive_del-test.c | 22 ++-- tests/ide-test.c | 8 +-- tests/libqtest.c | 38 - tests/libqtest.h | 33 +++ 44 files changed, 460 insertions(+), 60 deletions(-) create mode 100644 tests/device-introspect-test.c -- 2.4.3
Re: [Qemu-devel] [PULL v2 00/11] Fix device introspection regressions
On 8 October 2015 at 14:02, Markus Armbrusterwrote: > QMP command device-list-properties regressed in 2.1: it can crash or > leave dangling pointers behind. > > -device FOO,help regressed in 2.2: it no longer works for > non-pluggable devices. I tried to fix that some time ago[*], but my > fix failed review. This is my second, more comprehensive try. > > PATCH 1-4 fix two classes of bugs involved in the regressions, PATCH > 5-6 are libqtest preliminaries, PATCH 7 adds tests to demonstrate the > remaining bugs, PATCH 8-10 fix them to a degree (see PATCH 8 for > limitations), and PATCH 11 cleans up. > > v2: > * PATCH 01: new > * PATCH 08,10: Drop all changes for devices "sclp" and > "s390-sclp-event-facility", because they've been fixed in master > > The following changes since commit fb6345f452ba7cefb395389abb17d0af0e42c54b: > > Merge remote-tracking branch 'remotes/ehabkost/tags/numa-pull-request' into > staging (2015-10-08 11:28:17 +0100) > > are available in the git repository at: > > git://repo.or.cz/qemu/armbru.git tags/pull-monitor-2015-10-08 > > for you to fetch changes up to 62ddbd770b583ee98fe648c19ea2ec5e0625fe4a: > > Revert "qdev: Use qdev_get_device_class() for -device ,help" > (2015-10-08 14:36:36 +0200) > > > Fix device introspection regressions Hi. I'm afraid this fails to build for Windows: In file included from /home/petmay01/linaro/qemu-for-merges/hw/input/virtio-input.c:13: /home/petmay01/linaro/qemu-for-merges/include/standard-headers/linux/input.h:890:1: error: "SW_MAX" redefined In file included from /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/windows.h:55, from /home/petmay01/linaro/qemu-for-merges/include/sysemu/os-win32.h:29, from /home/petmay01/linaro/qemu-for-merges/include/qemu/osdep.h:65, from /home/petmay01/linaro/qemu-for-merges/include/qemu-common.h:15, from /home/petmay01/linaro/qemu-for-merges/include/qemu/iov.h:17, from /home/petmay01/linaro/qemu-for-merges/hw/input/virtio-input.c:7: /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/winuser.h:729:1: error: this is the location of the previous definition thanks -- PMM