Re: [PATCH 07/27] qemu: monitor: Add support for calling query-hotpluggable-cpus

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

 



On Fri, Aug 05, 2016 at 03:56:03PM +0200, Peter Krempa wrote:
> Add support for retrieving information regarding hotpluggable cpu units
> supported by qemu. Data returned by the command carries information
> needed to figure out the granularity of hotplug, the necessary cpu type
> name and the topology information.
> 
> Note that qemu doesn't specify any particular order of the entries thus
> it's necessary sort them by socket_id, core_id and thread_id to the
> order libvirt expects.
> ---
>  src/qemu/qemu_monitor.h      |  16 ++++
>  src/qemu/qemu_monitor_json.c | 170 +++++++++++++++++++++++++++++++++++++++++++
>  src/qemu/qemu_monitor_json.h |   5 ++
>  3 files changed, 191 insertions(+)

[...]

> +    /* qom path is not present unless the vCPU is online */
> +    if ((tmp = virJSONValueObjectGetString(vcpu, "qom-path"))) {
> +        if (VIR_STRDUP(entry->qom_path, tmp) < 0)
> +            return -1;
> +
> +        /* alias is the part after last slash having a "vcpu-device" prefix */

s/vcpu-device/vcpu/

> +        if ((tmp = strrchr(tmp, '/')) && STRPREFIX(tmp + 1, "vcpu")) {
> +            if (VIR_STRDUP(entry->alias, tmp + 1) < 0)
> +                return -1;
> +        }
> +    }
> +
> +    return 0;
> +}

ACK

--
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]