lkml.org 
[lkml]   [2022]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH] x86/sev-es: Replace open-coded hlt-loop with sev_es_terminate()
From
Replace the hlt loop in handle_vc_boot_ghcb() with an
sev_es_terminate(). The hlt gives the system no indication the guest is
unhappy. The termination request will signal there was an error during
VC handling during boot.


Cc: Borislav Petkov <bp@alien8.de>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Brijesh Singh <brijesh.singh@amd.com>
Cc: Joerg Roedel <jroedel@suse.de>
Cc: x86@kernel.org
Cc: kvm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Peter Gonda <pgonda@google.com>
---
arch/x86/kernel/sev.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/x86/kernel/sev.c b/arch/x86/kernel/sev.c
index e6d316a01fdd..ae87fbf27724 100644
--- a/arch/x86/kernel/sev.c
+++ b/arch/x86/kernel/sev.c
@@ -1425,6 +1425,5 @@ bool __init handle_vc_boot_ghcb(struct pt_regs *regs)
fail:
show_regs(regs);

- while (true)
- halt();
+ sev_es_terminate(GHCB_SEV_ES_GEN_REQ);
}
--
2.35.1.894.gb6a874cedc-goog
\
 
 \ /
  Last update: 2022-03-17 22:28    [W:0.063 / U:1.872 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site