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

Yinghai Lu
2008-07-03T19:29:46Z

[-- Attachment #1: Type: text/plain, Size: 718 bytes --]

On Thu, Jul 3, 2008 at 12:19 PM, Yinghai Lu <yhlu.kernel@gmail.com> wrote:
> On Thu, Jul 3, 2008 at 11:51 AM, Yinghai Lu <yhlu.kernel@gmail.com> wrote:
>> On Thu, Jul 3, 2008 at 11:41 AM, Jeremy Fitzhardinge <jeremy@goop.org> 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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: xen64_vmemmap_printout.patch --]
[-- Type: text/x-patch; name=xen64_vmemmap_printout.patch, Size: 925 bytes --]

[PATCH] x86: fix vmemmap printout check

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

---
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);
}