|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH] x86_64: do not assume head_64.S used 4KB pages when
To: |
hpa@xxxxxxxxx |
Subject: |
[Xen-devel] [PATCH] x86_64: do not assume head_64.S used 4KB pages when !use_pse |
From: |
<stefano.stabellini@xxxxxxxxxxxxx> |
Date: |
Thu, 23 Jun 2011 12:14:25 +0100 |
Cc: |
xen-devel@xxxxxxxxxxxxxxxxxxx, Stefano.Stabellini@xxxxxxxxxxxxx, konrad.wilk@xxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, mingo@xxxxxxx, hpa@xxxxxxxxxxxxxxx, yinghai@xxxxxxxxxx, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> |
Delivery-date: |
Thu, 23 Jun 2011 04:11:28 -0700 |
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 |
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
head_64.S, which sets up the initial page table on x86_64, is not aware
of PSE being enabled or disabled and it always allocates the initial
mapping using 2MB pages.
Therefore on x86_64 find_early_table_space shouldn't update the amount
of pages needed for pte pages depending on the size of the initial
mapping, because we know for sure that no pte pages have been allocated
yet.
Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Reported-by: Ingo Molnar <mingo@xxxxxxx>
---
arch/x86/mm/init.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
index 36bacfe..1e3098b 100644
--- a/arch/x86/mm/init.c
+++ b/arch/x86/mm/init.c
@@ -42,12 +42,19 @@ static void __init find_early_table_space(unsigned long
start,
(PMD_SIZE * PTRS_PER_PMD));
pmd_mapped *= (PMD_SIZE * PTRS_PER_PMD);
+ /*
+ * On x86_64 do not limit the size we need to cover with 4KB pages
+ * depending on the initial allocation because head_64.S always uses
+ * 2MB pages.
+ */
+#ifdef CONFIG_X86_32
if (start < PFN_PHYS(max_pfn_mapped)) {
if (PFN_PHYS(max_pfn_mapped) < end)
size -= PFN_PHYS(max_pfn_mapped) - start;
else
size = 0;
}
+#endif
#ifndef __PAGETABLE_PUD_FOLDED
if (end > pud_mapped) {
--
1.7.2.3
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-devel] [PATCH] x86_64: do not assume head_64.S used 4KB pages when !use_pse,
stefano.stabellini <=
|
|
|
|
|