diff options
author | Jason Andryuk <jason.andryuk@amd.com> | 2024-04-11 16:25:30 -0400 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-08-30 16:55:41 +0000 |
commit | 043eab84e5adb2013c9623ce44f44f6a7ef8e037 (patch) | |
tree | 8a3473b5319e2fcd65de09256d7884d49efd3a28 /OvmfPkg | |
parent | 0e6f6c715c59a6a44f86e523460526b3217c8b62 (diff) | |
download | edk2-043eab84e5adb2013c9623ce44f44f6a7ef8e037.tar.gz edk2-043eab84e5adb2013c9623ce44f44f6a7ef8e037.tar.bz2 edk2-043eab84e5adb2013c9623ce44f44f6a7ef8e037.zip |
OvmfPkg/XenPlatformPei: Remove Hypercall Page
XenHypercallLib now makes direct hypercalls, so HyperPages is
unnecessary and can be removed.
Change the XenPvhDetected() ASSERT to use the Xen version. That has
never been 0, AFAIK.
Signed-off-by: Jason Andryuk <jason.andryuk@amd.com>
Diffstat (limited to 'OvmfPkg')
-rw-r--r-- | OvmfPkg/Include/Guid/XenInfo.h | 4 | ||||
-rw-r--r-- | OvmfPkg/XenPlatformPei/Xen.c | 23 |
2 files changed, 1 insertions, 26 deletions
diff --git a/OvmfPkg/Include/Guid/XenInfo.h b/OvmfPkg/Include/Guid/XenInfo.h index a8f6a36f1c..c5de783c06 100644 --- a/OvmfPkg/Include/Guid/XenInfo.h +++ b/OvmfPkg/Include/Guid/XenInfo.h @@ -14,10 +14,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent typedef struct {
///
- /// Beginning of the hypercall page.
- ///
- VOID *HyperPages;
- ///
/// Hypervisor major version.
///
UINT16 VersionMajor;
diff --git a/OvmfPkg/XenPlatformPei/Xen.c b/OvmfPkg/XenPlatformPei/Xen.c index 7f00eef11e..a54fd55c70 100644 --- a/OvmfPkg/XenPlatformPei/Xen.c +++ b/OvmfPkg/XenPlatformPei/Xen.c @@ -128,9 +128,6 @@ EFI_STATUS XenConnect (
)
{
- UINT32 Index;
- UINT32 TransferReg;
- UINT32 TransferPages;
UINT32 XenVersion;
EFI_XEN_OVMF_INFO *Info;
CHAR8 Sig[sizeof (Info->Signature) + 1];
@@ -140,24 +137,6 @@ XenConnect ( ASSERT (mXenLeaf != 0);
//
- // Prepare HyperPages to be able to make hypercalls
- //
-
- AsmCpuid (mXenLeaf + 2, &TransferPages, &TransferReg, NULL, NULL);
- mXenInfo.HyperPages = AllocatePages (TransferPages);
- if (!mXenInfo.HyperPages) {
- return EFI_OUT_OF_RESOURCES;
- }
-
- for (Index = 0; Index < TransferPages; Index++) {
- AsmWriteMsr64 (
- TransferReg,
- (UINTN)mXenInfo.HyperPages +
- (Index << EFI_PAGE_SHIFT) + Index
- );
- }
-
- //
// Find out the Xen version
//
@@ -283,7 +262,7 @@ XenPvhDetected ( //
// This function should only be used after XenConnect
//
- ASSERT (mXenInfo.HyperPages != NULL);
+ ASSERT (mXenInfo.VersionMajor);
return mXenHvmloaderInfo == NULL;
}
|