From: "Ashish Kalra" <ashish.kalra@amd.com>
To: "Dadhania, Nikunj" <NikunjAmritlal.Dadhania@amd.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>
Subject: Re: [edk2-devel] [PATCH v8 3/6] OvmfPkg/BaseMemEncryptLib: Invoke page encryption state change hypercall
Date: Tue, 7 Jun 2022 17:28:09 +0000 [thread overview]
Message-ID: <SN6PR12MB27677B2A778476E5075C40768EA59@SN6PR12MB2767.namprd12.prod.outlook.com> (raw)
In-Reply-To: <12370.1654591126491114870@groups.io>
[-- Attachment #1: Type: text/plain, Size: 1344 bytes --]
[AMD Official Use Only - General]
Hello Nikunj,
Yes we can move MemEncryptSevLiveMigrationIsEnabled() check here before calling SetMemoryEncDecHypercall3()
but then we also need to remove the same check from inside SetMemoryEncDecHypercall3() function.
Thanks,
Ashish
From: nikunj via groups.io <nikunj=amd.com@groups.io>
Sent: Tuesday, June 7, 2022 3:39 AM
To: Kalra, Ashish <Ashish.Kalra@amd.com>; devel@edk2.groups.io
Subject: Re: [edk2-devel] [PATCH v8 3/6] OvmfPkg/BaseMemEncryptLib: Invoke page encryption state change hypercall
Hi Ashish,
For case with latest OVMF and older qemu that does not enable live migrations,
SetMemoryEncDecHypercall3() returns RETURN_UNSUPPORTED, which is correct.
But then its actually treated as an error and OVMF sees an assert. This is a valid usecase
and OVMF should move ahead without live migration and HC_MAP_GPA_RANGE.
....
> + //
> + // Notify Hypervisor on C-bit status
> + //
> + if (CBitChanged) {
Should we call the SetMemoryEncDecHypercall() only if migration is enabled like below?
if (CBitChanged && MemEncryptSevLiveMigrationIsEnabled () {
> + Status = SetMemoryEncDecHypercall3 (
> + OrigPhysicalAddress,
> + EFI_SIZE_TO_PAGES (OrigLength),
> + (Mode == SetCBit) ? TRUE : FALSE
> + );
> + }
> +
> ...
>
> return Status;
Regards
Nikunj
[-- Attachment #2: Type: text/html, Size: 3926 bytes --]
next prev parent reply other threads:[~2022-06-07 17:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-05 17:28 [PATCH v8 0/6] SEV Live Migration support for OVMF Ashish Kalra
2022-04-05 17:30 ` [PATCH v8 1/6] OvmfPkg/BaseMemEncryptLib: Detect SEV live migration feature Ashish Kalra
2022-04-05 17:31 ` [PATCH v8 2/6] OvmfPkg/BaseMemEncryptLib: Hypercall API for page encryption state change Ashish Kalra
2022-04-05 17:32 ` [PATCH v8 3/6] OvmfPkg/BaseMemEncryptLib: Invoke page encryption state change hypercall Ashish Kalra
2022-06-07 8:38 ` [edk2-devel] " nikunj
2022-06-07 17:28 ` Ashish Kalra [this message]
2022-06-08 13:22 ` nikunj
2022-04-05 17:32 ` [PATCH v8 4/6] OvmfPkg/VmgExitLib: Encryption state change hypercall support in VC handler Ashish Kalra
2022-04-05 17:32 ` [PATCH v8 5/6] OvmfPkg/PlatformPei: Mark SEC GHCB page as unencrypted via hypercall Ashish Kalra
2022-05-31 15:42 ` [edk2-devel] " Nikunj A. Dadhania
2022-04-05 17:33 ` [PATCH v8 6/6] OvmfPkg/AmdSevDxe: Add support for SEV live migration 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=SN6PR12MB27677B2A778476E5075C40768EA59@SN6PR12MB2767.namprd12.prod.outlook.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