[edk2-devel] [PATCH 10/13] OvmfPkg/AmdSevDxe: use MemEncryptSevClearMmioPageEncMask() to clear EncMask
Laszlo Ersek
lersek at redhat.com
Tue May 11 11:18:26 UTC 2021
On 05/07/21 22:38, Brijesh Singh wrote:
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3275
>
> Use the MemEncryptSevClearMmioPageEncMask() to clear memory encryption mask
> for the Mmio and NonExistent address range.
>
> Cc: James Bottomley <jejb at linux.ibm.com>
> Cc: Min Xu <min.m.xu at intel.com>
> Cc: Jiewen Yao <jiewen.yao at intel.com>
> Cc: Tom Lendacky <thomas.lendacky at amd.com>
> Cc: Jordan Justen <jordan.l.justen at intel.com>
> Cc: Ard Biesheuvel <ardb+tianocore at kernel.org>
> Cc: Laszlo Ersek <lersek at redhat.com>
> Cc: Erdem Aktas <erdemaktas at google.com>
> Signed-off-by: Brijesh Singh <brijesh.singh at amd.com>
> ---
> OvmfPkg/AmdSevDxe/AmdSevDxe.c | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/OvmfPkg/AmdSevDxe/AmdSevDxe.c b/OvmfPkg/AmdSevDxe/AmdSevDxe.c
> index 689bfb376d03..80831b81facf 100644
> --- a/OvmfPkg/AmdSevDxe/AmdSevDxe.c
> +++ b/OvmfPkg/AmdSevDxe/AmdSevDxe.c
> @@ -53,11 +53,10 @@ AmdSevDxeEntryPoint (
> Desc = &AllDescMap[Index];
> if (Desc->GcdMemoryType == EfiGcdMemoryTypeMemoryMappedIo ||
> Desc->GcdMemoryType == EfiGcdMemoryTypeNonExistent) {
> - Status = MemEncryptSevClearPageEncMask (
> + Status = MemEncryptSevClearMmioPageEncMask (
> 0,
> Desc->BaseAddress,
> - EFI_SIZE_TO_PAGES (Desc->Length),
> - FALSE
> + EFI_SIZE_TO_PAGES (Desc->Length)
> );
> ASSERT_EFI_ERROR (Status);
> }
> @@ -73,11 +72,10 @@ AmdSevDxeEntryPoint (
> // the range.
> //
> if (PcdGet16 (PcdOvmfHostBridgePciDevId) == INTEL_Q35_MCH_DEVICE_ID) {
> - Status = MemEncryptSevClearPageEncMask (
> + Status = MemEncryptSevClearMmioPageEncMask (
> 0,
> FixedPcdGet64 (PcdPciExpressBaseAddress),
> - EFI_SIZE_TO_PAGES (SIZE_256MB),
> - FALSE
> + EFI_SIZE_TO_PAGES (SIZE_256MB)
> );
>
> ASSERT_EFI_ERROR (Status);
>
Reviewed-by: Laszlo Ersek <lersek at redhat.com>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#75005): https://edk2.groups.io/g/devel/message/75005
Mute This Topic: https://groups.io/mt/82665191/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list