Re: [PATCH v3 1/6] x86/microcode: Add a parameter to microcode_check() to store CPU capabilities

From: Borislav Petkov
Date: Wed Jan 04 2023 - 13:21:26 EST


On Tue, Jan 03, 2023 at 10:02:07AM -0800, Ashok Raj wrote:
> This is a preparation before the next patch uses this to compare CPU

Once a patch is in git, the concept of "subsequent" or "next" patch becomes
ambiguous depending on how you're sorting them.

So you should strive for your commit messages to make sense on their own,
without referencing other "subsequent" or "next" patches.

> capabilities after performing an update.
>
> Add a parameter to store CPU capabilities before performing a microcode
> update.

" ... so that code later can do X."

And that is enough for an explanation.

> diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
> index 9cfca3d7d0e2..b9c7529c920e 100644
> --- a/arch/x86/kernel/cpu/common.c
> +++ b/arch/x86/kernel/cpu/common.c
> @@ -2302,25 +2302,23 @@ void cpu_init_secondary(void)
> * only when microcode has been updated. Caller holds microcode_mutex and CPU
> * hotplug lock.

<--- I guess you can document that new parameter here.

> */
> -void microcode_check(void)
> +void microcode_check(struct cpuinfo_x86 *info)

...

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette