mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sohil Mehta <sohil.mehta@intel.com>
To: Borislav Petkov <bp@kernel.org>, X86 ML <x86@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	"Borislav Petkov (AMD)" <bp@alien8.de>
Subject: Re: [PATCH 2/2] x86/microcode: Add microcode loader debugging functionality
Date: Mon, 11 Aug 2025 20:04:58 -0700	[thread overview]
Message-ID: <82cdc358-3551-4c8b-a387-0e9da4668b44@intel.com> (raw)
In-Reply-To: <20250809094206.28028-3-bp@kernel.org>

On 8/9/2025 2:42 AM, Borislav Petkov wrote:

> 
> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> index 7c095177da85..fc002b1a9f57 100644
> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -3770,6 +3770,13 @@
>  	microcode=      [X86] Control the behavior of the microcode loader.
>  	                Available options, comma separated:
>  
> +			dbg - Format: <bool>

Since this is all new code, would it be better to use the expanded form
of dbg everywhere?

s/dbg/debug/
s/MICROCODE_DBG/MICROCODE_DEBUG
s/ucode_dbg/ucode_debug

Also, I didn't understand the "Format: <bool>".

Isn't the usage similar to force_minrev? So microcode=debug should be
enough, right?

> +			enable debugging mode when run in a guest
> +
> +			base_rev=X - with <X> with format: <u32>
> +			Set the base microcode revision of each thread when in
> +			debug mode.
> +
>  			force_minrev
>  			Enable or disable the microcode minimal revision
>   			enforcement for the runtime microcode loader.


Slight preference for a tabbed description:

	debug
		enable debugging mode when run in a guest

	base_rev=X - with <X> with format: <u32>
		Set the base microcode revision of each thread when in
		debug mode.

	force_minrev
		Enable or disable the microcode minimal revision
		enforcement for the runtime microcode loader.


> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 58d890fe2100..462bf03aeda5 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -1360,6 +1360,18 @@ config MICROCODE_LATE_FORCE_MINREV
>  
>  	  If unsure say Y.
>  
> +config MICROCODE_DBG
> +	bool "Enable microcode loader debugging"
> +	default n

Isn't default n redundant? I am fine with keeping it to make it obvious.

> +	depends on MICROCODE

Should we also include a dependency on DEBUG_KERNEL?

> +	help
> +	  Enable code which allows for debugging the microcode loader in
> +	  a guest. Meaning the patch loading is simulated but everything else
> +	  related to patch parsing and handling is done as on baremetal with
> +	  the purpose of debugging solely the software side of things.
> +
> +	  You almost certainly want to say n here.
> +





  reply	other threads:[~2025-08-12  3:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-09  9:42 [PATCH 0/2] x86/microcode: Add debugging glue Borislav Petkov
2025-08-09  9:42 ` [PATCH 1/2] x86/microcode: Add microcode= cmdline parsing Borislav Petkov
2025-08-12  2:26   ` Sohil Mehta
2025-08-12 10:23     ` Borislav Petkov
2025-08-12 19:14       ` Sohil Mehta
2025-08-12 21:28         ` Borislav Petkov
2025-08-14 23:08   ` Chang S. Bae
2025-08-15  9:20     ` Borislav Petkov
2025-08-15 19:50       ` Chang S. Bae
2025-08-18 16:30       ` Sohil Mehta
2025-08-09  9:42 ` [PATCH 2/2] x86/microcode: Add microcode loader debugging functionality Borislav Petkov
2025-08-12  3:04   ` Sohil Mehta [this message]
2025-08-12 10:26     ` Borislav Petkov
2025-08-12 18:57       ` Sohil Mehta
2025-08-12 19:09         ` Borislav Petkov

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=82cdc358-3551-4c8b-a387-0e9da4668b44@intel.com \
    --to=sohil.mehta@intel.com \
    --cc=bp@alien8.de \
    --cc=bp@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®