diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-12-21 10:47:34 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-12-21 10:47:34 +0000 |
commit | 8e73d3d71c9904a0de911f955b431c25fd63e2d1 (patch) | |
tree | 8430efab7bfed33db904a2d9877eaa590d53aeb2 /xen/arch/x86/x86_64/mm.c | |
parent | 0cb46aca265d3ff05819358803e4b8332b884a12 (diff) | |
download | xen-8e73d3d71c9904a0de911f955b431c25fd63e2d1.tar.gz xen-8e73d3d71c9904a0de911f955b431c25fd63e2d1.tar.bz2 xen-8e73d3d71c9904a0de911f955b431c25fd63e2d1.zip |
Fix bugs in frame table setup function when memory hot-add.
Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
Diffstat (limited to 'xen/arch/x86/x86_64/mm.c')
-rw-r--r-- | xen/arch/x86/x86_64/mm.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/xen/arch/x86/x86_64/mm.c b/xen/arch/x86/x86_64/mm.c index 84b483a497..a6954c743e 100644 --- a/xen/arch/x86/x86_64/mm.c +++ b/xen/arch/x86/x86_64/mm.c @@ -840,7 +840,8 @@ void cleanup_frame_table(struct mem_hotadd_info *info) 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_info *info) 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; } |