Hi all,
In this function qemuMonitorJSONExtractCPUInfo(),
It assumes that cpu index is always contiguous.
if (cpu != i) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("unexpected cpu index %d expecting %d"),
i, cpu);
goto cleanup;
}
For x86, in what kind of situation does this error happen?
This assumption causes the problem for ppc64.
For ppc64, it's quite different from x86.
SMT is needed to be disabled because of hardware's limitation.
So, only one thread per core is online.
These threads are not contiguous.
For example, smt=4, 64 CPUs and 16 Cores
CPU information is as the following:
Architecture: ppc64
Byte Order: Big Endian
CPU(s): 64
On-line CPU(s) list: 0,4,8,12,16,20,24,28,32,36,40,44,48,52,56,60
Off-line CPU(s) list:
1-3,5-7,9-11,13-15,17-19,21-23,25-27,29-31,33-35,37-39,41-43,45-47,49-51,53-55,57-59,61-63
Thread(s) per core: 1
Core(s) per socket: 1
Socket(s): 16
NUMA node(s): 2
All CPUs we get are only 0,4, ..., 60.
If possible, can this assumption be removed?
Thanks.
--
Li Zhang
IBM China Linux Technology Centre