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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 02, 2015 at 11:27:35AM +0200, Boris Fiuczynski wrote:
> 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@xxxxxxxxxxxxxxxxxx>
> Reviewed-by: Christian Borntraeger <borntraeger@xxxxxxxxxx>
> ---
>  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

s/it's/its/

> + * 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;

qemuMonitorFindObjectPath can return:
  0  - Found
 -1  - Error bail out
 -2  - Not found

But it only reports an error when returning -1. There is a
(pre-existing) missing virReportError in that case.

Looking for the ccw balloon only makes sense when the pci one was not
found. A fatal error (-1) when finding the PCI balloon was not found
will very probably be fatal for CCW as well.

Jan

Attachment: signature.asc
Description: Digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]