[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 2/3] Fix bugs in frame table setup function when memory hot-add



Fix bugs in frame table setup function when memory hot-add.

Signed-off-by: Jiang, Yunhong <yunhong.jiang@xxxxxxxxx>

diff -r 51b5c07d0d13 xen/arch/x86/x86_64/mm.c
--- a/xen/arch/x86/x86_64/mm.c  Thu Dec 17 03:49:26 2009 +0800
+++ b/xen/arch/x86/x86_64/mm.c  Thu Dec 17 03:49:32 2009 +0800
@@ -843,7 +843,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)
     {
@@ -935,7 +936,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;
 }
 


Attachment: fix_frametable.patch
Description: fix_frametable.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.