mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
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>
This commit is contained in:
parent
d461a44ca4
commit
3046bb5deb
2 changed files with 86 additions and 19 deletions
|
@ -298,6 +298,74 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
|
|||
.driver = TYPE_X86_CPU,\
|
||||
.property = "arat",\
|
||||
.value = "off",\
|
||||
},{\
|
||||
.driver = "qemu64" "-" TYPE_X86_CPU,\
|
||||
.property = "level",\
|
||||
.value = stringify(4),\
|
||||
},{\
|
||||
.driver = "kvm64" "-" TYPE_X86_CPU,\
|
||||
.property = "level",\
|
||||
.value = stringify(5),\
|
||||
},{\
|
||||
.driver = "pentium3" "-" TYPE_X86_CPU,\
|
||||
.property = "level",\
|
||||
.value = stringify(2),\
|
||||
},{\
|
||||
.driver = "n270" "-" TYPE_X86_CPU,\
|
||||
.property = "level",\
|
||||
.value = stringify(5),\
|
||||
},{\
|
||||
.driver = "Conroe" "-" TYPE_X86_CPU,\
|
||||
.property = "level",\
|
||||
.value = stringify(4),\
|
||||
},{\
|
||||
.driver = "Penryn" "-" TYPE_X86_CPU,\
|
||||
.property = "level",\
|
||||
.value = stringify(4),\
|
||||
},{\
|
||||
.driver = "Nehalem" "-" TYPE_X86_CPU,\
|
||||
.property = "level",\
|
||||
.value = stringify(4),\
|
||||
},{\
|
||||
.driver = "n270" "-" TYPE_X86_CPU,\
|
||||
.property = "xlevel",\
|
||||
.value = stringify(0x8000000a),\
|
||||
},{\
|
||||
.driver = "Penryn" "-" TYPE_X86_CPU,\
|
||||
.property = "xlevel",\
|
||||
.value = stringify(0x8000000a),\
|
||||
},{\
|
||||
.driver = "Conroe" "-" TYPE_X86_CPU,\
|
||||
.property = "xlevel",\
|
||||
.value = stringify(0x8000000a),\
|
||||
},{\
|
||||
.driver = "Nehalem" "-" TYPE_X86_CPU,\
|
||||
.property = "xlevel",\
|
||||
.value = stringify(0x8000000a),\
|
||||
},{\
|
||||
.driver = "Westmere" "-" TYPE_X86_CPU,\
|
||||
.property = "xlevel",\
|
||||
.value = stringify(0x8000000a),\
|
||||
},{\
|
||||
.driver = "SandyBridge" "-" TYPE_X86_CPU,\
|
||||
.property = "xlevel",\
|
||||
.value = stringify(0x8000000a),\
|
||||
},{\
|
||||
.driver = "Haswell" "-" TYPE_X86_CPU,\
|
||||
.property = "xlevel",\
|
||||
.value = stringify(0x8000000a),\
|
||||
},{\
|
||||
.driver = "Haswell-noTSX" "-" TYPE_X86_CPU,\
|
||||
.property = "xlevel",\
|
||||
.value = stringify(0x8000000a),\
|
||||
},{\
|
||||
.driver = "Broadwell" "-" TYPE_X86_CPU,\
|
||||
.property = "xlevel",\
|
||||
.value = stringify(0x8000000a),\
|
||||
},{\
|
||||
.driver = "Broadwell-noTSX" "-" TYPE_X86_CPU,\
|
||||
.property = "xlevel",\
|
||||
.value = stringify(0x8000000a),\
|
||||
},
|
||||
|
||||
#define PC_COMPAT_2_2 \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue