|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH] safely calculate page number from maxmem
Currently we convert from maxmemkb to pages this way:
pages = max_memkb >> (PAGE_SHIFT - 10)
But I guess it is safer to do it like this (for more cautions and we
lose nothing anyway):
pages = (max_memkb + (1 << (PAGE_SHIFT-10)) - 1) >> (PAGE_SHIFT - 10)
Signed-off-by Nguyen Anh Quynh <aquynh@xxxxxxxxx>
$ diffstat maxmem2.patch
tools/libxc/xc_linux_save.c | 2 +-
xen/common/dom0_ops.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
maxmem2.patch
Description: Binary data
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-devel] [PATCH] safely calculate page number from maxmem,
aq <=
|
|
|
|
|