Re: [PATCH v2 4/7] OvmfPkg/IndustryStandard: Introduce PageTable.h


Lendacky, Thomas
 

On 3/25/21 10:47 AM, Anthony PERARD wrote:
We are going to use the page table structure in yet another place,
collect the types and macro that can be used from another module
rather that making yet another copy.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2490
Signed-off-by: Anthony PERARD <anthony.perard@...>
This begs the question of whether there should be only one version of this
header file, now. There are still copies in other places, but maybe that
can be a future cleanup? I'll leave that decision to Laszlo.

With one minor comment below, otherwise:

Acked-by: Tom Lendacky <thomas.lendacky@...>

---
CC: Tom Lendacky <thomas.lendacky@...>
CC: Brijesh Singh <brijesh.singh@...>
---

Notes:
v2:
- new patch

.../IndustryStandard/PageTable.h} | 117 +-------------
.../BaseMemEncryptSevLib/X64/VirtualMemory.h | 143 +-----------------
2 files changed, 5 insertions(+), 255 deletions(-)
copy OvmfPkg/{Library/BaseMemEncryptSevLib/X64/VirtualMemory.h => Include/IndustryStandard/PageTable.h} (60%)
...

diff --git a/OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.h b/OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.h
index 996f94f07ebb..b621d811ca6f 100644
--- a/OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.h
+++ b/OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.h
@@ -20,151 +20,10 @@
#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Uefi.h>
+#include <IndustryStandard/PageTable.h>
Typically, these are preferred to be in sorted order.

Thanks,
Tom


#define SYS_CODE64_SEL 0x38

Join devel@edk2.groups.io to automatically receive all group messages.