From: "Lendacky, Thomas" <thomas.lendacky@amd.com>
To: Ashish Kalra <Ashish.Kalra@amd.com>, devel@edk2.groups.io
Cc: dovmurik@linux.vnet.ibm.com, brijesh.singh@amd.com,
tobin@ibm.com, jejb@linux.ibm.com, lersek@redhat.com,
jordan.l.justen@intel.com, ard.biesheuvel@arm.com,
erdemaktas@google.com, jiewen.yao@intel.com, min.m.xu@intel.com
Subject: Re: [PATCH v5 2/4] OvmfPkg/VmgExitLib: Add support for hypercalls with SEV-ES.
Date: Fri, 16 Jul 2021 09:16:00 -0500 [thread overview]
Message-ID: <f3fdeb4c-ab9c-1ac2-9428-0aa7be7ec4e5@amd.com> (raw)
In-Reply-To: <5cf6633e2510dd399aba0d8dbb7b979577e77c13.1625687246.git.ashish.kalra@amd.com>
On 7/8/21 9:08 AM, Ashish Kalra wrote:
> From: Ashish Kalra <ashish.kalra@amd.com>
>
The subject isn't correct since the #VC handler already supports
hypercalls. It should say something like "Make the #VC handler aware of
the encryption state change hypercall" or "Update the #VC handler to
support the encryption state change hypercall" or something like that.
> Make the VC handler hypercall aware by adding support
> to compare the hypercall number and add the additional
> register values used by hypercall in the GHCB.
>
> Also mark the SEC GHCB page (that is mapped as
> unencrypted in ResetVector code) in the hypervisor
> guest page status tracking.
This part of the commit message shoudn't be here any more.
>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> Signed-off-by: Ashish Kalra <ashish.kalra@amd.com>
> ---
> OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c b/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
> index 41b0c8cc53..7f69bfab5f 100644
> --- a/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
> +++ b/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
> @@ -1171,6 +1171,15 @@ VmmCallExit (
> Ghcb->SaveArea.Cpl = (UINT8) (Regs->Cs & 0x3);
> VmgSetOffsetValid (Ghcb, GhcbCpl);
>
Add a comment that this hypercall requires these extra registers so you
are explicitly adding them.
Thanks,
Tom
> + if (Regs->Rax == KVM_HC_MAP_GPA_RANGE) {
> + Ghcb->SaveArea.Rbx = Regs->Rbx;
> + VmgSetOffsetValid (Ghcb, GhcbRbx);
> + Ghcb->SaveArea.Rcx = Regs->Rcx;
> + VmgSetOffsetValid (Ghcb, GhcbRcx);
> + Ghcb->SaveArea.Rdx = Regs->Rdx;
> + VmgSetOffsetValid (Ghcb, GhcbRdx);
> + }
> +
> Status = VmgExit (Ghcb, SVM_EXIT_VMMCALL, 0, 0);
> if (Status != 0) {
> return Status;
>
next prev parent reply other threads:[~2021-07-16 14:16 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-08 14:07 [PATCH v5 0/4] SEV Live Migration support for OVMF Ashish Kalra
2021-07-08 14:07 ` [PATCH v5 1/4] OvmfPkg/BaseMemEncryptLib: Support to issue unencrypted hypercall Ashish Kalra
2021-07-15 20:58 ` Dov Murik
2021-07-16 12:29 ` Ashish Kalra
2021-07-19 8:04 ` Dov Murik
2021-07-19 15:30 ` Ashish Kalra
2021-07-16 14:11 ` Lendacky, Thomas
2021-07-19 20:24 ` Ashish Kalra
2021-07-08 14:08 ` [PATCH v5 2/4] OvmfPkg/VmgExitLib: Add support for hypercalls with SEV-ES Ashish Kalra
2021-07-16 14:16 ` Lendacky, Thomas [this message]
2021-07-19 20:25 ` Ashish Kalra
2021-07-08 14:08 ` [PATCH v5 3/4] OvmfPkg/PlatformPei: Mark SEC GHCB page as unencrypted via hypercall Ashish Kalra
2021-07-16 14:22 ` Lendacky, Thomas
2021-07-19 20:27 ` Ashish Kalra
2021-07-08 14:09 ` [PATCH v5 4/4] OvmfPkg/AmdSevDxe: Add support for SEV live migration Ashish Kalra
2021-07-19 7:31 ` Dov Murik
2021-07-19 15:22 ` Ashish Kalra
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-list 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=f3fdeb4c-ab9c-1ac2-9428-0aa7be7ec4e5@amd.com \
--to=devel@edk2.groups.io \
/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