From 18e2fe9fa4ec124eee800e2adfb2388f37bf023a Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Mon, 15 Jun 2026 14:54:24 +0200 Subject: [PATCH 1/2] Add support for QEMU's virtual AMD cpu to avoid misdetection as Opteron --- driver/others/dynamic.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/driver/others/dynamic.c b/driver/others/dynamic.c index 338eb6f2b1..a3d951e7f2 100644 --- a/driver/others/dynamic.c +++ b/driver/others/dynamic.c @@ -829,7 +829,18 @@ static gotoblas_t *get_coretype(void){ } if (family == 0xf){ if ((exfamily == 0) || (exfamily == 2)) { - if (ecx & (1 << 0)) return &gotoblas_OPTERON_SSE3; + if (exmodel == 6 && model == 11) { /*QEMU virtual cpu*/ + if (support_avx512_bf16()) + return &gotoblas_COOPERLAKE; + if (support_avx512()) + return &gotoblas_SKYLAKEX; + if (support_avx2()) + return &gotoblas_ZEN; + else + return &gotoblas_BARCELONA; + } + } + if (ecx & (1 << 0)) return &gotoblas_OPTERON_SSE3; else return &gotoblas_OPTERON; } else if (exfamily == 5 || exfamily == 7) { return &gotoblas_BOBCAT; From 7126fcf40c598f81bce349d0bf0846657bd1ddf9 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Mon, 15 Jun 2026 15:42:16 +0200 Subject: [PATCH 2/2] fix extraneous brace --- driver/others/dynamic.c | 1 - 1 file changed, 1 deletion(-) diff --git a/driver/others/dynamic.c b/driver/others/dynamic.c index a3d951e7f2..f08446c58e 100644 --- a/driver/others/dynamic.c +++ b/driver/others/dynamic.c @@ -838,7 +838,6 @@ static gotoblas_t *get_coretype(void){ return &gotoblas_ZEN; else return &gotoblas_BARCELONA; - } } if (ecx & (1 << 0)) return &gotoblas_OPTERON_SSE3; else return &gotoblas_OPTERON;