diff options
author | Joerg Roedel <jroedel@suse.de> | 2021-03-12 13:38:24 +0100 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2021-03-18 23:04:12 +0100 |
commit | f15a0a732aefb46f999c2a8aa8f9f16e71cec5b2 (patch) | |
tree | 58e7199d2b5a0659bd3e9162f0cf5b0fbefdedd4 /arch/x86/boot | |
parent | x86/boot/compressed/64: Check SEV encryption in the 32-bit boot-path (diff) | |
download | linux-f15a0a732aefb46f999c2a8aa8f9f16e71cec5b2.tar.xz linux-f15a0a732aefb46f999c2a8aa8f9f16e71cec5b2.zip |
x86/sev-es: Replace open-coded hlt-loops with sev_es_terminate()
There are a few places left in the SEV-ES C code where hlt loops and/or
terminate requests are implemented. Replace them all with calls to
sev_es_terminate().
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20210312123824.306-9-joro@8bytes.org
Diffstat (limited to 'arch/x86/boot')
-rw-r--r-- | arch/x86/boot/compressed/sev-es.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/arch/x86/boot/compressed/sev-es.c b/arch/x86/boot/compressed/sev-es.c index 27826c265aab..d904bd56b3e3 100644 --- a/arch/x86/boot/compressed/sev-es.c +++ b/arch/x86/boot/compressed/sev-es.c @@ -200,14 +200,8 @@ void do_boot_stage2_vc(struct pt_regs *regs, unsigned long exit_code) } finish: - if (result == ES_OK) { + if (result == ES_OK) vc_finish_insn(&ctxt); - } else if (result != ES_RETRY) { - /* - * For now, just halt the machine. That makes debugging easier, - * later we just call sev_es_terminate() here. - */ - while (true) - asm volatile("hlt\n"); - } + else if (result != ES_RETRY) + sev_es_terminate(GHCB_SEV_ES_REASON_GENERAL_REQUEST); } |