Skip to content

Commit 55db8eb

Browse files
committed
Merge tag 'x86_sev_for_v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 SEV updates from Borislav Petkov: - Do the proper memory conversion of guest memory in order to be able to kexec kernels in SNP guests along with other adjustments and cleanups to that effect - Start converting and moving functionality from the sev-guest driver into core code with the purpose of supporting the secure TSC SNP feature where the hypervisor cannot influence the TSC exposed to the guest anymore - Add a "nosnp" cmdline option in order to be able to disable SNP support in the hypervisor and thus free-up resources which are not going to be used - Cleanups [ Reminding myself about the endless TLA's again: SEV is the AMD Secure Encrypted Virtualization - Linus ] * tag 'x86_sev_for_v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/sev: Cleanup vc_handle_msr() x86/sev: Convert shared memory back to private on kexec x86/mm: Refactor __set_clr_pte_enc() x86/boot: Skip video memory access in the decompressor for SEV-ES/SNP virt: sev-guest: Carve out SNP message context structure virt: sev-guest: Reduce the scope of SNP command mutex virt: sev-guest: Consolidate SNP guest messaging parameters to a struct x86/sev: Cache the secrets page address x86/sev: Handle failures from snp_init() virt: sev-guest: Use AES GCM crypto library x86/virt: Provide "nosnp" boot option for sev kernel command line x86/virt: Move SEV-specific parsing into arch/x86/virt/svm
2 parents 9db8b24 + 8bca85c commit 55db8eb

File tree

11 files changed

+543
-394
lines changed

11 files changed

+543
-394
lines changed

Documentation/arch/x86/x86_64/boot-options.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,3 +305,8 @@ The available options are:
305305

306306
debug
307307
Enable debug messages.
308+
309+
nosnp
310+
Do not enable SEV-SNP (applies to host/hypervisor only). Setting
311+
'nosnp' avoids the RMP check overhead in memory accesses when
312+
users do not want to run SEV-SNP guests.

arch/x86/boot/compressed/misc.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,19 @@ static void parse_mem_encrypt(struct setup_header *hdr)
385385
hdr->xloadflags |= XLF_MEM_ENCRYPTION;
386386
}
387387

388+
static void early_sev_detect(void)
389+
{
390+
/*
391+
* Accessing video memory causes guest termination because
392+
* the boot stage2 #VC handler of SEV-ES/SNP guests does not
393+
* support MMIO handling and kexec -c adds screen_info to the
394+
* boot parameters passed to the kexec kernel, which causes
395+
* console output to be dumped to both video and serial.
396+
*/
397+
if (sev_status & MSR_AMD64_SEV_ES_ENABLED)
398+
lines = cols = 0;
399+
}
400+
388401
/*
389402
* The compressed kernel image (ZO), has been moved so that its position
390403
* is against the end of the buffer used to hold the uncompressed kernel
@@ -440,6 +453,8 @@ asmlinkage __visible void *extract_kernel(void *rmode, unsigned char *output)
440453
*/
441454
early_tdx_detect();
442455

456+
early_sev_detect();
457+
443458
console_init();
444459

445460
/*

0 commit comments

Comments
 (0)