diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-12-07 22:56:34 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-12-07 22:56:34 +0300 |
commit | f35e46631b28a63ca3887d7afef1a65a5544da52 (patch) | |
tree | 1f6c6c694608e10220fa6e36a7d5b973cc6f3c9a /arch/x86/mm/mem_encrypt_amd.c | |
parent | 55b224d90d44d794c1afab046c4fd9dc8be9247d (diff) | |
parent | f4116bfc44621882556bbf70f5284fbf429a5cf6 (diff) | |
download | linux-f35e46631b28a63ca3887d7afef1a65a5544da52.tar.xz |
Merge tag 'x86-int80-20231207' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 int80 fixes from Dave Hansen:
"Avoid VMM misuse of 'int 0x80' handling in TDX and SEV guests.
It also has the very nice side effect of getting rid of a bunch of
assembly entry code"
* tag 'x86-int80-20231207' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/tdx: Allow 32-bit emulation by default
x86/entry: Do not allow external 0x80 interrupts
x86/entry: Convert INT 0x80 emulation to IDTENTRY
x86/coco: Disable 32-bit emulation by default on TDX and SEV
Diffstat (limited to 'arch/x86/mm/mem_encrypt_amd.c')
-rw-r--r-- | arch/x86/mm/mem_encrypt_amd.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/x86/mm/mem_encrypt_amd.c b/arch/x86/mm/mem_encrypt_amd.c index a68f2dda0948..70b91de2e053 100644 --- a/arch/x86/mm/mem_encrypt_amd.c +++ b/arch/x86/mm/mem_encrypt_amd.c @@ -32,6 +32,7 @@ #include <asm/msr.h> #include <asm/cmdline.h> #include <asm/sev.h> +#include <asm/ia32.h> #include "mm_internal.h" @@ -481,6 +482,16 @@ void __init sme_early_init(void) */ if (sev_status & MSR_AMD64_SEV_ES_ENABLED) x86_cpuinit.parallel_bringup = false; + + /* + * The VMM is capable of injecting interrupt 0x80 and triggering the + * compatibility syscall path. + * + * By default, the 32-bit emulation is disabled in order to ensure + * the safety of the VM. + */ + if (sev_status & MSR_AMD64_SEV_ENABLED) + ia32_disable(); } void __init mem_encrypt_free_decrypted_mem(void) |