qemu/softmmu
Markus Armbruster 1bf4d3294b monitor: Fix find_device_state() for IDs containing slashes
Recent commit 6952026120 "monitor: Tidy up find_device_state()"
assumed the function's argument is "the device's ID or QOM path" (as
documented for device_del).  It's actually either an absolute QOM
path, or a QOM path relative to /machine/peripheral/.  Such a relative
path is a device ID when it doesn't contain a slash.  When it does,
the function now always fails.  Broke iotest 200, which uses relative
path "vda/virtio-backend".

It fails because object_resolve_path_component() resolves just one
component, not a relative path.

The obvious function to resolve relative paths is
object_resolve_path().  It picks a parent automatically.  Too much
magic, we want to specify the parent.  Create new
object_resolve_path_at() for that, and use it in find_device_state().

Reported-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20211019085711.86377-1-armbru@redhat.com>
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
2021-11-10 06:14:51 +01:00
..
arch_init.c meson.build: Define QEMU_ARCH in config-target.h 2021-08-26 17:02:00 +01:00
balloon.c
bootdevice.c
cpu-throttle.c
cpu-timers.c
cpus.c misc: Remove redundant new line in perror() 2021-07-09 18:42:46 +02:00
datadir.c
device_tree.c device_tree: Add qemu_fdt_add_path 2021-10-20 18:17:54 -07:00
dma-helpers.c
globals.c
icount.c
ioport.c
main.c
memory_mapping.c softmmu/memory_mapping: optimize for RamDiscardManager sections 2021-10-02 08:43:22 +02:00
memory.c memory: Introduce replay_discarded callback for RamDiscardManager 2021-11-01 22:56:44 +01:00
meson.build
physmem.c qapi: introduce x-query-ramblock QMP command 2021-11-02 15:55:14 +00:00
qdev-monitor.c monitor: Fix find_device_state() for IDs containing slashes 2021-11-10 06:14:51 +01:00
qemu-seccomp.c seccomp: don't block getters for resource control syscalls 2021-07-14 14:15:52 +01:00
qtest.c qtest: add a QOM object for qtest 2021-05-26 14:49:45 +02:00
rtc.c
runstate-action.c
runstate.c runstate: Initialize Error * to NULL 2021-06-15 17:17:09 +02:00
timers-state.h qemu/atomic: Add aligned_{int64,uint64}_t types 2021-07-21 07:45:38 -10:00
tpm.c
trace-events memory: make global_dirty_tracking a bitmask 2021-11-01 22:56:43 +01:00
trace.h
vl.c watchdog: remove select_watchdog_action 2021-11-02 15:57:27 +01:00