Message ID | 20190409110844.14746-20-anthony.perard@citrix.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Specific platform to run OVMF in Xen PVH and HVM guests | expand |
On 04/09/19 13:08, Anthony PERARD wrote: > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> > --- > 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 > (1) Please write a nonempty commit message body. with that Acked-by: Laszlo Ersek <lersek@redhat.com> Thanks Laszlo
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
Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> --- OvmfPkg/XenPlatformPei/Platform.h | 5 +++++ OvmfPkg/XenPlatformPei/Xen.c | 13 +++++++++++++ 2 files changed, 18 insertions(+)