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

Re: [PATCH 0/4] Add Kconfig option to remove microcode loading support


  • To: Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Thu, 13 Nov 2025 08:50:27 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=a5CE7BskFbAShkzoatBTPAQRq9eltihu2CpVsPkTlC4=; b=WGZKHyBfjnH76r51/ZM7doMLoLMD/Rw7qtV0aYBXnwo8V3rVODclrGF2P4uGTMW9Ey7W82UhpiqD4wmDGSDYwtxxrLt0tPvYXXtUqbkEdizzwW0PPkJVWomcuFnBc32Xd1KMp3HUn6nswebNW8s5wSQswDO8SgpNMVy0lAut/ZSY+yr6bCclvCIFq/KD3Odslioc15nyZ+JC/ISDORvsy2GY9Nj+7Ht2hVMcW+anC6+W7QEPlBkxMotTPZU5oh+DiH1Uz5aHlz5U01ISe6jtXRk1hy2H2Im2y+E1vr5W1F8bdAY8FZkN68qDotXuUxVVvH++6r4l8X/CHNNv4El2tA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=eidLP5OUCO2z6Bin8XyR6kFb9QupWz+0GFVQ8183m8+5E/VHSD69PoW9RvgjOB/mkY5QCo1Q/zu2HnCG5iMUmLpzbE6IgFlvO88Zu53OSxSeV9cG+UDiXiNcRc/NH+weDpenOoXBFq/Q+DiRmgwRSEIqTXz2ZbiV2WRtlSoODB/uQ0AKrGcqon8RlOXOED5ViYLhojbwpruwkJGTThL+S8X7xPboxH6oAEsg9E3IHZAxyV3M5P1qI6EKE1MsS2TwAQzPk47DxbSTMLaM4l8pISYYp6+GRYEFwU9Y0oG2+dRQy86wHLJNjzmSwFKbTXMZqlbXfRWLyes5yC/wq1SCNw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 13 Nov 2025 08:50:45 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 12/11/2025 4:22 pm, Alejandro Vallejo wrote:
>  xen/arch/x86/Kconfig                    | 12 ++++
>  xen/arch/x86/cpu/microcode/Makefile     |  9 ++-
>  xen/arch/x86/cpu/microcode/amd-base.c   | 55 +++++++++++++++++++
>  xen/arch/x86/cpu/microcode/amd.c        | 55 ++-----------------
>  xen/arch/x86/cpu/microcode/amd.h        | 15 +++++
>  xen/arch/x86/cpu/microcode/base.c       | 73 +++++++++++++++++++++++++
>  xen/arch/x86/cpu/microcode/core.c       | 58 +-------------------
>  xen/arch/x86/cpu/microcode/intel-base.c | 50 +++++++++++++++++
>  xen/arch/x86/cpu/microcode/intel.c      | 56 +++----------------
>  xen/arch/x86/cpu/microcode/intel.h      | 16 ++++++
>  xen/arch/x86/cpu/microcode/private.h    | 14 +++++
>  xen/arch/x86/efi/efi-boot.h             |  2 +-
>  xen/arch/x86/platform_hypercall.c       |  2 +
>  13 files changed, 259 insertions(+), 158 deletions(-)
>  create mode 100644 xen/arch/x86/cpu/microcode/amd-base.c
>  create mode 100644 xen/arch/x86/cpu/microcode/amd.h
>  create mode 100644 xen/arch/x86/cpu/microcode/base.c
>  create mode 100644 xen/arch/x86/cpu/microcode/intel-base.c
>  create mode 100644 xen/arch/x86/cpu/microcode/intel.h

This is awfully invasive for something that ultimately drops only a
handful of lines of code.

First, it should be CONFIG_MICROCODE_LOADING.  We're not getting rid of
all microcode capabilities.  Also, of all the places where UCODE needs
expanding properly, it's Kconfig.

Next, annotate the functions that you conditionally don't reference in
{amd,intel}_ucode_ops with __maybe_unused, and dead code elimination
should do the rest.

~Andrew



 


Rackspace

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