From 141754beea911e201feb96f4145946aaf03481cc Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Mon, 12 Feb 2018 20:55:09 -0500 Subject: [PATCH] target-i386: Remove AMD feature flag aliases from CPU model table When CPU vendor is AMD, the AMD feature alias bits on CPUID[0x80000001].EDX are already automatically copied from CPUID[1].EDX on x86_cpu_realizefn(). When CPU vendor is Intel, those bits are reserved and should be zero. On either case, those bits shouldn't be set in the CPU model table. Backports commit 726a8ff68677d8d5fba17eb0ffb85076bfb598dc from qemu --- qemu/target-i386/cpu.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/qemu/target-i386/cpu.c b/qemu/target-i386/cpu.c index 0acbca6f..13219aac 100644 --- a/qemu/target-i386/cpu.c +++ b/qemu/target-i386/cpu.c @@ -628,7 +628,6 @@ static X86CPUDefinition builtin_x86_defs[] = { // FEAT_7_0_EBX 0, // FEAT_8000_0001_EDX - (PPRO_FEATURES & CPUID_EXT2_AMD_ALIASES) | CPUID_EXT2_LM | CPUID_EXT2_SYSCALL | CPUID_EXT2_NX, // FEAT_8000_0001_ECX CPUID_EXT3_LAHF_LM | CPUID_EXT3_SVM | @@ -652,7 +651,6 @@ static X86CPUDefinition builtin_x86_defs[] = { // FEAT_7_0_EBX 0, // FEAT_8000_0001_EDX - (PPRO_FEATURES & CPUID_EXT2_AMD_ALIASES) | CPUID_EXT2_LM | CPUID_EXT2_SYSCALL | CPUID_EXT2_NX | CPUID_EXT2_3DNOW | CPUID_EXT2_3DNOWEXT | CPUID_EXT2_MMXEXT | CPUID_EXT2_FFXSR | CPUID_EXT2_PDPE1GB | CPUID_EXT2_RDTSCP, @@ -718,7 +716,6 @@ static X86CPUDefinition builtin_x86_defs[] = { 0, /* Missing: CPUID_EXT2_PDPE1GB, CPUID_EXT2_RDTSCP */ // FEAT_8000_0001_EDX - (PPRO_FEATURES & CPUID_EXT2_AMD_ALIASES) | CPUID_EXT2_LM | CPUID_EXT2_SYSCALL | CPUID_EXT2_NX, /* Missing: CPUID_EXT3_LAHF_LM, CPUID_EXT3_CMP_LEG, CPUID_EXT3_EXTAPIC, CPUID_EXT3_CR8LEG, CPUID_EXT3_ABM, CPUID_EXT3_SSE4A, @@ -755,7 +752,6 @@ static X86CPUDefinition builtin_x86_defs[] = { // FEAT_7_0_EBX 0, // FEAT_8000_0001_EDX - PPRO_FEATURES & CPUID_EXT2_AMD_ALIASES, // FEAT_8000_0001_ECX 0, }, @@ -837,7 +833,6 @@ static X86CPUDefinition builtin_x86_defs[] = { // FEAT_7_0_EBX 0, // FEAT_8000_0001_EDX - (PPRO_FEATURES & CPUID_EXT2_AMD_ALIASES) | CPUID_EXT2_MMXEXT | CPUID_EXT2_3DNOW | CPUID_EXT2_3DNOWEXT, }, }, @@ -862,7 +857,6 @@ static X86CPUDefinition builtin_x86_defs[] = { // FEAT_7_0_EBX 0, // FEAT_8000_0001_EDX - (PPRO_FEATURES & CPUID_EXT2_AMD_ALIASES) | CPUID_EXT2_NX, // FEAT_8000_0001_ECX CPUID_EXT3_LAHF_LM,