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] Recently some people complain that they cannot set the m

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Recently some people complain that they cannot set the maxmem for
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 15 Jul 2005 04:30:09 -0400
Delivery-date: Fri, 15 Jul 2005 08:30:31 +0000
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 50da9b240a1f331374758f92e50cee93fe2d4845
# Parent  79bb7dfb8fc1b56b3e121558f8541b426256f26f

Recently some people complain that they cannot set the maxmem for
domU. The problem is that some code wrongly treat dom.max_memkb as in
byte unit, instead of KB unit. This patch fixs the problem.

Signed-off-by: Nguyen Anh Quynh <aquynh@xxxxxxxxx>

diff -r 79bb7dfb8fc1 -r 50da9b240a1f tools/libxc/xc_domain.c
--- a/tools/libxc/xc_domain.c   Fri Jul 15 08:22:18 2005
+++ b/tools/libxc/xc_domain.c   Fri Jul 15 08:30:22 2005
@@ -107,7 +107,7 @@
 
         info->ssidref  = op.u.getdomaininfo.ssidref;
         info->nr_pages = op.u.getdomaininfo.tot_pages;
-        info->max_memkb = op.u.getdomaininfo.max_pages<<(PAGE_SHIFT);
+        info->max_memkb = op.u.getdomaininfo.max_pages << (PAGE_SHIFT - 10);
         info->shared_info_frame = op.u.getdomaininfo.shared_info_frame;
         info->cpu_time = op.u.getdomaininfo.cpu_time;
         info->vcpus = op.u.getdomaininfo.n_vcpu;
diff -r 79bb7dfb8fc1 -r 50da9b240a1f tools/libxc/xc_linux_save.c
--- a/tools/libxc/xc_linux_save.c       Fri Jul 15 08:22:18 2005
+++ b/tools/libxc/xc_linux_save.c       Fri Jul 15 08:30:22 2005
@@ -464,14 +464,14 @@
         goto out;
     }
     
-    nr_pfns = info.max_memkb >> PAGE_SHIFT; 
+    nr_pfns = info.max_memkb >> (PAGE_SHIFT - 10);
 
     /* cheesy sanity check */
-    if ( nr_pfns > 1024*1024 ){
+    if ( nr_pfns > 1024*1024 )
+    {
         ERR("Invalid state record -- pfn count out of range: %lu", nr_pfns);
         goto out;
     }
-
 
     /* Map the shared info frame */
     live_shinfo = xc_map_foreign_range(xc_handle, dom,

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Recently some people complain that they cannot set the maxmem for, Xen patchbot -unstable <=