qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] qemu will core dump with "-smp 254, sockets=2,


From: Eduardo Habkost
Subject: Re: [Qemu-devel] [PATCH] qemu will core dump with "-smp 254, sockets=2, cores=3, threads=2"
Date: Mon, 16 Dec 2013 14:53:54 -0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, Dec 16, 2013 at 03:54:57PM +0800, jun muzi wrote:
> Type error, change smp_cores to nr_cores and change smp_threads to
> nr_threads. But using smp_cores can work well. As it is not the same with
> explanatory note, so change it.
> 
> Signed-off-by: Jun Li <address@hidden>
> ---
>  target-i386/topology.h | 20 ++++++++++++++++++++
[...]
> @@ -126,6 +139,13 @@ static inline apic_id_t
> x86_apicid_from_cpu_idx(unsigned nr_cores,
>                                                  unsigned cpu_index)
>  {
>      unsigned pkg_id, core_id, smt_id;
> +
> +    /* check whether nr_cores and nr_threads is a power of 2 */
> +    if (!is_2_power(nr_cores) || !is_2_power(nr_threads)) {
> +        nr_cores = 1;
> +        nr_threads = 1;
> +    }

I don't understand what you are trying to do here. The whole point of
the topology.h file is to make sure the right CPU topology is exposed to
the guest when nr_cores and nr_threads are not powers of 2.

-- 
Eduardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]