[libvirt] Possible qemu GetVcpus bug?

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

 



Playing with the GetVcpus API call (and virsh vcpuinfo), there is a
slight inconsistency that may be a bug.

In qemudDomainGetVcpus, we have:

    if (nodeGetInfo(dom->conn, &nodeinfo) < 0)
        goto cleanup;

    maxcpu = maplen * 8;
    if (maxcpu > nodeinfo.cpus)
        maxcpu = nodeinfo.cpus;

We clamp the amount of cpus we report affinity against to nodeinfo.cpus.

virsh however expects this to be VIR_NODEINFO_MAXCPUS, and makes the
cpumap appropriately long (and uses this value when pretty printing):

    cpumaplen = VIR_CPU_MAPLEN(VIR_NODEINFO_MAXCPUS(nodeinfo));

Is there a bug here? Should qemu be using VIR_NODEINFO_MAXCPUS, or is
there some explicit reason to use nodeinfo.cpus?

Thanks,
Cole

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