[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241119180517.196079-2-ragavendra.bn@gmail.com>
Date: Tue, 19 Nov 2024 10:05:18 -0800
From: Ragavendra <ragavendra.bn@...il.com>
To: tglx@...utronix.de,
mingo@...hat.com,
bp@...en8.de,
dave.hansen@...ux.intel.com,
hpa@...or.com,
thomas.lendacky@....com,
ardb@...nel.org,
tzimmermann@...e.de,
bhelgaas@...gle.com
Cc: x86@...nel.org,
linux-kernel@...r.kernel.org,
Ragavendra <ragavendra.bn@...il.com>
Subject: [PATCH] Updating es_em_ctxt fi to zero
Updating es_em_ctxt to zero for the ctxt->fi variable in
verify_exception_info when ES_EXCEPTION is returned.
Fixes: 34ff65901735 x86/sev: Use kernel provided SVSM Calling Areas
Signed-off-by: Ragavendra Nagraj <ragavendra.bn@...il.com>
---
arch/x86/coco/sev/shared.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/coco/sev/shared.c b/arch/x86/coco/sev/shared.c
index 71de53194089..b8540d85e6f0 100644
--- a/arch/x86/coco/sev/shared.c
+++ b/arch/x86/coco/sev/shared.c
@@ -239,6 +239,8 @@ static enum es_result verify_exception_info(struct ghcb *ghcb, struct es_em_ctxt
if ((info & SVM_EVTINJ_VALID) &&
((v == X86_TRAP_GP) || (v == X86_TRAP_UD)) &&
((info & SVM_EVTINJ_TYPE_MASK) == SVM_EVTINJ_TYPE_EXEPT)) {
+ memset(&ctxt->fi, 0, sizeof(ctxt->fi));
+
ctxt->fi.vector = v;
if (info & SVM_EVTINJ_VALID_ERR)
--
2.46.1
Powered by blists - more mailing lists