On executing the virsh nodecpumap command, the number of CPUs present was shown as (last cpu online id + 1). This patch fixes the issue by reporting the current number of CPUs present. Signed-off-by: Nitesh Konkar <nitkon12@xxxxxxxxxxxxxxxxxx> --- src/util/virhostcpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c index aa9cfeac2..c485a9721 100644 --- a/src/util/virhostcpu.c +++ b/src/util/virhostcpu.c @@ -1093,7 +1093,7 @@ virHostCPUGetMap(unsigned char **cpumap, if (online) *online = virBitmapCountBits(cpus); - ret = virBitmapSize(cpus); + ret = virHostCPUGetCount(); cleanup: if (ret < 0 && cpumap) -- 2.11.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list