[PATCH v7 2/3] x86/boot/compressed: Skip Video Memory access in Decompressor for SEV-ES/SNP.
Borislav Petkov
bp at alien8.de
Wed Jun 5 13:14:15 PDT 2024
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
More information about the kexec
mailing list