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

xen-devel

[Top] [All Lists]

[Xen-devel] [PATCH] x86: fix frame table initialization when hotplug mem

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] x86: fix frame table initialization when hotplug memory regions were detected
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: 2010年2月03日 13:12:03 +0000
Delivery-date: 2010年2月03日 05:11:54 -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
max_idx is not a pdx, and hence needs to be converted to one in all
cases where it is being passed to pdx_to_page().
Also, just like for max_pdx, the conversion result of max_idx may
point into an address space hole, and hence it must not be used
directly as an argument to pdx_to_page(). Note that this doesn't apply
to the arguments passed to memset(), as the size argument would be
zero in the case of hitting an address space hole.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
--- 2010年01月27日.orig/xen/arch/x86/mm.c 2010年02月03日 13:29:46.000000000 +0100
+++ 2010年01月27日/xen/arch/x86/mm.c 2010年02月03日 13:39:05.000000000 +0100
@@ -227,10 +227,11 @@ void __init init_frametable(void)
 pdx_to_page(max_pdx - 1) + 1);
 else
 {
- init_frametable_chunk(pdx_to_page(sidx *PDX_GROUP_COUNT),
- pdx_to_page(max_idx * PDX_GROUP_COUNT));
- memset(pdx_to_page(max_pdx), -1, (unsigned long)pdx_to_page(max_idx) -
- (unsigned long)(pdx_to_page(max_pdx)));
+ init_frametable_chunk(pdx_to_page(sidx * PDX_GROUP_COUNT),
+ pdx_to_page(max_idx * PDX_GROUP_COUNT - 1) + 1);
+ memset(pdx_to_page(max_pdx), -1,
+ (unsigned long)pdx_to_page(max_idx * PDX_GROUP_COUNT) -
+ (unsigned long)pdx_to_page(max_pdx));
 }
 }
 

Attachment: x86-init-frametable-hotplug.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
Previous by Date: Re: [Xen-devel] Xen EPT modifications and interceptions , ken mark
Next by Date: [Xen-devel] [PATCH] x86: make max_mfn returned from XENMEM_machphys_mapping dynamic , Jan Beulich
Previous by Thread: [Xen-devel] xen 4.0.0 pvops-dom0: machine locks up , Yasir Assam
Next by Thread: RE: [Xen-devel] [PATCH] x86: fix frame table initialization when hotplug memory regions were detected , Jiang, Yunhong
Indexes: [Date] [Thread] [Top] [All Lists]

Copyright ©, Citrix Systems Inc. All rights reserved. Legal and Privacy
Citrix This site is hosted by Citrix

AltStyle によって変換されたページ (->オリジナル) /