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/Library/BaseMemEncryptSevLib/X64/SecVirtualMemory.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'OvmfPkg/Library/BaseMemEncryptSevLib/X64/SecVirtualMemory.c') diff --git a/OvmfPkg/Library/BaseMemEncryptSevLib/X64/SecVirtualMemory.c b/OvmfPkg/Library/BaseMemEncryptSevLib/X64/SecVirtualMemory.c index e0d3a15e85..a155c8729b 100644 --- a/OvmfPkg/Library/BaseMemEncryptSevLib/X64/SecVirtualMemory.c +++ b/OvmfPkg/Library/BaseMemEncryptSevLib/X64/SecVirtualMemory.c @@ -42,8 +42,6 @@ InternalGetMemEncryptionAddressMask ( @param[in] PhysicalAddress The physical address that is the start address of a memory region. @param[in] Length The length of memory region - @param[in] Flush Flush the caches before applying the - encryption mask @retval RETURN_SUCCESS The attributes were cleared for the memory region. @@ -56,8 +54,7 @@ EFIAPI InternalMemEncryptSevSetMemoryDecrypted ( IN PHYSICAL_ADDRESS Cr3BaseAddress, IN PHYSICAL_ADDRESS PhysicalAddress, - IN UINTN Length, - IN BOOLEAN Flush + IN UINTN Length ) { // @@ -89,8 +86,7 @@ EFIAPI InternalMemEncryptSevSetMemoryEncrypted ( IN PHYSICAL_ADDRESS Cr3BaseAddress, IN PHYSICAL_ADDRESS PhysicalAddress, - IN UINTN Length, - IN BOOLEAN Flush + IN UINTN Length ) { // -- cgit v1.2.3