Re: [Xen-devel] Re: [PATCH 00 of 36] x86/paravirt: groundwork for 64-bit Xen support

From: Yinghai Lu
Date: Thu Jul 03 2008 - 15:29:48 EST


On Thu, Jul 3, 2008 at 12:19 PM, Yinghai Lu <yhlu.kernel@xxxxxxxxx> wrote:
> On Thu, Jul 3, 2008 at 11:51 AM, Yinghai Lu <yhlu.kernel@xxxxxxxxx> wrote:
>> On Thu, Jul 3, 2008 at 11:41 AM, Jeremy Fitzhardinge <jeremy@xxxxxxxx> wrote:
> ..
>>> I modified the vmemmap code so it would create 4k mappings if PSE isn't
>>> supported. Did I get it wrong? It should have no effect when PSE is
>>> available (which is any time you're not running under Xen).
>>>
>>
>> it could be address continuous checkup for printout in
>> vmemmap_populated has some problem...
>
> you moved p_end = p + PMD_SIZE before...
>
> if (p_end != p || node_start != node) {

Ingo,

please put attached patch after jeremy's xen pv64 patches.

YH
[PATCH] x86: fix vmemmap printout check

Signed-off-by: Yinghai Lu <yhlu.kernel@xxxxxxxxx>

---
arch/x86/mm/init_64.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

Index: linux-2.6/arch/x86/mm/init_64.c
===================================================================
--- linux-2.6.orig/arch/x86/mm/init_64.c
+++ linux-2.6/arch/x86/mm/init_64.c
@@ -1057,9 +1057,6 @@ vmemmap_populate(struct page *start_page
PAGE_KERNEL_LARGE);
set_pmd(pmd, __pmd(pte_val(entry)));

- addr_end = addr + PMD_SIZE;
- p_end = p + PMD_SIZE;
-
/* check to see if we have contiguous blocks */
if (p_end != p || node_start != node) {
if (p_start)
@@ -1069,6 +1066,9 @@ vmemmap_populate(struct page *start_page
node_start = node;
p_start = p;
}
+
+ addr_end = addr + PMD_SIZE;
+ p_end = p + PMD_SIZE;
} else
vmemmap_verify((pte_t *)pmd, node, addr, next);
}