From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=softfail (domain: citrix.com, ip: , mailfrom: prvs=99536ed25=anthony.perard@citrix.com) Received: from SMTP03.CITRIX.COM (SMTP03.CITRIX.COM []) by groups.io with SMTP; Tue, 09 Apr 2019 04:27:38 -0700 X-IronPort-AV: E=Sophos;i="5.60,329,1549929600"; d="scan'208";a="83096398" From: "Anthony PERARD" To: CC: Jordan Justen , Laszlo Ersek , Ard Biesheuvel , Julien Grall , , Anthony PERARD Subject: [PATCH v2 19/31] OvmfPkg/XenPlatformPei: Introduce XenPvhDetected Date: Tue, 9 Apr 2019 12:08:32 +0100 Message-ID: <20190409110844.14746-20-anthony.perard@citrix.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190409110844.14746-1-anthony.perard@citrix.com> References: <20190409110844.14746-1-anthony.perard@citrix.com> MIME-Version: 1.0 Return-Path: anthony.perard@citrix.com Content-Transfer-Encoding: 8bit Content-Type: text/plain Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Anthony PERARD --- OvmfPkg/XenPlatformPei/Platform.h | 5 +++++ OvmfPkg/XenPlatformPei/Xen.c | 13 +++++++++++++ 2 files changed, 18 insertions(+) diff --git a/OvmfPkg/XenPlatformPei/Platform.h b/OvmfPkg/XenPlatformPei/Platform.h index a524c23a43..c5a139f016 100644 --- a/OvmfPkg/XenPlatformPei/Platform.h +++ b/OvmfPkg/XenPlatformPei/Platform.h @@ -105,6 +105,11 @@ XenHvmloaderDetected ( VOID ); +BOOLEAN +XenPvhDetected ( + VOID + ); + VOID AmdSevInitialize ( VOID diff --git a/OvmfPkg/XenPlatformPei/Xen.c b/OvmfPkg/XenPlatformPei/Xen.c index b36eff524d..23ff3102b5 100644 --- a/OvmfPkg/XenPlatformPei/Xen.c +++ b/OvmfPkg/XenPlatformPei/Xen.c @@ -217,6 +217,19 @@ XenHvmloaderDetected ( return (mXenHvmloaderInfo != NULL); } +BOOLEAN +XenPvhDetected ( + VOID + ) +{ + // + // This function should only be used after XenConnect + // + ASSERT (mXenInfo.VersionMajor != 0); + + return mXenHvmloaderInfo == NULL; +} + VOID XenPublishRamRegions ( VOID -- Anthony PERARD