x86/sev: Register GHCB memory when SEV-SNP is active
authorBrijesh Singh <brijesh.singh@amd.com>
Wed, 9 Feb 2022 18:10:11 +0000 (12:10 -0600)
committerBorislav Petkov <bp@suse.de>
Wed, 6 Apr 2022 11:16:58 +0000 (13:16 +0200)
commit95d33bfaa3e169cfec1926e0d0f0c6b0ea75d763
tree42be2b1c8f9cb14f8a690f5be725dbc0511a6fc3
parent87294bdb7b4b73555b0fba45da1cdecdc6a0d5a8
x86/sev: 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 uses a consistent and/or specific GPA for the GHCB associated
with a vCPU. For more information, see the GHCB specification section
"GHCB GPA Registration".

  [ bp: Cleanup comments. ]

Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/20220307213356.2797205-18-brijesh.singh@amd.com
arch/x86/include/asm/sev.h
arch/x86/kernel/cpu/common.c
arch/x86/kernel/head64.c
arch/x86/kernel/sev-shared.c
arch/x86/kernel/sev.c