[libvirt] [PATCH 2/2] libxl: set shadow memory for any guest type, not only HVM

Marek Marczykowski-Górecki marmarek at invisiblethingslab.com
Fri Aug 5 18:05:44 UTC 2016


Otherwise starting PVH guest will result in "arch_setup_bootlate:
mapping shared_info failed (pfn=..., rc=-1, errno: 12): Internal error".

After this change the behaviour is the same as in `xl`.

Signed-off-by: Marek Marczykowski-Górecki <marmarek at invisiblethingslab.com>
---
 src/libxl/libxl_conf.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index aa06586..155934c 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
@@ -494,11 +494,6 @@ libxlMakeDomBuildInfo(virDomainDefPtr def,
                 }
             }
         }
-
-        /* Allow libxl to calculate shadow memory requirements */
-        b_info->shadow_memkb =
-            libxl_get_required_shadow_memory(b_info->max_memkb,
-                                             b_info->max_vcpus);
     } else {
         /*
          * For compatibility with the legacy xen toolstack, default to pygrub
@@ -528,6 +523,11 @@ libxlMakeDomBuildInfo(virDomainDefPtr def,
             return -1;
     }
 
+    /* Allow libxl to calculate shadow memory requirements */
+    b_info->shadow_memkb =
+        libxl_get_required_shadow_memory(b_info->max_memkb,
+                                         b_info->max_vcpus);
+
     return 0;
 }
 
-- 
2.5.5




More information about the libvir-list mailing list