]> git.proxmox.com Git - mirror_qemu.git/commit - target/i386/cpu.c
target-i386: emulate CPUID level of real hardware
authorRadim Krčmář <rkrcmar@redhat.com>
Thu, 9 Jul 2015 19:07:39 +0000 (21:07 +0200)
committerEduardo Habkost <ehabkost@redhat.com>
Wed, 15 Jul 2015 20:05:59 +0000 (17:05 -0300)
commit3046bb5debc8153a542acb1df93b2a1a85527a15
tree0adaf06898e5e9dc7c0fe6dbc20a1324feac6bea
parentd461a44ca4b164549fe19b14d2cdf0524f778ce1
target-i386: emulate CPUID level of real hardware

W10 insider has a bug where it ignores CPUID level and interprets
CPUID.(EAX=07H, ECX=0H) incorrectly, because CPUID in fact returned
CPUID.(EAX=04H, ECX=0H);  this resulted in execution of unsupported
instructions.

While it's a Windows bug, there is no reason to emulate incorrect level.

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.

kvm64 and qemu64 were bumped to 0xD to allow all available features for
them (and to avoid the same Windows bug).

Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
include/hw/i386/pc.h
target-i386/cpu.c