From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34026) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLF4a-0000Um-G0 for qemu-devel@nongnu.org; Wed, 05 Mar 2014 11:53:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WLF4U-00038i-N6 for qemu-devel@nongnu.org; Wed, 05 Mar 2014 11:53:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:11138) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLF4U-00038Z-Cw for qemu-devel@nongnu.org; Wed, 05 Mar 2014 11:53:30 -0500 Date: Wed, 5 Mar 2014 17:53:26 +0100 From: Igor Mammedov Message-ID: <20140305175326.426e315d@nial.usersys.redhat.com> In-Reply-To: <20140211181717.607cd818@nial.usersys.redhat.com> References: <1385591336-2755-1-git-send-email-imammedo@redhat.com> <20140211181717.607cd818@nial.usersys.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH qom-cpu 00/16 v10] target-i386: convert CPU features into properties List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: qemu-devel@nongnu.org, afaerber@suse.de On Tue, 11 Feb 2014 18:17:17 +0100 Igor Mammedov wrote: > On Wed, 27 Nov 2013 23:28:40 +0100 > Igor Mammedov wrote: > > [...] > > target-i386: cpu: convert 'level' to static property > > target-i386: cpu: convert 'xlevel' to static property > > target-i386: cpu: convert 'family' to static property > > target-i386: cpu: convert 'model' to static property > > target-i386: cpu: convert 'stepping' to static property > > target-i386: cpu: convert 'vendor' to static property > > target-i386: cpu: convert 'model-id' to static property > > target-i386: cpu: convert 'tsc-frequency' to static property > [...] > Andreas, > > Taking in account that we agreed that static properties are convenient > for using with Devices and that CPU is Device now, > > Could you consider applying patches [3-10/16] to your qom-cpu branch, please. > > As minimum they consolidate x86 CPU properties in one properties array > and are nice codebase cleanup. Patches 3-4, replace custom setters/getters > with generic ones, replacing them with DEFINE_PROP_UINT32() one-liners. > As you can see Anthony says it's reasonable thing to do: > https://www.mail-archive.com/qemu-devel@nongnu.org/msg215491.html > > As side effect of conversion it allows to leverage currently working > "legacy" commands -device/(HMP) info qtree/(QMP)device-list-properties > for x86 CPUs which provides immediate benefits (without waiting on > rewrite of everything in QOM way). ping > > The rest of series, I'll respin utilizing current QOM infrastructure more > and make bit->name conversion local to x86 CPU code as you've suggested. > > target-i386: set [+-]feature using static properties > > qdev: introduce qdev_prop_find_bit() > > target-i386: use static properties in check_features_against_host() to > > print CPUID feature names > > target-i386: use static properties to list CPUID features > > target-i386: remove unused *_feature_name arrays > > target-i386: cpu: fix invalid use of error_is_set(errp) if errp == > > NULL > > > > hw/core/qdev-properties.c | 15 + > > include/hw/qdev-properties.h | 13 + > > target-i386/cpu.c | 665 ++++++++++++++++++++----------------------- > > 3 files changed, 338 insertions(+), 355 deletions(-) > > >