# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1261392454 0
# Node ID 261e985e8c492f1dc130093cb819bb4f2b270032
# Parent 4639b2900f20307ca20e70cc92b8de0c5ee44b5c
Fix bugs in frame table setup function when memory hot-add.
Signed-off-by: Jiang, Yunhong <yunhong.jiang@xxxxxxxxx>
---
xen/arch/x86/x86_64/mm.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff -r 4639b2900f20 -r 261e985e8c49 xen/arch/x86/x86_64/mm.c
--- a/xen/arch/x86/x86_64/mm.c Mon Dec 21 10:47:21 2009 +0000
+++ b/xen/arch/x86/x86_64/mm.c Mon Dec 21 10:47:34 2009 +0000
@@ -840,7 +840,8 @@ void cleanup_frame_table(struct mem_hota
eva = (unsigned long)pdx_to_page(pfn_to_pdx(epfn));
/* Intialize all page */
- memset(mfn_to_page(spfn), -1, mfn_to_page(epfn) - mfn_to_page(spfn));
+ memset(mfn_to_page(spfn), -1,
+ (unsigned long)mfn_to_page(epfn) - (unsigned
long)mfn_to_page(spfn));
while (sva < eva)
{
@@ -932,7 +933,8 @@ int extend_frame_table(struct mem_hotadd
cidx = find_next_zero_bit(pdx_group_valid, eidx, nidx);
}
- memset(mfn_to_page(spfn), 0, mfn_to_page(epfn) - mfn_to_page(spfn));
+ memset(mfn_to_page(spfn), 0,
+ (unsigned long)mfn_to_page(epfn) - (unsigned
long)mfn_to_page(spfn));
return 0;
}
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|