[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH 1/1] Fix cpu check for ppc64



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 in ibm com>
>  Signed-off-by: Li Zhang <zhlcindy 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.


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]