[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] libxl, xl: Account for shadow memory for PV guests too



# HG changeset patch
# User Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
# Date 1290540300 0
# Node ID b609b1b983d646f19a6bdb5066368cfdc64796e8
# Parent  9ffd785319e09bc9a655d320f77d655ebec42514
libxl, xl: Account for shadow memory for PV guests too

We need to account for the memory needed by shadow pagetables even for PV
guests, because in that case shadow pagetables are used during live
migration.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 tools/libxl/libxl.c      |    2 +-
 tools/libxl/xl_cmdimpl.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff -r 9ffd785319e0 -r b609b1b983d6 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c       Tue Nov 23 19:23:22 2010 +0000
+++ b/tools/libxl/libxl.c       Tue Nov 23 19:25:00 2010 +0000
@@ -3026,7 +3026,7 @@ int libxl_domain_need_memory(libxl_ctx *
         if (strstr(dm_info->device_model, "stubdom-dm"))
             *need_memkb += 32 * 1024;
     } else
-        *need_memkb += LIBXL_PV_EXTRA_MEMORY;
+        *need_memkb += b_info->shadow_memkb + LIBXL_PV_EXTRA_MEMORY;
     if (*need_memkb % (2 * 1024))
         *need_memkb += (2 * 1024) - (*need_memkb % (2 * 1024));
     return 0;
diff -r 9ffd785319e0 -r b609b1b983d6 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c  Tue Nov 23 19:23:22 2010 +0000
+++ b/tools/libxl/xl_cmdimpl.c  Tue Nov 23 19:25:00 2010 +0000
@@ -332,8 +332,8 @@ static void init_build_info(libxl_domain
     b_info->target_memkb = b_info->max_memkb;
     b_info->disable_migrate = 0;
     b_info->cpuid = NULL;
+    b_info->shadow_memkb = 0;
     if (c_info->hvm) {
-        b_info->shadow_memkb = 0; /* Set later */
         b_info->video_memkb = 8 * 1024;
         b_info->kernel.path = strdup("hvmloader");
         b_info->hvm = 1;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.