Received: from eggs.gnu.org ([208.118.235.92]:44677) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZSGL-0007Wj-33 for qemu-devel@nongnu.org; Mon, 06 May 2013 16:44:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UZSG7-0005B2-72 for qemu-devel@nongnu.org; Mon, 06 May 2013 16:43:56 -0400 Received: from cantor2.suse.de ([195.135.220.15]:48353 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZSG6-0005Aj-Vo for qemu-devel@nongnu.org; Mon, 06 May 2013 16:43:43 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Mon, 6 May 2013 22:43:21 +0200 Message-Id: <1367873011-7402-2-git-send-email-afaerber@suse.de> In-Reply-To: <1367873011-7402-1-git-send-email-afaerber@suse.de> References: <1367873011-7402-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 01/11] target-i386: Add ECX information to FeatureWordInfo List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Eduardo Habkost , =?UTF-8?q?Andreas=20F=C3=A4rber?= From: Eduardo Habkost FEAT_7_0_EBX uses ECX as input, so we have to take that into account when reporting feature word values. Signed-off-by: Eduardo Habkost Signed-off-by: Andreas F=C3=A4rber --- target-i386/cpu.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 9f2adad..0f92469 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -152,8 +152,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 */ + 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 { @@ -187,7 +189,9 @@ static FeatureWordInfo feature_word_info[FEATURE_WORD= S] =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 1.8.1.4