From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60649) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYHjB-0006Ke-J4 for qemu-devel@nongnu.org; Fri, 03 May 2013 11:16:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UYHj9-00006g-PX for qemu-devel@nongnu.org; Fri, 03 May 2013 11:16:53 -0400 Received: from cantor2.suse.de ([195.135.220.15]:38712 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYHj9-00006N-GE for qemu-devel@nongnu.org; Fri, 03 May 2013 11:16:51 -0400 Message-ID: <5183D4DE.1030704@suse.de> Date: Fri, 03 May 2013 17:16:46 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1366657220-776-1-git-send-email-ehabkost@redhat.com> <1366657220-776-6-git-send-email-ehabkost@redhat.com> In-Reply-To: <1366657220-776-6-git-send-email-ehabkost@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH qom-cpu 5/9] target-i386: Add ECX information to FeatureWordInfo List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: libvir-list@redhat.com, Igor Mammedov , Jiri Denemark , qemu-devel@nongnu.org Am 22.04.2013 21:00, schrieb Eduardo Habkost: > FEAT_7_0_EBX uses ECX as input, so we have to take that into account > when reporting feature word values. >=20 > Signed-off-by: Eduardo Habkost > --- > target-i386/cpu.c | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) >=20 > diff --git a/target-i386/cpu.c b/target-i386/cpu.c > index 110ef98..314931e 100644 > --- a/target-i386/cpu.c > +++ b/target-i386/cpu.c > @@ -151,8 +151,10 @@ static const char *cpuid_7_0_ebx_feature_name[] =3D= { > =20 > typedef struct FeatureWordInfo { > const char **feat_names; > - uint32_t cpuid_eax; /* Input EAX for CPUID */ > - int cpuid_reg; /* R_* register constant */ > + uint32_t cpuid_eax; /* Input EAX for CPUID */ > + bool cpuid_needs_ecx; /* CPUID instruction uses ECX as input */ Why do we need this needs_ field here? eax and reg just seem to be reindented and the comment reworded for reg. It just seems to be passed through to has_cpuid_input_ecx, which I neither see defined nor checked - that data structure already existed elsewhere as such? Andreas > + uint32_t cpuid_ecx; /* Input ECX value for CPUID */ > + int cpuid_reg; /* output register (R_* constant) */ > } FeatureWordInfo; > =20 > static FeatureWordInfo feature_word_info[FEATURE_WORDS] =3D { > @@ -186,7 +188,9 @@ static FeatureWordInfo feature_word_info[FEATURE_WO= RDS] =3D { > }, > [FEAT_7_0_EBX] =3D { > .feat_names =3D cpuid_7_0_ebx_feature_name, > - .cpuid_eax =3D 7, .cpuid_reg =3D R_EBX, > + .cpuid_eax =3D 7, > + .cpuid_needs_ecx =3D true, .cpuid_ecx =3D 0, > + .cpuid_reg =3D R_EBX, > }, > }; > =20 >=20 --=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