Received: from eggs.gnu.org ([2001:4830:134:3::10]:33150) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9fXx-0005xg-Mn for qemu-devel@nongnu.org; Mon, 29 Jun 2015 16:20:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z9fXu-0005J4-2Z for qemu-devel@nongnu.org; Mon, 29 Jun 2015 16:20:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54417) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9fXt-0005Iy-TH for qemu-devel@nongnu.org; Mon, 29 Jun 2015 16:20:49 -0400 Date: Mon, 29 Jun 2015 17:20:47 -0300 From: Eduardo Habkost Message-ID: <20150629202047.GC26073@thinpad.lan.raisama.net> References: <1434971282-30871-1-git-send-email-rkrcmar@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1434971282-30871-1-git-send-email-rkrcmar@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v3] target-i386: emulate CPUID level of real hardware List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Radim =?utf-8?B?S3LEjW3DocWZ?= Cc: pbonzini@redhat.com, bsd@redhat.com, qemu-devel@nongnu.org, rth@twiddle.net On Mon, Jun 22, 2015 at 01:08:02PM +0200, Radim Kr=C4=8Dm=C3=A1=C5=99 wro= te: > W10 insider has a bug where it ignores CPUID level and interprets > CPUID.(EAX=3D07H, ECX=3D0H) incorrectly, because CPUID in fact returned > CPUID.(EAX=3D04H, ECX=3D0H); this resulted in execution of unsupported > instructions. >=20 > While it's a Windows bug, there is no reason to emulate incorrect level= . >=20 > I used http://instlatx64.atw.hu/ as a source of CPUID and checked that > it matches Penryn Xeon X5472, Westmere Xeon W3520, SandyBridge i5-2540M= , > and Haswell i5-4670T. >=20 > kvm64 and qemu64 were bumped to 0xD to allow all available features for > them (and to avoid the same Windows bug). >=20 > Signed-off-by: Radim Kr=C4=8Dm=C3=A1=C5=99 > --- > v3: use PC_COMPAT_2_3 array to set old (x)level values [Eduardo] > v2: > * maintained compatibility for old (< 2.4) machine types [Paolo] > * dropped automatic increase to 0xd, for compatibility [Eduardo] >=20 > include/hw/compat.h | 66 +++++++++++++++++++++++++++++++++++++++++++++= +++++++- > target-i386/cpu.c | 37 +++++++++++++++--------------- > 2 files changed, 83 insertions(+), 20 deletions(-) >=20 > diff --git a/include/hw/compat.h b/include/hw/compat.h > index 4a43466f0369..ef996be22263 100644 > --- a/include/hw/compat.h > +++ b/include/hw/compat.h > @@ -2,7 +2,71 @@ > #define HW_COMPAT_H > =20 > #define HW_COMPAT_2_3 \ > - /* empty */ [...] > + },{\ > + .driver =3D "Penryn" "-" TYPE_X86_CPU,\ > + .property =3D "xlevel",\ > + .value =3D stringify(0x8000000a),\ > + },{\ You changed Conroe xlevel, too. This was missing: {\ .driver =3D "Conroe" "-" TYPE_X86_CPU,\ .property =3D "xlevel",\ .value =3D stringify(0x8000000a),\ }, I have added it to the patch on the x86 tree. --=20 Eduardo