mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-24 00:45:38 +00:00
target-i386: Set constant model_id for qemu64/qemu32/athlon
Newer PC machines don't set hw_version, and older machines set model-id on compat_props explicitly, so we don't need the x86_cpudef_setup() code that sets model_id using qemu_hw_version() anymore. Backports commit 9cf2cc3d8237732946720d78bf9aec0064026ed8 from qemu
This commit is contained in:
parent
aa3d46ef83
commit
956e20ea6b
|
@ -771,6 +771,7 @@ static X86CPUDefinition builtin_x86_defs[] = {
|
|||
// FEAT_8000_0001_ECX
|
||||
CPUID_EXT3_LAHF_LM | CPUID_EXT3_SVM,
|
||||
},
|
||||
"QEMU Virtual CPU version " QEMU_HW_VERSION
|
||||
},
|
||||
{
|
||||
"phenom",
|
||||
|
@ -881,6 +882,7 @@ static X86CPUDefinition builtin_x86_defs[] = {
|
|||
// FEAT_1_ECX
|
||||
CPUID_EXT_SSSE3,
|
||||
},
|
||||
"QEMU Virtual CPU version " QEMU_HW_VERSION
|
||||
},
|
||||
{
|
||||
"kvm32",
|
||||
|
@ -985,6 +987,7 @@ static X86CPUDefinition builtin_x86_defs[] = {
|
|||
// FEAT_8000_0001_EDX
|
||||
CPUID_EXT2_MMXEXT | CPUID_EXT2_3DNOW | CPUID_EXT2_3DNOWEXT,
|
||||
},
|
||||
"QEMU Virtual CPU version " QEMU_HW_VERSION
|
||||
},
|
||||
{
|
||||
"n270",
|
||||
|
@ -2202,26 +2205,8 @@ void cpu_clear_apic_feature(CPUX86State *env)
|
|||
|
||||
#endif /* !CONFIG_USER_ONLY */
|
||||
|
||||
/* Initialize list of CPU models, filling some non-static fields if necessary
|
||||
*/
|
||||
void x86_cpudef_setup(void)
|
||||
{
|
||||
int i, j;
|
||||
static const char *model_with_versions[] = { "qemu32", "qemu64", "athlon" };
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(builtin_x86_defs); ++i) {
|
||||
X86CPUDefinition *def = &builtin_x86_defs[i];
|
||||
|
||||
/* Look for specific "cpudef" models that */
|
||||
/* have the QEMU version in .model_id */
|
||||
for (j = 0; j < ARRAY_SIZE(model_with_versions); j++) {
|
||||
if (strcmp(model_with_versions[j], def->name) == 0) {
|
||||
pstrcpy(def->model_id, sizeof(def->model_id),
|
||||
"QEMU Virtual CPU version ");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count,
|
||||
|
|
Loading…
Reference in a new issue