* [tip: x86/urgent] x86/sev: Return an error on a returned non-zero SW_EXITINFO1[31:0]
@ 2021-10-01 9:52 tip-bot2 for Tom Lendacky
0 siblings, 0 replies; only message in thread
From: tip-bot2 for Tom Lendacky @ 2021-10-01 9:52 UTC (permalink / raw)
To: linux-tip-commits
Cc: Tom Lendacky, Borislav Petkov, stable, x86, linux-kernel
The following commit has been merged into the x86/urgent branch of tip:
Commit-ID: 06f2ac3d4219bbbfd93d79e01966a42053084f11
Gitweb: https://git.kernel.org/tip/06f2ac3d4219bbbfd93d79e01966a42053084f11
Author: Tom Lendacky <thomas.lendacky@amd.com>
AuthorDate: Thu, 30 Sep 2021 23:42:01 -05:00
Committer: Borislav Petkov <bp@suse.de>
CommitterDate: Fri, 01 Oct 2021 11:14:41 +02:00
x86/sev: Return an error on a returned non-zero SW_EXITINFO1[31:0]
After returning from a VMGEXIT NAE event, SW_EXITINFO1[31:0] is checked
for a value of 1, which indicates an error and that SW_EXITINFO2
contains exception information. However, future versions of the GHCB
specification may define new values for SW_EXITINFO1[31:0], so really
any non-zero value should be treated as an error.
Fixes: 597cfe48212a ("x86/boot/compressed/64: Setup a GHCB-based VC Exception handler")
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: <stable@vger.kernel.org> # 5.10+
Link: https://lkml.kernel.org/r/efc772af831e9e7f517f0439b13b41f56bad8784.1633063321.git.thomas.lendacky@amd.com
---
arch/x86/kernel/sev-shared.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/kernel/sev-shared.c b/arch/x86/kernel/sev-shared.c
index 9f90f46..bf1033a 100644
--- a/arch/x86/kernel/sev-shared.c
+++ b/arch/x86/kernel/sev-shared.c
@@ -130,6 +130,8 @@ static enum es_result sev_es_ghcb_hv_call(struct ghcb *ghcb,
} else {
ret = ES_VMM_ERROR;
}
+ } else if (ghcb->save.sw_exit_info_1 & 0xffffffff) {
+ ret = ES_VMM_ERROR;
} else {
ret = ES_OK;
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-10-01 9:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-01 9:52 [tip: x86/urgent] x86/sev: Return an error on a returned non-zero SW_EXITINFO1[31:0] tip-bot2 for Tom Lendacky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).