From nobody Sat Feb 7 06:55:11 2026 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=1769524531; cv=none; d=zohomail.com; s=zohoarc; b=DssODVbBsEwwvEISEnY9NHMj2PKXSZBkz3FYVCor001/B9wUsl8Y3OpiW734g1HGpiWHix4w4hNGn7f+hCuorq88a5rPQoBe5VYHZAhZGpBbiAxRRV7I9ImxbRCCKDXDKJHMq6R9ihRX4AXhT9HkH3ezjywn9I8EncnDsZ6+nEY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769524531; 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=6jlsuAxDMybtaLr9AI1V7wQPqeY+1qN0TesPdnUkkpM=; b=AjZDpNtj9xLokprfOGOekJzXg6YPzgycDE48K0Yh/v9EsS2NJgqrMENMqTssQpjh0e+7J7dVjtBuYWxV0Pxt6v8rn9lcIxT3IaTCs5PlMLWfLX/r1Tyuh/uImn2mHBAYOzL4/UGaB419yqyE/NaL2hXpEAgqnoZqmy2uvQZgSOM= 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 1769524531744124.81792730449047; Tue, 27 Jan 2026 06:35:31 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.1214872.1525121 (Exim 4.92) (envelope-from ) id 1vkk9n-0003bT-1P; Tue, 27 Jan 2026 14:35:03 +0000 Received: by outflank-mailman (output) from mailman id 1214872.1525121; Tue, 27 Jan 2026 14:35:03 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vkk9m-0003bM-V5; Tue, 27 Jan 2026 14:35:02 +0000 Received: by outflank-mailman (input) for mailman id 1214872; Tue, 27 Jan 2026 14:35:01 +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 1vkk9l-0003bG-FQ for xen-devel@lists.xenproject.org; Tue, 27 Jan 2026 14:35:01 +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 5b467e7c-fb8d-11f0-9ccf-f158ae23cfc8; Tue, 27 Jan 2026 15:34:59 +0100 (CET) Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-47ee07570deso44617475e9.1 for ; Tue, 27 Jan 2026 06:34:59 -0800 (PST) Received: from localhost.localdomain (host-92-22-18-152.as13285.net. [92.22.18.152]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4804d5f422csm137571595e9.2.2026.01.27.06.34.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jan 2026 06:34:57 -0800 (PST) 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: 5b467e7c-fb8d-11f0-9ccf-f158ae23cfc8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1769524498; x=1770129298; 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=6jlsuAxDMybtaLr9AI1V7wQPqeY+1qN0TesPdnUkkpM=; b=eUOuFiRV66Fa237ACC5T5ULYmaWS0vzxTaEphSp8tpNuxn6mWZhUQ0aFN4f3pA5x5P NCqEBihaTEqrF/RcmJ0cGHqKkXsxxsMIq3XnQXXaAi12iV1pFdMBqKT/3WicVoqYgM9A dJhBHTgKhKq+fcnt/izhrz5dnto4QoTQFpsy8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769524498; x=1770129298; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=6jlsuAxDMybtaLr9AI1V7wQPqeY+1qN0TesPdnUkkpM=; b=ddQsDsoHWs84FV8BLt/Fk8VgB/b98Psrlb3TF4NL4kfKFuo+cB6vuhC+BAftIZdsz7 xcGCH5JLfWDa05xwS+i3FUM4O59pTmlMUTQFrRWJmOPxsP2uYA9IZfYJqiTzgJ/1VWKv qhWpp1YeLoQdNwhvzA+c5yCHcvSKYAKntLL/NrBzdoKuKnvtyYQz33/1/b6ZqlUaktNZ 8RIwqJxRcXOUYGVmeSzZPgN/xtuQOfj9nQBOmlrVhEISey+/Fc2IlDmrAccpXx1BbqW3 fDoLS1SNy2MSG6NBkpJEZ7rfxjLXzPuOrDWwToajuCpVrKeBVnwvFhKMEAqaMeS46Je+ myGg== X-Gm-Message-State: AOJu0Ywmy/inSa6bNhLJBhHhz7n+QxOmik+6vdtwf35tINVeewv1iBhh sSpGuUZih5ZP4m9BxSXKw6Q6FDUldzCaPQw/akHcgcXaU/uRvJbTZD/S0/YQRMxTwew0SC07vwf g0wLe X-Gm-Gg: AZuq6aJBXXQueW3Ut4r7Wpydmiyg1b8amBjv95w/YmLT9FGCP8Eu6BAdeVRYmi+xrRa J5T48BPzuTMT4bEv52QQEQ3p4CBX5G1mlxb1wf+PlhLc55lnSzbA8co05Nt79w5JHqdoZFYtTt+ vepB4P5KWpoBHcSozpf0/fShsgap5XSf5ia64kL310SmldI9qgO1hcs/pwaBce12md9somyylD3 0zxHCuTJF19bQPSa+oLV797xLbqaUn3CoeP041+yGEWmhf6A/Lj/KJWzGAyYs+upo/ESptYBwiL cM8vk4wkgZlFC5PL5HaD+1u8X4gWuCbLevXTaqG31q/JJkBeSWiS4ltapny5G7uAQgJWSKDglns t+qDcnWALHyIXs7N08jcC0lWL8jLay1OFtT/QP6ZrKt9GO8DDK04WJGYZj2FS4Mi/QK7EowubOZ doTrcUNpCTFxntVOYmz8rxrOVI6fZNPi08jdFNA7r7ki+hCXBboL+daB6evVd9szHjlM+f7g== X-Received: by 2002:a05:600c:8b8b:b0:47e:e20e:bbb0 with SMTP id 5b1f17b1804b1-48069c2c15fmr27691825e9.6.1769524498191; Tue, 27 Jan 2026 06:34:58 -0800 (PST) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Teddy Astie Subject: [PATCH] x86/ucode: Support discrete modules being CPIO archives Date: Tue, 27 Jan 2026 14:34:56 +0000 Message-Id: <20260127143456.2260369-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: 1769524534088158501 Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 CC: Teddy Astie RFC. The docs update are rather nasy, and will take longer than I have rig= ht now. --- xen/arch/x86/cpu/microcode/core.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/cpu/microcode/core.c b/xen/arch/x86/cpu/microcode= /core.c index 55baf7386400..1dbc3749e531 100644 --- a/xen/arch/x86/cpu/microcode/core.c +++ b/xen/arch/x86/cpu/microcode/core.c @@ -760,6 +760,7 @@ static int __init early_microcode_load(struct boot_info= *bi) void *data =3D NULL; size_t size; struct microcode_patch *patch; + struct cpio_data cd; int idx =3D opt_mod_idx; int rc; =20 @@ -776,7 +777,6 @@ static int __init early_microcode_load(struct boot_info= *bi) for ( idx =3D 0; idx < bi->nr_modules; ++idx ) { const struct boot_module *bm =3D &bi->mods[idx]; - struct cpio_data cd; =20 /* Search anything unclaimed or likely to be a CPIO archive. */ if ( bm->kind !=3D BOOTMOD_UNKNOWN && bm->kind !=3D BOOTMOD_RA= MDISK ) @@ -844,6 +844,18 @@ static int __init early_microcode_load(struct boot_inf= o *bi) idx, size); return -ENODEV; } + + /* + * If this blob appears to be a CPIO archive, try interpreting it = as + * one. Otherwise treat it as a raw vendor blob. + */ + cd =3D find_cpio_data(ucode_ops.cpio_path, data, size); + if ( cd.data ) + { + data =3D cd.data; + size =3D cd.size; + } + goto found; } =20 base-commit: 18e255253a5a326deff0ade386e36d7965164533 --=20 2.39.5