WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH 2/3] Fix bugs in frame table setup function when memory hot-add
From: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
Date: Mon, 21 Dec 2009 13:56:24 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Sun, 20 Dec 2009 21:59:11 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcqCAlP1kvmmjbDZRT2CqsF4vPd+aQ==
Thread-topic: [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
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH 2/3] Fix bugs in frame table setup function when memory hot-add, Jiang, Yunhong <=