From e9437eebd26ce9d6b4a51b5d87fda5dedf329527 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Thu, 24 Oct 2019 18:45:27 +0200 Subject: [PATCH] Restore Goldmont ID and improve QEMU support #2283 had inadvertently removed Goldmont+, and cpuid was reporting a mix of Core2 and Pentium2 for some QEMU configurations --- cpuid_x86.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cpuid_x86.c b/cpuid_x86.c index 92c8e1b67..9e1c8e752 100644 --- a/cpuid_x86.c +++ b/cpuid_x86.c @@ -1197,7 +1197,11 @@ int get_cpuname(void){ case 3: case 5: case 6: +#if defined(__x86_64__) || defined(__amd64__) + return CPUTYPE_CORE2; +#else return CPUTYPE_PENTIUM2; +#endif case 7: case 8: case 10: @@ -1379,6 +1383,8 @@ int get_cpuname(void){ break; case 7: // family 6 exmodel 7 switch (model) { + case 10: // Goldmont Plus + return CPUTYPE_NEHALEM; case 14: // Ice Lake if(support_avx512()) return CPUTYPE_SKYLAKEX;