WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] libxl: Set default shadow memory based on

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxl: Set default shadow memory based on final values for vcpus and memory
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 19 May 2010 05:16:12 -0700
Delivery-date: Wed, 19 May 2010 05:21:59 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1274253305 -3600
# Node ID ad319854bb30a4d924364b70a64f34454fa453e3
# Parent  c6db509d7e46be8b5a127ab9c99e76f644b2b21c
libxl: Set default shadow memory based on final values for vcpus and memory

Set default shadow memory based on final versions of memory and vcpus,
not on minimum default versions.

Failure mode was failed p2m allocaitons, e.g., with hvm-linux PV
drivers mapping the shared-info page.

Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
---
 tools/libxl/xl_cmdimpl.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff -r c6db509d7e46 -r ad319854bb30 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c  Tue May 18 15:18:26 2010 +0100
+++ b/tools/libxl/xl_cmdimpl.c  Wed May 19 08:15:05 2010 +0100
@@ -180,7 +180,7 @@ static void init_build_info(libxl_domain
     b_info->max_memkb = 32 * 1024;
     b_info->target_memkb = b_info->max_memkb;
     if (c_info->hvm) {
-        b_info->shadow_memkb = 
libxl_get_required_shadow_memory(b_info->max_memkb, b_info->max_vcpus);
+        b_info->shadow_memkb = 0; /* Set later */
         b_info->video_memkb = 8 * 1024;
         b_info->kernel = "hvmloader";
         b_info->hvm = 1;
@@ -478,11 +478,16 @@ static void parse_config_data(const char
         b_info->target_memkb = b_info->max_memkb;
     }
 
+    /* libxl_get_required_shadow_memory() must be called after final values
+     * (default or specified) for vcpus and memory are set, because the
+     * calculation depends on those values. */
+    b_info->shadow_memkb = !xlu_cfg_get_long(config, "shadow_memory", &l)
+        ? l * 1024
+        : libxl_get_required_shadow_memory(b_info->max_memkb,
+                                           b_info->max_vcpus);
+
     if (!xlu_cfg_get_long(config, "tsc_mode", &l))
         b_info->tsc_mode = l;
-
-    if (!xlu_cfg_get_long (config, "shadow_memory", &l))
-        b_info->shadow_memkb = l * 1024;
 
     if (!xlu_cfg_get_long (config, "videoram", &l))
         b_info->video_memkb = l * 1024;

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] libxl: Set default shadow memory based on final values for vcpus and memory, Xen patchbot-unstable <=