]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
Remove contiguous CPU indexes assumption
authorLi Zhang <zhlcindy@linux.vnet.ibm.com>
Fri, 15 Mar 2013 09:25:09 +0000 (17:25 +0800)
committerOsier Yang <jyang@redhat.com>
Fri, 15 Mar 2013 09:56:17 +0000 (17:56 +0800)
commitcc78d7ba0e64b870013ad7753c3d24cc88905712
tree474e359aed46c3d6ea03a8ac742c661a4a98a955
parente5a632bb6fa422744d8d1bee6cbcf5dcf407670a
Remove contiguous CPU indexes assumption

When getting CPUs' information, it assumes that CPU indexes
are not contiguous. But for ppc64 platform, CPU indexes are not
contiguous because SMT is needed to be disabled, so CPU information
is not right on ppc64 and vpuinfo, vcpupin can't work corretly.

This patch is to remove the assumption to be compatible with ppc64.

Test:
   4 vcpus are assigned to one VM and execute vcpuinfo command.

   Without patch: There is only one vcpu informaion can be listed.
   With patch: All vcpus' information can be listed correctly.

Signed-off-by: Li Zhang <zhlcindy@linux.vnet.ibm.com>
src/qemu/qemu_monitor_json.c
src/qemu/qemu_monitor_text.c