[libvirt] [PATCH] qemu: monitor: Add memory balloon support for virtio-ccw

Boris Fiuczynski fiuczy at linux.vnet.ibm.com
Tue Jun 2 09:27:35 UTC 2015


The search for the memory ballon driver object is extended by a
second known name "virtio-ballon-ccw" in support for virtio-ccw.

Signed-off-by: Boris Fiuczynski <fiuczy at linux.vnet.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger at de.ibm.com>
---
 src/qemu/qemu_monitor.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index f959b74..1a88329 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -1141,9 +1141,9 @@ qemuMonitorFindObjectPath(qemuMonitorPtr mon,
 
 
 /**
- * Search the qom objects for the balloon driver object by it's known name
- * of "virtio-balloon-pci".  The entry for the driver will be found by using
- * function "qemuMonitorFindObjectPath".
+ * Search the qom objects for the balloon driver object by it's known names
+ * of "virtio-balloon-pci" or "virtio-ballon-ccw". The entry for the driver
+ * will be found by using function "qemuMonitorFindObjectPath".
  *
  * Once found, check the entry to ensure it has the correct property listed.
  * If it does not, then obtaining statistics from QEMU will not be possible.
@@ -1183,7 +1183,8 @@ qemuMonitorFindBalloonObjectPath(qemuMonitorPtr mon,
         return -1;
     }
 
-    if (qemuMonitorFindObjectPath(mon, curpath, "virtio-balloon-pci", &path) < 0)
+    if (qemuMonitorFindObjectPath(mon, curpath, "virtio-balloon-pci", &path) < 0 &&
+        qemuMonitorFindObjectPath(mon, curpath, "virtio-balloon-ccw", &path) < 0)
         return -1;
 
     nprops = qemuMonitorJSONGetObjectListPaths(mon, path, &bprops);
-- 
2.3.0





More information about the libvir-list mailing list