|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 0/4] Add Kconfig option to remove microcode loading support
On 13.11.2025 09:50, Andrew Cooper wrote:
> On 12/11/2025 4:22 pm, Alejandro Vallejo wrote:
>> xen/arch/x86/Kconfig | 12 ++++
>> xen/arch/x86/cpu/microcode/Makefile | 9 ++-
>> xen/arch/x86/cpu/microcode/amd-base.c | 55 +++++++++++++++++++
>> xen/arch/x86/cpu/microcode/amd.c | 55 ++-----------------
>> xen/arch/x86/cpu/microcode/amd.h | 15 +++++
>> xen/arch/x86/cpu/microcode/base.c | 73 +++++++++++++++++++++++++
>> xen/arch/x86/cpu/microcode/core.c | 58 +-------------------
>> xen/arch/x86/cpu/microcode/intel-base.c | 50 +++++++++++++++++
>> xen/arch/x86/cpu/microcode/intel.c | 56 +++----------------
>> xen/arch/x86/cpu/microcode/intel.h | 16 ++++++
>> xen/arch/x86/cpu/microcode/private.h | 14 +++++
>> xen/arch/x86/efi/efi-boot.h | 2 +-
>> xen/arch/x86/platform_hypercall.c | 2 +
>> 13 files changed, 259 insertions(+), 158 deletions(-)
>> create mode 100644 xen/arch/x86/cpu/microcode/amd-base.c
>> create mode 100644 xen/arch/x86/cpu/microcode/amd.h
>> create mode 100644 xen/arch/x86/cpu/microcode/base.c
>> create mode 100644 xen/arch/x86/cpu/microcode/intel-base.c
>> create mode 100644 xen/arch/x86/cpu/microcode/intel.h
>
> This is awfully invasive for something that ultimately drops only a
> handful of lines of code.
>
> First, it should be CONFIG_MICROCODE_LOADING. We're not getting rid of
> all microcode capabilities. Also, of all the places where UCODE needs
> expanding properly, it's Kconfig.
>
> Next, annotate the functions that you conditionally don't reference in
> {amd,intel}_ucode_ops with __maybe_unused, and dead code elimination
> should do the rest.
Are you, btw, sure this would be Misra-compliant? Right now we solely
deviate __maybe_unused when used on labels which may really be unused,
afaics.
Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |