]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86/sev: Make the #VC exception stacks part of the default stacks storage
authorBorislav Petkov <bp@suse.de>
Fri, 1 Oct 2021 19:41:20 +0000 (21:41 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Nov 2021 10:04:52 +0000 (11:04 +0100)
commit6a1968a2f2f6f8555526fccb19530721b5cbc444
treeff24780e129fa6812cbf5effc2b0aad093f9768c
parent8c57c9ff7e88d6c725d19744afadde9cb5447aa2
x86/sev: Make the #VC exception stacks part of the default stacks storage

commit 541ac97186d9ea88491961a46284de3603c914fd upstream.

The size of the exception stacks was increased by the commit in Fixes,
resulting in stack sizes greater than a page in size. The #VC exception
handling was only mapping the first (bottom) page, resulting in an
SEV-ES guest failing to boot.

Make the #VC exception stacks part of the default exception stacks
storage and allocate them with a CONFIG_AMD_MEM_ENCRYPT=y .config. Map
them only when a SEV-ES guest has been detected.

Rip out the custom VC stacks mapping and storage code.

 [ bp: Steal and adapt Tom's commit message. ]

Fixes: 7fae4c24a2b8 ("x86: Increase exception stack sizes")
Signed-off-by: Borislav Petkov <bp@suse.de>
Tested-by: Tom Lendacky <thomas.lendacky@amd.com>
Tested-by: Brijesh Singh <brijesh.singh@amd.com>
Link: https://lkml.kernel.org/r/YVt1IMjIs7pIZTRR@zn.tnic
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/include/asm/cpu_entry_area.h
arch/x86/kernel/sev.c
arch/x86/mm/cpu_entry_area.c