All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Vallejo <alejandro.garciavallejo@amd.com>
To: Alejandro Vallejo <alejandro.garciavallejo@amd.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	<xen-devel@lists.xenproject.org>
Cc: "Doug Goldstein" <cardoe@cardoe.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Anthony PERARD" <anthony.perard@vates.tech>,
	"Michal Orzel" <michal.orzel@amd.com>,
	"Jan Beulich" <jbeulich@suse.com>,
	"Julien Grall" <julien@xen.org>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	"Daniel P. Smith" <dpsmith@apertussolutions.com>,
	"Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>,
	Xen-devel <xen-devel-bounces@lists.xenproject.org>
Subject: Re: [PATCH v2 2/2] x86/ucode: Add Kconfig option to remove microcode loading
Date: Mon, 12 Jan 2026 20:12:59 +0100	[thread overview]
Message-ID: <DFMULPGYXFY8.2B2XN60W4G9IA@amd.com> (raw)
In-Reply-To: <DFMU244K4E7W.6M0TQ5AI1TUE@amd.com>

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


  reply	other threads:[~2026-01-12 19:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-12 15:02 [PATCH v2 0/2] Add Kconfig option to remove microcode loading support Alejandro Vallejo
2026-01-12 15:02 ` [PATCH v2 1/2] x86/ucode: Fix typo s/mitigiated/mitigated/ Alejandro Vallejo
2026-01-12 15:44   ` Andrew Cooper
2026-01-12 15:02 ` [PATCH v2 2/2] x86/ucode: Add Kconfig option to remove microcode loading Alejandro Vallejo
2026-01-12 17:15   ` Andrew Cooper
2026-01-12 18:47     ` Alejandro Vallejo
2026-01-12 19:12       ` Alejandro Vallejo [this message]
2026-01-12 19:51         ` Andrew Cooper
2026-01-12 19:47       ` Andrew Cooper
2026-01-13 10:43         ` Alejandro Vallejo
2026-01-13  8:58     ` Jan Beulich
2026-01-13 10:45       ` Alejandro Vallejo
2026-01-13 10:49         ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DFMULPGYXFY8.2B2XN60W4G9IA@amd.com \
    --to=alejandro.garciavallejo@amd.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=cardoe@cardoe.com \
    --cc=dpsmith@apertussolutions.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=marmarek@invisiblethingslab.com \
    --cc=michal.orzel@amd.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel-bounces@lists.xenproject.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.