[libvirt] [PATCH 1/1] Fix cpu check for ppc64
Li Zhang
zhlcindy at linux.vnet.ibm.com
Thu May 17 09:10:12 UTC 2012
On 05/17/2012 04:36 PM, Daniel P. Berrange wrote:
> On Thu, May 17, 2012 at 04:28:52PM +0800, Li Zhang wrote:
>> ppc64 pseries architecture requires that the cpus
>> be numbered in a certain way.
>> According to SMT, if SMT equals 4, 0-3 on core 0,
>> 4-7 on core 1 and so on. So, depending on how guest
>> topology has been specified, one cannot assume that
>> the vcpus will be numbered 0-N. For example, for
>> smp=2, core=2, threads=1, the two cpus will be 0 and
>> 4 - one HW thread on each core. libvirt needs to take
>> into account.
>
> What you describe here is a hardware view of the CPUs,
> which need not be contiguous. libvirt works with a
> purely linear view of CPU numbers, where everything is
> contiguous& I always assumed that QEMU's query-cpus
> command works the same way.
>
>> Signed-off-by: Dipankar<dipankar at in.ibm.com>
>> Signed-off-by: Li Zhang<zhlcindy at linux.vnet.ibm.com>
>> ---
>> src/qemu/qemu_monitor_json.c | 7 -------
>> 1 file changed, 7 deletions(-)
>>
>> diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
>> index e1f5453..aee5265 100644
>> --- a/src/qemu/qemu_monitor_json.c
>> +++ b/src/qemu/qemu_monitor_json.c
>> @@ -1231,13 +1231,6 @@ qemuMonitorJSONExtractCPUInfo(virJSONValuePtr reply,
>> goto cleanup;
>> }
>>
>> - if (cpu != i) {
>> - qemuReportError(VIR_ERR_INTERNAL_ERROR,
>> - _("unexpected cpu index %d expecting %d"),
>> - i, cpu);
>> - goto cleanup;
>> - }
>> -
>> threads[i] = thread;
>> }
>
> Can you provide the full output of the 'query-cpus' command on the
> guest you have.
>
Hi Daniel,
The following is the output of the command:
{ "execute": "query-cpus" }
{"return": [{"current": true, "CPU": 0, "nip": -4611686018427049344,
"halted": false, "thread_id": 1260}, {"current": false, "CPU": 4, "nip":
-4611686018427049344, "halted": false, "thread_id": 1261}]}
>
> Daniel
--
Best Regards
Li
IBM LTC, China System&Technology Lab, Beijing
More information about the libvir-list
mailing list