On Thu, May 30, 2024 at 11:37:14PM +0000, Ashish Kalra wrote:
> -     lines = boot_params_ptr->screen_info.orig_video_lines;
> -     cols = boot_params_ptr->screen_info.orig_video_cols;
> +     if (!(sev_status & MSR_AMD64_SEV_ES_ENABLED)) {
> +             lines = boot_params_ptr->screen_info.orig_video_lines;
> +             cols = boot_params_ptr->screen_info.orig_video_cols;
> +     }

By now I get an allergic reaction from this sprinkling of "if sev..."
everywhere in the code.

>       init_default_io_ops();

<--- right here there's a call to

        early_tdx_detect();

You can add a early_sev_detect() counterpart here and clear lines and
cols in it along with an explanation why it is being done.

This is at least a bit cleaner than this.

Thx.

-- 
Regards/Gruss,
    Boris.

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

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

Reply via email to