From: "tip-bot2 for Tom Lendacky" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Tom Lendacky <thomas.lendacky@amd.com>,
Borislav Petkov <bp@suse.de>, Joerg Roedel <jroedel@suse.de>,
x86 <x86@kernel.org>, LKML <linux-kernel@vger.kernel.org>
Subject: [tip: x86/seves] x86/sev-es: Use GHCB accessor for setting the MMIO scratch buffer
Date: Fri, 25 Sep 2020 15:24:59 -0000 [thread overview]
Message-ID: <160104749936.7002.15136223385577937831.tip-bot2@tip-bot2> (raw)
In-Reply-To: =?utf-8?q?=3Cba84deabdf44a7a880454fb351d189c6ad79d4ba=2E16010?= =?utf-8?q?41106=2Egit=2Ethomas=2Elendacky=40amd=2Ecom=3E?=
The following commit has been merged into the x86/seves branch of tip:
Commit-ID: 0ddfb1cf3b6b07c97cff16ea69931d986f9622ee
Gitweb: https://git.kernel.org/tip/0ddfb1cf3b6b07c97cff16ea69931d986f9622ee
Author: Tom Lendacky <thomas.lendacky@amd.com>
AuthorDate: Fri, 25 Sep 2020 08:38:26 -05:00
Committer: Borislav Petkov <bp@suse.de>
CommitterDate: Fri, 25 Sep 2020 17:12:41 +02:00
x86/sev-es: Use GHCB accessor for setting the MMIO scratch buffer
Use ghcb_set_sw_scratch() to set the GHCB scratch field, which will also
set the corresponding bit in the GHCB valid_bitmap field to denote that
sw_scratch is actually valid.
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Joerg Roedel <jroedel@suse.de>
Link: https://lkml.kernel.org/r/ba84deabdf44a7a880454fb351d189c6ad79d4ba.1601041106.git.thomas.lendacky@amd.com
---
arch/x86/kernel/sev-es.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/sev-es.c b/arch/x86/kernel/sev-es.c
index 6fcfdd3..4a96726 100644
--- a/arch/x86/kernel/sev-es.c
+++ b/arch/x86/kernel/sev-es.c
@@ -751,7 +751,7 @@ static enum es_result vc_do_mmio(struct ghcb *ghcb, struct es_em_ctxt *ctxt,
/* Can never be greater than 8 */
exit_info_2 = bytes;
- ghcb->save.sw_scratch = ghcb_pa + offsetof(struct ghcb, shared_buffer);
+ ghcb_set_sw_scratch(ghcb, ghcb_pa + offsetof(struct ghcb, shared_buffer));
return sev_es_ghcb_hv_call(ghcb, ctxt, exit_code, exit_info_1, exit_info_2);
}
reply other threads:[~2020-09-25 15:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=160104749936.7002.15136223385577937831.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=bp@suse.de \
--cc=jroedel@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=thomas.lendacky@amd.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®