[libvirt] Possible qemu GetVcpus bug?

21 Oct
2009
21 Oct
'09
10:08 p.m.
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
5802
Age (days ago)
5802
Last active (days ago)
0 comments
1 participants
participants (1)
-
Cole Robinson