From nobody Thu Oct 30 18:58:35 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1753710152; cv=none; d=zohomail.com; s=zohoarc; b=beA35VV8ZucmfUMVmXvMqR3yWwpMz66vzPgo9Zv3EOXRSjKj7c7ahL8MaVXAkLBow6mjB73DIqZAOvvRmC3tmdO9YoX5oKkuijJo4PRzTo07ZveBJ3DZMcM0CItKApaeVt5PMnfJwaJXduguDzFH2oU7s3k/gH/jBNXa/LsycW4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1753710152; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=6BB32j7VZAYvL77F0hGwfuAosb6M/d68O8ajREyWfpc=; b=SVfx35ZRs4elZYJGdYxSzpUh+7b8p8hpQjkPVWoFSMrqeYekpc2b72YztzQsLhi2gtyrwuil+Dzq0SYa4clzciDD8djKr+F5gMG3BiVcSmUBJfzX0vPguRFAL+huQuNnsjMgSyAxeTZ7Ute48yX+SVjYNmymiOcLV1WsjbmEtX4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1753710152942321.21837166817727; Mon, 28 Jul 2025 06:42:32 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1061532.1427129 (Exim 4.92) (envelope-from ) id 1ugO7R-0000j7-WA; Mon, 28 Jul 2025 13:42:21 +0000 Received: by outflank-mailman (output) from mailman id 1061532.1427129; Mon, 28 Jul 2025 13:42:21 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ugO7R-0000j0-TS; Mon, 28 Jul 2025 13:42:21 +0000 Received: by outflank-mailman (input) for mailman id 1061532; Mon, 28 Jul 2025 13:42:20 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ugO7Q-0000Fy-33 for xen-devel@lists.xenproject.org; Mon, 28 Jul 2025 13:42:20 +0000 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [2a00:1450:4864:20::331]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id adc0c446-6bb8-11f0-b895-0df219b8e170; Mon, 28 Jul 2025 15:42:18 +0200 (CEST) Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-455ecacfc32so18686235e9.3 for ; Mon, 28 Jul 2025 06:42:18 -0700 (PDT) Received: from localhost.localdomain (host-195-149-20-212.as13285.net. [195.149.20.212]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-45870555065sm160569865e9.15.2025.07.28.06.42.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Jul 2025 06:42:16 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: adc0c446-6bb8-11f0-b895-0df219b8e170 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1753710137; x=1754314937; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=6BB32j7VZAYvL77F0hGwfuAosb6M/d68O8ajREyWfpc=; b=FEQTo8SHHHsULD6JsWf6QORLdGJTkElPLmH69RC6DUPRLW9q5cA/+QlI8pbxFLYaQZ SWy//e6ucBZYzqt1ahL77/IB8Q0Q+UgHpQkv/X3ZLTgsrrSQ4MYoEOAJA0MkDV+Ij/EY 3wealvRmSX6KXHfiKY5XJ3sCFCkWmPKKJnPLc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753710137; x=1754314937; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=6BB32j7VZAYvL77F0hGwfuAosb6M/d68O8ajREyWfpc=; b=RaHyvbvynkyYn1u+jbPuIzi984ukqbjE1lr01+usRZOVTqpUccnROBK990fqncWUKD rCqbvRoReW6A0qII/yoxk8cTVzV5InxmZkifH071RhqSdD5rrEgR+mg2+N5M4x+dqIBS UQEDA6VK3OaQ/9f7ScVyuipGJqWc5ZOCh1EvG+mU9nyWA9l92lg3tfIoXVUT3QYFbgNR HDuwV/vstf3GIU1HmKrrD9WILwXCTJo6HC2sN0/JcERWIiJIa3qpHb+UR78k9RW6maJG t69FiNQRV/8QbLqYKUUF6ZnqTJ0gAvzK3YMwYGE0YM1NBED6jjN/VxeRIok0iaWdgp9P Tkrg== X-Gm-Message-State: AOJu0YzOeY9HuKTbUwEJwpEWqrm0TXxTW5UUV3A2Bh/gIYNG9eLQqqBF 7kRVbdnKygPPxegOj6hz/S1vFbt7kI52hvR+PYuyniYkkXBib1f78vV2wbAbwjyeexYy3o1mItb 3J8GLjSc= X-Gm-Gg: ASbGncvt9lav9ASbN04eVLfVq+uI7ROn2CrJyleNgrAKQYqGRIrG5m5BACrkJN8jBel VVtDHxbKBs3dZTSONE9gj97lOO/pQDboDD6mI/TMd1Ntmdo6jLRXd1QChwdxQPTE7CHQ2bRtm+W eeH6AKiSK6jqGHkSPoLHwnaBta2KIOlXRWi5LVBpE50m9ezSFc/Y1lREWbyI+CEz4zXhzCRLtub CmyuH00HjrDNWck4p7Qjx95vqRTLcPaCGn7+fioLWeZHi2/MFTbvMcgiSgfYm+rIgN0/z0qTsTa VInNlpY/SRj3GZfSB1NH2h9kPLjW2gf61ogvnvJssEHWJqHQvZChvWftDwQZFavbTIf2xBqqRoa AMfTSZbnMt25bztMdGlejxmHbZ+pLgZ+9wIapfftv9Jl0be05BGxctFvwaUJWeqrDlM6VanN0DH hRLsmZ6fPqTEc= X-Google-Smtp-Source: AGHT+IGyOQOgqO9Og3BWxBICgD3v6a6hOytKV/LZXaXv2scTwbDXw+lTNdbYTi6XZbiomb5qket1AQ== X-Received: by 2002:a05:600c:699a:b0:442:f4a3:b5f2 with SMTP id 5b1f17b1804b1-45876304b8dmr88451335e9.6.1753710137319; Mon, 28 Jul 2025 06:42:17 -0700 (PDT) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PATCH] x86/ucode: Update vendor/family/model logic Date: Mon, 28 Jul 2025 14:42:15 +0100 Message-Id: <20250728134215.3183214-1-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1753710155975116600 Switch to the new fields. No functional change. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 --- xen/arch/x86/cpu/microcode/amd.c | 10 +++++----- xen/arch/x86/cpu/microcode/core.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/xen/arch/x86/cpu/microcode/amd.c b/xen/arch/x86/cpu/microcode/= amd.c index 8b09231c6c66..a5729229a403 100644 --- a/xen/arch/x86/cpu/microcode/amd.c +++ b/xen/arch/x86/cpu/microcode/amd.c @@ -122,7 +122,7 @@ static bool check_digest(const struct container_microco= de *mc) * microcode updates. Mitigate by checking the digest of the patch * against a list of known provenance. */ - if ( boot_cpu_data.x86 < 0x17 || + if ( boot_cpu_data.family < 0x17 || !opt_digest_check ) return true; =20 @@ -174,7 +174,7 @@ static bool verify_patch_size(uint32_t patch_size) #define F19H_MPB_MAX_SIZE 5568 #define F1AH_MPB_MAX_SIZE 15296 =20 - switch ( boot_cpu_data.x86 ) + switch ( boot_cpu_data.family ) { case 0x14: max_size =3D F14H_MPB_MAX_SIZE; @@ -222,7 +222,7 @@ static bool check_final_patch_levels(const struct cpu_s= ignature *sig) }; unsigned int i; =20 - if ( boot_cpu_data.x86 !=3D 0x10 ) + if ( boot_cpu_data.family !=3D 0x10 ) return false; =20 for ( i =3D 0; i < ARRAY_SIZE(final_levels); i++ ) @@ -516,14 +516,14 @@ static const struct microcode_ops __initconst_cf_clob= ber amd_ucode_ops =3D { =20 void __init ucode_probe_amd(struct microcode_ops *ops) { - if ( !opt_digest_check && boot_cpu_data.x86 >=3D 0x17 ) + if ( !opt_digest_check && boot_cpu_data.family >=3D 0x17 ) { printk(XENLOG_WARNING "Microcode patch additional digest checks disabled"); add_taint(TAINT_CPU_OUT_OF_SPEC); } =20 - if ( boot_cpu_data.x86 < 0x10 ) + if ( boot_cpu_data.family < 0x10 ) return; =20 *ops =3D amd_ucode_ops; diff --git a/xen/arch/x86/cpu/microcode/core.c b/xen/arch/x86/cpu/microcode= /core.c index 816e9bfe40ba..1b093bc98a58 100644 --- a/xen/arch/x86/cpu/microcode/core.c +++ b/xen/arch/x86/cpu/microcode/core.c @@ -198,7 +198,7 @@ static struct microcode_patch *parse_blob(const char *b= uf, size_t len) /* Returns true if ucode should be loaded on a given cpu */ static bool is_cpu_primary(unsigned int cpu) { - if ( boot_cpu_data.x86_vendor & (X86_VENDOR_AMD | X86_VENDOR_HYGON) ) + if ( boot_cpu_data.vendor & (X86_VENDOR_AMD | X86_VENDOR_HYGON) ) /* Load ucode on every logical thread/core */ return true; =20 @@ -876,7 +876,7 @@ int __init early_microcode_init(struct boot_info *bi) { const struct cpuinfo_x86 *c =3D &boot_cpu_data; =20 - switch ( c->x86_vendor ) + switch ( c->vendor ) { case X86_VENDOR_AMD: ucode_probe_amd(&ucode_ops); --=20 2.39.5