diff options
author | Anthony PERARD <anthony.perard@citrix.com> | 2021-04-12 14:30:01 +0100 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-04-13 11:54:58 +0000 |
commit | 51e0bd28bba9631fd3e3244668b6ab9c561817b2 (patch) | |
tree | c1c13ffc582782b8d11bf4979d0f0ebc8eabf891 /OvmfPkg/XenPlatformPei/Platform.h | |
parent | 9d6861494aaa987fb728828801c84eb89be283c8 (diff) | |
download | edk2-51e0bd28bba9631fd3e3244668b6ab9c561817b2.tar.gz edk2-51e0bd28bba9631fd3e3244668b6ab9c561817b2.tar.bz2 edk2-51e0bd28bba9631fd3e3244668b6ab9c561817b2.zip |
OvmfPkg/XenPlatformPei: Map extra physical address
Some information available in a Xen guest can be mapped anywhere in
the physical address space and they don't need to be backed by RAM.
For example, the shared info page.
While it's easier to put those pages anywhere, it is better to avoid
mapping it where the RAM is. It might split a nice 1G guest page table
into 4k pages and thus reducing performance of the guest when it
accesses its memory. Also mapping a page like the shared info page and
then unmapping it or mapping it somewhere else would leave a hole in
the RAM that the guest would propably not be able to use anymore.
So the patch introduces a new function which can be used to 1:1
mapping of guest physical memory above 4G during the PEI phase so we
can map the Xen shared pages outside of memory that can be used by
guest, and as high as possible.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20210412133003.146438-6-anthony.perard@citrix.com>
Diffstat (limited to 'OvmfPkg/XenPlatformPei/Platform.h')
-rw-r--r-- | OvmfPkg/XenPlatformPei/Platform.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/OvmfPkg/XenPlatformPei/Platform.h b/OvmfPkg/XenPlatformPei/Platform.h index 7661f4a8de..e70ca58078 100644 --- a/OvmfPkg/XenPlatformPei/Platform.h +++ b/OvmfPkg/XenPlatformPei/Platform.h @@ -127,6 +127,11 @@ XenGetE820Map ( UINT32 *Count
);
+EFI_STATUS
+PhysicalAddressIdentityMapping (
+ IN EFI_PHYSICAL_ADDRESS AddressToMap
+ );
+
extern EFI_BOOT_MODE mBootMode;
extern UINT8 mPhysMemAddressWidth;
|