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