From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46528) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bBcoi-0002o7-Qw for qemu-devel@nongnu.org; Sat, 11 Jun 2016 02:54:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bBcog-0007Qq-RT for qemu-devel@nongnu.org; Sat, 11 Jun 2016 02:54:47 -0400 References: <1465580427-13596-1-git-send-email-drjones@redhat.com> <1465580427-13596-8-git-send-email-drjones@redhat.com> From: Thomas Huth Message-ID: <575BB5AB.3010509@redhat.com> Date: Sat, 11 Jun 2016 08:54:35 +0200 MIME-Version: 1.0 In-Reply-To: <1465580427-13596-8-git-send-email-drjones@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH RFC 07/16] qom/cpu: make nr-cores, nr-threads real properties List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andrew Jones , qemu-devel@nongnu.org, qemu-ppc@nongnu.org, qemu-arm@nongnu.org Cc: peter.maydell@linaro.org, ehabkost@redhat.com, agraf@suse.de, pbonzini@redhat.com, dgibson@redhat.com, imammedo@redhat.com, david@gibson.dropbear.id.au, Bharata B Rao On 10.06.2016 19:40, Andrew Jones wrote: > Signed-off-by: Andrew Jones > --- > qom/cpu.c | 8 ++++++++ > 1 file changed, 8 insertions(+) >=20 > 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" > =20 > bool cpu_exists(int64_t id) > { > @@ -342,6 +343,12 @@ static int64_t cpu_common_get_arch_id(CPUState *cp= u) > return cpu->cpu_index; > } > =20 > +static Property cpu_common_properties[] =3D { > + 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