]> git.baikalelectronics.ru Git - kernel.git/commit
x86/compressed: Register GHCB memory when SEV-SNP is active
authorBrijesh Singh <brijesh.singh@amd.com>
Wed, 9 Feb 2022 18:10:10 +0000 (12:10 -0600)
committerBorislav Petkov <bp@suse.de>
Wed, 6 Apr 2022 11:14:24 +0000 (13:14 +0200)
commit12e26b9206872b2f361d729a02fd531e7ec7bfca
tree1a9da8387cd9b30e1ac28ca1992f45659e6d467b
parente2b64ebcd2bbcd5e56d28d658e470a9e366727cf
x86/compressed: Register GHCB memory when SEV-SNP is active

The SEV-SNP guest is required by the GHCB spec to register the GHCB's
Guest Physical Address (GPA). This is because the hypervisor may prefer
that a guest use a consistent and/or specific GPA for the GHCB associated
with a vCPU. For more information, see the GHCB specification section
"GHCB GPA Registration".

If hypervisor can not work with the guest provided GPA then terminate the
guest boot.

Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Venu Busireddy <venu.busireddy@oracle.com>
Link: https://lore.kernel.org/r/20220307213356.2797205-17-brijesh.singh@amd.com
arch/x86/boot/compressed/sev.c
arch/x86/include/asm/sev-common.h
arch/x86/kernel/sev-shared.c