From: Ragavendra <ragavendra.bn@gmail.com>
To: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
dave.hansen@linux.intel.com, hpa@zytor.com,
thomas.lendacky@amd.com, ardb@kernel.org, tzimmermann@suse.de,
bhelgaas@google.com
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
Ragavendra <ragavendra.bn@gmail.com>
Subject: [PATCH] Updating es_em_ctxt fi to zero
Date: Tue, 19 Nov 2024 10:05:18 -0800 [thread overview]
Message-ID: <20241119180517.196079-2-ragavendra.bn@gmail.com> (raw)
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@gmail.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
next reply other threads:[~2024-11-19 18:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-19 18:05 Ragavendra [this message]
2024-11-19 19:26 ` [PATCH] Updating es_em_ctxt fi to zero Bjorn Helgaas
2024-11-19 19:46 ` Ragavendra B.N.
2024-11-19 19:56 ` Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241119180517.196079-2-ragavendra.bn@gmail.com \
--to=ragavendra.bn@gmail.com \
--cc=ardb@kernel.org \
--cc=bhelgaas@google.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=thomas.lendacky@amd.com \
--cc=tzimmermann@suse.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.