diff mbox series

[v2,17/31] OvmfPkg/XenPlatformPei: Reserve hvmloader's memory only when it as runned

Message ID 20190409110844.14746-18-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

Commit Message

Anthony PERARD April 9, 2019, 11:08 a.m. UTC
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 OvmfPkg/XenPlatformPei/Xen.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Laszlo Ersek April 12, 2019, 9:09 a.m. UTC | #1
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/Xen.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/OvmfPkg/XenPlatformPei/Xen.c b/OvmfPkg/XenPlatformPei/Xen.c
> index 89933ec3e9..22c7a22c88 100644
> --- a/OvmfPkg/XenPlatformPei/Xen.c
> +++ b/OvmfPkg/XenPlatformPei/Xen.c
> @@ -275,7 +275,9 @@ InitializeXen (
>    // Reserve away HVMLOADER reserved memory [0xFC000000,0xFD000000).
>    // This needs to match HVMLOADER RESERVED_MEMBASE/RESERVED_MEMSIZE.
>    //
> -  AddReservedMemoryBaseSizeHob (0xFC000000, 0x1000000, FALSE);
> +  if (XenHvmloaderDetected ()) {
> +    AddReservedMemoryBaseSizeHob (0xFC000000, 0x1000000, FALSE);
> +  }
>  
>    PcdStatus = PcdSetBoolS (PcdPciDisableBusEnumeration, TRUE);
>    ASSERT_RETURN_ERROR (PcdStatus);
> 

(1) please fix the subject: s/as runned/has run/

(2) please write a nonempty commit message body.

With that:

Acked-by: Laszlo Ersek <lersek@redhat.com>

Thanks
Laszlo
diff mbox series

Patch

diff --git a/OvmfPkg/XenPlatformPei/Xen.c b/OvmfPkg/XenPlatformPei/Xen.c
index 89933ec3e9..22c7a22c88 100644
--- a/OvmfPkg/XenPlatformPei/Xen.c
+++ b/OvmfPkg/XenPlatformPei/Xen.c
@@ -275,7 +275,9 @@  InitializeXen (
   // Reserve away HVMLOADER reserved memory [0xFC000000,0xFD000000).
   // This needs to match HVMLOADER RESERVED_MEMBASE/RESERVED_MEMSIZE.
   //
-  AddReservedMemoryBaseSizeHob (0xFC000000, 0x1000000, FALSE);
+  if (XenHvmloaderDetected ()) {
+    AddReservedMemoryBaseSizeHob (0xFC000000, 0x1000000, FALSE);
+  }
 
   PcdStatus = PcdSetBoolS (PcdPciDisableBusEnumeration, TRUE);
   ASSERT_RETURN_ERROR (PcdStatus);