From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43839) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjWyJ-0001dE-DI for qemu-devel@nongnu.org; Fri, 14 Dec 2012 10:14:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TjWyC-0004uB-Gf for qemu-devel@nongnu.org; Fri, 14 Dec 2012 10:14:43 -0500 Received: from cantor2.suse.de ([195.135.220.15]:45990 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjWyC-0004tx-7G for qemu-devel@nongnu.org; Fri, 14 Dec 2012 10:14:36 -0500 Message-ID: <50CB4258.3040709@suse.de> Date: Fri, 14 Dec 2012 16:14:32 +0100 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1355350946-28010-1-git-send-email-ehabkost@redhat.com> <1355350946-28010-4-git-send-email-ehabkost@redhat.com> In-Reply-To: <1355350946-28010-4-git-send-email-ehabkost@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 3/3] target-i386: replace cpuid_*features fields with a feature word array List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: Igor Mammedov , qemu-devel@nongnu.org Am 12.12.2012 23:22, schrieb Eduardo Habkost: > This replaces the feature-bit fields on both X86CPU and x86_def_t > structs with an array. >=20 > With this, we will be able to simplify code that simply does the same > operation on all feature words (e.g. kvm_check_features_against_host(), > filter_features_for_kvm(), add_flagname_to_bitmaps(), and CPU > feature-bit property lookup/registration). >=20 > Signed-off-by: Eduardo Habkost > --- > This patch was created solely using a sed script and no manual changes, > to try to avoid mistakes while converting the code, and make it easier > to rebase if necessary. The sed script can be seen at: > https://gist.github.com/4271991 > --- > hw/kvm/clock.c | 2 +- > linux-user/elfload.c | 2 +- > linux-user/main.c | 4 +- > target-i386/cpu.c | 578 +++++++++++++++++++++++---------------= -------- > target-i386/cpu.h | 30 +-- > target-i386/helper.c | 4 +- > target-i386/kvm.c | 5 +- > target-i386/misc_helper.c | 14 +- > target-i386/translate.c | 10 +- > 9 files changed, 331 insertions(+), 318 deletions(-) I wonder, if we're touching all these lines anyway, can't we place the new feature array directly into X86CPU? As far as I see the features are never changed at runtime, so the only reason to have them in the instance is the command-line-supplied overrides. The clock code using first_cpu looks solvable; what about CR4 and MSR helpers, how performance-sensitive are they? (if they're not yet using X86CPU for something else) With the proposed variable change env -> cpu it would not be fully sed'able, but as a maintainer I need to review the whole patch anyway. Either way since this change affects not just the core CPU that I have started to maintain I feel I should give other target-i386 stakeholders (Blue, Aur=E9lien, malc, ...) sufficient time to object, so not before Christmas realistically. Regards, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg