qemu-arm
[Top][All Lists]
Advanced

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

Re: [Qemu-arm] [Qemu-devel] [PATCH RFC 07/16] qom/cpu: make nr-cores, nr


From: Thomas Huth
Subject: Re: [Qemu-arm] [Qemu-devel] [PATCH RFC 07/16] qom/cpu: make nr-cores, nr-threads real properties
Date: Sat, 11 Jun 2016 08:54:35 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0

On 10.06.2016 19:40, Andrew Jones wrote:
> Signed-off-by: Andrew Jones <address@hidden>
> ---
>  qom/cpu.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/qom/cpu.c b/qom/cpu.c
> index 751e992de8823..024cda3eb98c8 100644
> --- a/qom/cpu.c
> +++ b/qom/cpu.c
> @@ -28,6 +28,7 @@
>  #include "exec/log.h"
>  #include "qemu/error-report.h"
>  #include "sysemu/sysemu.h"
> +#include "hw/qdev-properties.h"
>  
>  bool cpu_exists(int64_t id)
>  {
> @@ -342,6 +343,12 @@ static int64_t cpu_common_get_arch_id(CPUState *cpu)
>      return cpu->cpu_index;
>  }
>  
> +static Property cpu_common_properties[] = {
> +    DEFINE_PROP_INT32("nr-cores", CPUState, nr_cores, 1),
> +    DEFINE_PROP_INT32("nr-threads", CPUState, nr_threads, 1),
> +    DEFINE_PROP_END_OF_LIST()
> +};

Are you aware of the current CPU hotplug discussion that is going on?
I'm not very involved there, but I think some of these reworks also move
"nr_threads" into the CPU state already, e.g. see:

https://github.com/dgibson/qemu/commit/9d07719784ecbeebea71

... so you might want to check these patches first to see whether you
can base your rework on them?

 Thomas




reply via email to

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