linux-stable/arch/x86/boot/compressed
Brijesh Singh cbd3d4f7c4 x86/sev: Check SEV-SNP features support
Version 2 of the GHCB specification added the advertisement of features
that are supported by the hypervisor. If the hypervisor supports SEV-SNP
then it must set the SEV-SNP features bit to indicate that the base
functionality is supported.

Check that feature bit while establishing the GHCB; if failed, terminate
the guest.

Version 2 of the GHCB specification adds several new Non-Automatic Exits
(NAEs), most of them are optional except the hypervisor feature. Now
that the hypervisor feature NAE is implemented, bump the GHCB maximum
supported protocol version.

While at it, move the GHCB protocol negotiation check from the #VC
exception handler to sev_enable() so that all feature detection happens
before the first #VC exception.

While at it, document why the GHCB page cannot be setup from
load_stage2_idt().

  [ bp: Massage commit message. ]

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-13-brijesh.singh@amd.com
2022-04-06 13:10:23 +02:00
..
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
Makefile Kbuild updates for v5.17 2022-01-19 11:15:19 +02:00
acpi.c x86/boot: Fix -Wint-to-pointer-cast build warning 2020-05-04 15:22:16 +02:00
cmdline.c x86/boot: Build the command line parsing code unconditionally 2019-02-01 11:51:01 +01:00
cpuflags.c x86/sev-es: Check required CPU features for SEV-ES 2020-09-10 21:49:25 +02:00
early_serial_console.c
efi_thunk_64.S - Get rid of all the .fixup sections because this generates 2022-01-12 16:31:19 -08:00
error.c
error.h
head_32.S x86: clean up symbol aliasing 2022-02-22 16:21:34 +00:00
head_64.S x86/compressed/64: Detect/setup SEV/SME features earlier during boot 2022-04-06 13:02:21 +02:00
ident_map_64.c - Remove all uses of TIF_IA32 and TIF_X32 and reclaim the two bits in the end 2020-12-14 13:45:26 -08:00
idt_64.c x86/sev: Check SEV-SNP features support 2022-04-06 13:10:23 +02:00
idt_handlers_64.S x86/boot/compressed/64: Setup a GHCB-based VC Exception handler 2020-09-07 19:45:25 +02:00
kaslr.c x86/boot/compressed: Avoid duplicate malloc() implementations 2021-10-27 11:07:59 +02:00
kernel_info.S x86/boot: Introduce setup_indirect 2019-11-12 16:21:15 +01:00
mem_encrypt.S x86/compressed/64: Detect/setup SEV/SME features earlier during boot 2022-04-06 13:02:21 +02:00
misc.c fortify: Detect struct member overflows in memmove() at compile-time 2022-02-13 16:50:06 -08:00
misc.h x86/compressed/64: Detect/setup SEV/SME features earlier during boot 2022-04-06 13:02:21 +02:00
mkpiggy.c x86/boot: Remove run-time relocations from head_{32,64}.S 2020-08-14 12:52:35 +02:00
pgtable.h
pgtable_64.c lib/string: Move helper functions out of string.c 2021-09-25 08:20:49 -07:00
sev.c x86/sev: Check SEV-SNP features support 2022-04-06 13:10:23 +02:00
string.c x86/boot: Provide KASAN compatible aliases for string routines 2019-05-24 08:44:16 +02:00
vmlinux.lds.S x86/boot/compressed: Add missing debugging sections to output 2020-09-01 10:03:18 +02:00