Re: [PATCH] x86/fred: Fix early boot failures on SEV-ES/SNP guests

From: Nikunj A. Dadhania

Date: Thu Feb 05 2026 - 01:24:31 EST




On 2/5/2026 11:26 AM, Greg KH wrote:
> On Thu, Feb 05, 2026 at 05:10:30AM +0000, Nikunj A Dadhania wrote:
>> @@ -70,6 +67,17 @@ void cpu_init_fred_exceptions(void)
>> /* Use int $0x80 for 32-bit system calls in FRED mode */
>> setup_clear_cpu_cap(X86_FEATURE_SYSFAST32);
>> setup_clear_cpu_cap(X86_FEATURE_SYSCALL32);
>> +
>> + /*
>> + * For secondary processors, FRED bit in CR4 gets enabled in cr4_init()
>> + * and FRED MSRs are not configured till the end of this function. For
>> + * SEV-ES and SNP guests, any console write before the FRED MSRs are
>> + * setup will cause a #VC and cannot be handled. Move the pr_info to
>> + * the end of this function.
>> + *
>> + * When FRED is enabled by default, remove this log message
>> + */
>> + pr_info("Initialized FRED on CPU%d\n", smp_processor_id());
>
> Did you forget to fix this up?

I didn't forget, I have moved the message to the end of cpu_init_fred_exceptions()
because the original placement triggered #VC exceptions on SEV-ES/SNP guests before
FRED MSRs were configured, causing boot failures.

> Also, when the kernel is working properly, it is quiet, so why is this
> log message needed?
>
> thanks,
>
> greg k-h