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-ppc-devel

[XenPPC][Patch] memory alignment check for allocMem

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC][Patch] memory alignment check for allocMem
From: geyi <kudva@xxxxxxxxxxxxxx>
Date: Mon, 20 Nov 2006 09:44:12 -0500
Delivery-date: Mon, 20 Nov 2006 06:43:57 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.8 (Windows/20061025)


--
Yi Ge <kudva@xxxxxxxxxxxxxx>
# HG changeset patch
# User gy@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Date 1163804143 18000
# Node ID 210a82811d4e76edc319c67aae95361c1fd1908f
# Parent  8b64454006bbf0166b022728c1fc15b71fea426e
[XenPPC] change the memory size alignment check

Signed-off-by: Yi Ge <kudva@xxxxxxxxxxxxxx>

diff -r 8b64454006bb -r 210a82811d4e tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Fri Nov 17 17:46:25 2006 -0500
+++ b/tools/python/xen/xend/XendDomainInfo.py   Fri Nov 17 17:55:43 2006 -0500
@@ -1382,7 +1382,7 @@ class Common_XendDomainInfo:
         if memory < rma_kb:
             raise ValueError("Domain memory must be at least %d KB" % rma_kb)
 
-        if memory & (16 << 10):
+        if memory & ((16 << 10) - 1):
             raise ValueError("Domain memory %dKB must be a multiple of 16MB"
                              % memory)
 
@@ -2080,7 +2080,7 @@ class XendDomainInfo (Common_XendDomainI
         if memory < rma_kb:
             raise ValueError("Domain memory must be at least %d KB" % rma_kb)
 
-        if memory & (16 << 10):
+        if memory & ((16 << 10) - 1):
             raise ValueError("Domain memory %dKB must be a multiple of 16MB"
                              % memory)
 

_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel
<Prev in Thread] Current Thread [Next in Thread>