[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] x86/AMD: extend Zenbleed check to models "good" ucode isn't known for


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 22 Aug 2023 16:22:13 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+rimVZimHKKy59YK9PiaDDDNC//LNm9xS2QFG7NPHwU=; b=faiYWhANPWU0utOfEXi8x5uz4fHwRx05neKQfF9rlETsth4isX2XrfiJr4LYOpKcM7pMIoYntdkKH+REea+Rop1ZHAJWsnHct9zJHXrsHpTLNRBawrkRN2GVLEoqf7PUn8V2KAFRpjep8qjjQoCu4kHOFwFomFMfOJNnNadd3hcl4n1nu8v7F0tQTgy8GymyjNlb1bjTll12WyBlVb2ZiDuLxgSd23Ecxl87HbgHllNBAl9olYFmBSNlnR7bchsums9q9YIPo1dtPxtZ1ebxqijrXvtWeQ4eSkWsRNR3aVhSNen4mq+vTsS1UqIUXgpGI0qyEVTwZcLlNW5XmDG9qg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Zd8Pgc3uY9NNXKgi8RD10kk7N6ZMztU9HQgXz2mwR6HDxwYB7ESx2teAVt2b8dzSnUIpj8ZhvQJZVzXJjjjNN+L+07+ngeMrVfk8xtyiiNVj5I78rqVpIu7aiVIfE0dlz08IdzvCu5283FqJMAv4IvwtwwVlMVV56Wxa83zI6Cgi68ZPhKJbLstxKGWIpsJF2RN8BuBXNcJ+WYzEHaFObbfk6R8w7YlEbTR07do28p7ZXYTOESS/OS1oyqEGBZglagYlsGPv6QWkkkhSJ7Nvo6VNIUS1ndkoY5fUYzazHhie50XWf5IXz80Bv2GMz4x58zdizEMYeKO6WVtG0kElYA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Tue, 22 Aug 2023 14:22:30 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Reportedly the AMD Custom APU 0405 found on SteamDeck, models 0x90 and
0x91, (quoting the respective Linux commit) is similarly affected. Put
another instance of our Zen1 vs Zen2 distinction checks in
amd_check_zenbleed(), forcing use of the chickenbit irrespective of
ucode version (building upon real hardware never surfacing a version of
0xffffffff).

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/xen/arch/x86/cpu/amd.c
+++ b/xen/arch/x86/cpu/amd.c
@@ -936,10 +936,14 @@ void amd_check_zenbleed(void)
        case 0xa0 ... 0xaf: good_rev = 0x08a00008; break;
        default:
                /*
-                * With the Fam17h check above, parts getting here are Zen1.
-                * They're not affected.
+                * With the Fam17h check above, most parts getting here are
+                * Zen1.  They're not affected.  Assume Zen2 ones making it
+                * here are affected regardless of microcode version.
                 */
-               return;
+               if (!boot_cpu_has(X86_FEATURE_AMD_STIBP))
+                       return;
+               good_rev = ~0u;
+               break;
        }
 
        rdmsrl(MSR_AMD64_DE_CFG, val);



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.