From adfa3327d4fc25d5eff5fedcdb11ecde52a995cc Mon Sep 17 00:00:00 2001 From: Brijesh Singh Date: Wed, 19 May 2021 13:19:49 -0500 Subject: OvmfPkg/BaseMemEncryptSevLib: remove Flush parameter BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3275 The Flush parameter is used to provide a hint whether the specified range is Mmio address. Now that we have a dedicated helper to clear the memory encryption mask for the Mmio address range, its safe to remove the Flush parameter from MemEncryptSev{Set,Clear}PageEncMask(). Since the address specified in the MemEncryptSev{Set,Clear}PageEncMask() points to a system RAM, thus a cache flush is required during the encryption mask update. Cc: James Bottomley Cc: Min Xu Cc: Jiewen Yao Cc: Tom Lendacky Cc: Jordan Justen Cc: Ard Biesheuvel Cc: Laszlo Ersek Cc: Erdem Aktas Reviewed-by: Laszlo Ersek Signed-off-by: Brijesh Singh Message-Id: <20210519181949.6574-14-brijesh.singh@amd.com> --- OvmfPkg/IoMmuDxe/AmdSevIoMmu.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'OvmfPkg/IoMmuDxe') diff --git a/OvmfPkg/IoMmuDxe/AmdSevIoMmu.c b/OvmfPkg/IoMmuDxe/AmdSevIoMmu.c index 49ffa24..b306280 100644 --- a/OvmfPkg/IoMmuDxe/AmdSevIoMmu.c +++ b/OvmfPkg/IoMmuDxe/AmdSevIoMmu.c @@ -252,8 +252,7 @@ IoMmuMap ( Status = MemEncryptSevClearPageEncMask ( 0, MapInfo->PlainTextAddress, - MapInfo->NumberOfPages, - TRUE + MapInfo->NumberOfPages ); ASSERT_EFI_ERROR (Status); if (EFI_ERROR (Status)) { @@ -407,8 +406,7 @@ IoMmuUnmapWorker ( Status = MemEncryptSevSetPageEncMask ( 0, MapInfo->PlainTextAddress, - MapInfo->NumberOfPages, - TRUE + MapInfo->NumberOfPages ); ASSERT_EFI_ERROR (Status); if (EFI_ERROR (Status)) { -- cgit v1.1