Re: [Patch V1 3/7] x86/microcode/core: Move microcode_check() to cpu/microcode/core.c

From: Borislav Petkov
Date: Mon Dec 05 2022 - 16:27:55 EST


On Mon, Dec 05, 2022 at 09:05:54AM -0800, Ashok Raj wrote:
> I was trying to move this similar to how x86_read_arch_cap_msr()
> moved from x86/kernel/cpu/cpu.h -> asm/cpu.h.

But that is only a function prototype - not the *actual* function.

> Keeping the usage local since there is just one caller to microcode_check()
> but there are other users of get_cpu_cap() like in
> arch/x86/xen/enlighten_pv.c which seems to be reaching out to
> ../kernel/cpu/cpu.h.

Yah, that's the single use outside of kernel/cpu/. Looks like a hack to me. :)

But no worries, we will clean all that up sooner or later and
get_cpu_cap() will disappear someday soon hopefully.

> That said, what you say also makes sense. I'm fine with what you decide how
> this should look.

Yes pls.

Thx.

--
Regards/Gruss,
Boris.

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