hyperv: fix the number of threads per core

The operands were reversed, producing an incorrect result.

Co-authored-by: Sri Ramanujam <sramanujam@datto.com>
Signed-off-by: Matt Coleman <matt@datto.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Matt Coleman 2020-09-15 18:27:16 -04:00 committed by Michal Privoznik
parent f2d90b558f
commit 1e18d3b833

View File

@ -310,7 +310,7 @@ hypervNodeGetInfo(virConnectPtr conn, virNodeInfoPtr info)
}
info->cores = processorList->data.common->NumberOfCores;
info->threads = info->cores / processorList->data.common->NumberOfLogicalProcessors;
info->threads = processorList->data.common->NumberOfLogicalProcessors / info->cores;
info->cpus = info->sockets * info->cores;
result = 0;