]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu_monitor_json: add support to search QOM device path by device alias
authorPavel Hrdina <phrdina@redhat.com>
Mon, 25 Jul 2016 08:47:00 +0000 (10:47 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Mon, 25 Jul 2016 14:20:56 +0000 (16:20 +0200)
commit4a585a884fc8cfd11f6206cd6f1a7db824395e86
tree4e28a44f5108ebd7e57d45413a704d2f53863e73
parent18ba452f27e38412496f8ff3fe5adbc9de93176c
qemu_monitor_json: add support to search QOM device path by device alias

Commit ce745914 introduced detection of actual video ram sizes to fix migration
if QEMU decide to modify the values provided by libvirt.  This works perfectly
for domains with number of video devices up to two.

If there are more than two video devices in the guest all the secondary devices
in the XML will have the same memory values.  This is because our current code
search for QOM device path only by the device type name and all the secondary
video devices has the same name "qxl".

This patch introduces a new search function that will try to search a QOM device
path using also device's alias if the alias is available. After that it will
fallback to the old recursive code if the alias search found no results.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1358728

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
src/qemu/qemu_monitor.c
src/qemu/qemu_monitor_json.c
src/qemu/qemu_monitor_json.h