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

Re: [PATCH v2 2/2] x86/ucode: Add Kconfig option to remove microcode loading


  • To: Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>
  • Date: Mon, 12 Jan 2026 20:12:59 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=citrix.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • 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=Diup30xjS7Ne/xG0UQc2yl/qK6JjSrERes/xZyIbWQo=; b=MRtLngvBsG03jwXvhd39KSe5KvC7Atb7aObLtjEUns8kYAqzxyVXN04TH45nUeFdaDftlcwHMVm+VRmoQ7Vv8EH0iakZLON9rBfq9KGfxAa+fEpi6ibsaxI5RGciUA+8LDZgse/mAFwFekzPIKIWp7iP8v7Lbgk5annsVID12iaJiefEttRSLxvZv9RoHfdjupdIEPK+swgl65DOng07sK3WdxiODT7T1QNS2RvI3EDhcSYVuePK4MP3aOaMSx6UpxRBk4vyyeiMnnK28wespUZo0HLRBuokDiEsqeBAV0ZZud/Q3rAUoUByLdaetdE7h865MFIo/PPMp73PHeax/Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=DxMDUJ8W+x63N7c1uclnCBhUGrXKDfDs9v7hXAOLulznpO171F3fMbqRhRQ2XREoSXfRNWhsH8S8vCAcwLjvZvdKdE7zV7oJyWPmMv0JbCq6/yrGKxIvO4EBHrqOIJcLahbvnxVjSahwWYio3xLUdPS76pXwym1gP5xT9Mjhau8fAm7/9rjGsKM9TbYQ5U57AOz4bs8RS8ipZpAEbrmc67vyaTn8OtJt9r3iS4ly5u6juMd+2xdtlidgelIVFa9HpYGiAEMEcyywy7eVOdqd/9NaBxdrytV/+eEXClPo+IEXGZcamP7+kJhbhorlye5U6/E6pH1WkE/P9kS9xaEoLw==
  • Cc: Doug Goldstein <cardoe@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, "Michal Orzel" <michal.orzel@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>, Xen-devel <xen-devel-bounces@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 12 Jan 2026 19:13:27 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi,

On Mon Jan 12, 2026 at 7:47 PM CET, Alejandro Vallejo wrote:
> On Mon Jan 12, 2026 at 6:15 PM CET, Andrew Cooper wrote:
>> On 12/01/2026 3:02 pm, Alejandro Vallejo wrote:
>>>  automation/gitlab-ci/build.yaml    |  2 +-
>>>  docs/misc/efi.pandoc               |  2 ++
>>>  docs/misc/xen-command-line.pandoc  |  4 ++--
>>>  xen/arch/x86/Kconfig               | 14 +++++++++++++-
>>>  xen/arch/x86/cpu/microcode/amd.c   | 22 +++++++++++++---------
>>>  xen/arch/x86/cpu/microcode/core.c  | 25 ++++++++++++++++++-------
>>>  xen/arch/x86/cpu/microcode/intel.c | 16 +++++++++-------
>>>  xen/arch/x86/efi/efi-boot.h        |  3 ++-
>>>  xen/arch/x86/platform_hypercall.c  |  2 ++
>>>  xen/common/Makefile                |  3 ++-
>>>  10 files changed, 64 insertions(+), 29 deletions(-)
>>
>> Much nicer in terms of (non) invasiveness.

An interesting fact came to my attention. If you set a function pointer as
IS_ENABLED(x) ? foo : NULL, rather than ifdeffing out the compiler doesn't even
need __maybe_unused to eliminate the statics.

I'm adjusting as needed and creating something so that...

  custom_param_if("ucode", parse_ucode, IS_ENABLED(CONFIG_MICROCODE_LOADING));

... does the right thing. I'm sure it'll have uses outside this (minor) patch to
remove a number of cmdline handlers when the feature they control isn't active.

Cheers,
Alejandro



 


Rackspace

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