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/
Home Products Support Community News


[Xen-changelog] [xen-unstable] x86: fix frame table initialization when

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86: fix frame table initialization when hotplug memory regions were detected
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 04 Feb 2010 01:15:09 -0800
Delivery-date: Thu, 04 Feb 2010 01:16:09 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1265273596 0
# Node ID 91358472d8c40b25ac0704c2c1c3d86515952a22
# Parent  0c3e4a2f14d671f40746feee02d04f2dcde8f566
x86: fix frame table initialization when hotplug memory regions were detected

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>
 xen/arch/x86/mm.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff -r 0c3e4a2f14d6 -r 91358472d8c4 xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Wed Feb 03 09:46:38 2010 +0000
+++ b/xen/arch/x86/mm.c Thu Feb 04 08:53:16 2010 +0000
@@ -225,10 +225,11 @@ void __init init_frametable(void)
                               pdx_to_page(max_pdx - 1) + 1);
-        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));

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86: fix frame table initialization when hotplug memory regions were detected, Xen patchbot-unstable <=