Received: from eggs.gnu.org ([2001:4830:134:3::10]:48181) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpv3r-0003eY-Uo for qemu-devel@nongnu.org; Fri, 30 Sep 2016 06:29:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bpv3m-0000CA-Tf for qemu-devel@nongnu.org; Fri, 30 Sep 2016 06:28:58 -0400 Received: from mailhub.sw.ru ([195.214.232.25]:25879 helo=relay.sw.ru) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpv3m-0000AE-Ho for qemu-devel@nongnu.org; Fri, 30 Sep 2016 06:28:54 -0400 From: "Denis V. Lunev" Date: Fri, 30 Sep 2016 13:28:41 +0300 Message-Id: <1475231321-31722-1-git-send-email-den@openvz.org> Subject: [Qemu-devel] [PATCH 1/1] target-i386: Correct family/model/stepping for Opteron_G3 (2350) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: den@openvz.org, Evgeny Yakovlev , Paolo Bonzini , Richard Henderson , Eduardo Habkost From: Evgeny Yakovlev Current CPU definition for AMD Opteron third generation includes features like SSE4a and LAHF_LM support in emulated CPUID. These features are present in K8 rev.E or K10 CPUs and later. However, current G3 family and model describe 2nd generation K8 cores instead. This is incorrect but was considered harmless until out tests found a problem with linux kernels >= 3.10 (and maybe earlier) which specifically check for Opteron K8 model when parsing CPUID leaf 0x80000001: http://lxr.free-electrons.com/source/arch/x86/kernel/cpu/amd.c?v=3.16#L552 This code will disable LAHF_LM feature in /proc/cpuinfo if model number is inconsistent. This change sets Opteron_G3 family/model/stepping to 16/2/3 which is a proper Opteron 3rd generation 2350 CPU. Signed-off-by: Evgeny Yakovlev Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC: Richard Henderson CC: Eduardo Habkost --- target-i386/cpu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 333309b..d1c3ad1 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -1425,9 +1425,9 @@ static X86CPUDefinition builtin_x86_defs[] = { .name = "Opteron_G3", .level = 5, .vendor = CPUID_VENDOR_AMD, - .family = 15, - .model = 6, - .stepping = 1, + .family = 16, + .model = 2, + .stepping = 3, .features[FEAT_1_EDX] = CPUID_VME | CPUID_SSE2 | CPUID_SSE | CPUID_FXSR | CPUID_MMX | CPUID_CLFLUSH | CPUID_PSE36 | CPUID_PAT | CPUID_CMOV | CPUID_MCA | -- 2.7.4