|
|
|
|
|
|
|
|
|
|
xen-ppc-devel
Re: [XenPPC][Patch] memory alignment check for allocMem
Jimi Xenidis wrote:
Thanks Yi, Actually the typo was that I wanted to use "%" for modulo.
I'd prefer that because number bigger than int are a little wierd in
python (at least to me).
BTW: why do you have 2 hunks in your diff?
-JX
On Nov 20, 2006, at 9:44 AM, geyi wrote:
--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
The other one is for _allocMem2, the memory-allocate function for domain
restore. You can find it in my previous patch.
--
Yi Ge <kudva@xxxxxxxxxxxxxx>
_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel
|
|
|
|
|