Displaying 20 results from an estimated 63 matches for "_page_table".
Did you mean:
page_table
2007 Apr 18
1
[PATCH 1/5] Add pagetable allocation notifiers
...dex: linux-2.6.13/arch/i386/mm/init.c
===================================================================
--- linux-2.6.13.orig/arch/i386/mm/init.c 2005-08-24 09:31:05.000000000 -0700
+++ linux-2.6.13/arch/i386/mm/init.c 2005-08-24 09:31:31.000000000 -0700
@@ -79,6 +79,7 @@ static pte_t * __init one_page_table_ini
{
if (pmd_none(*pmd)) {
pte_t *page_table = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE);
+ SetPagePTE(virt_to_page(page_table));
set_pmd(pmd, __pmd(__pa(page_table) | _PAGE_TABLE));
if (page_table != pte_offset_kernel(pmd, 0))
BUG();
Index: linux-2.6.13/arch/i386/mm/pageattr....
2007 Apr 18
1
[PATCH 1/5] Add pagetable allocation notifiers
...dex: linux-2.6.13/arch/i386/mm/init.c
===================================================================
--- linux-2.6.13.orig/arch/i386/mm/init.c 2005-08-24 09:31:05.000000000 -0700
+++ linux-2.6.13/arch/i386/mm/init.c 2005-08-24 09:31:31.000000000 -0700
@@ -79,6 +79,7 @@ static pte_t * __init one_page_table_ini
{
if (pmd_none(*pmd)) {
pte_t *page_table = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE);
+ SetPagePTE(virt_to_page(page_table));
set_pmd(pmd, __pmd(__pa(page_table) | _PAGE_TABLE));
if (page_table != pte_offset_kernel(pmd, 0))
BUG();
Index: linux-2.6.13/arch/i386/mm/pageattr....
2012 Nov 16
1
[PATCH v4] x86/xen: Use __pa_symbol instead of __pa on C visible symbols
...arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
index 4a05b39..a63e5f9 100644
--- a/arch/x86/xen/mmu.c
+++ b/arch/x86/xen/mmu.c
@@ -1486,7 +1486,8 @@ static int xen_pgd_alloc(struct mm_struct *mm)
if (user_pgd != NULL) {
user_pgd[pgd_index(VSYSCALL_START)] =
- __pgd(__pa(level3_user_vsyscall) | _PAGE_TABLE);
+ __pgd(__pa_symbol(level3_user_vsyscall) |
+ _PAGE_TABLE);
ret = 0;
}
@@ -1958,10 +1959,10 @@ void __init xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn)
* pgd.
*/
if (xen_feature(XENFEAT_writable_page_tables)) {
- native_write_cr3(__pa(init_level4_pgt...
2012 Nov 16
1
[PATCH v4] x86/xen: Use __pa_symbol instead of __pa on C visible symbols
...arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
index 4a05b39..a63e5f9 100644
--- a/arch/x86/xen/mmu.c
+++ b/arch/x86/xen/mmu.c
@@ -1486,7 +1486,8 @@ static int xen_pgd_alloc(struct mm_struct *mm)
if (user_pgd != NULL) {
user_pgd[pgd_index(VSYSCALL_START)] =
- __pgd(__pa(level3_user_vsyscall) | _PAGE_TABLE);
+ __pgd(__pa_symbol(level3_user_vsyscall) |
+ _PAGE_TABLE);
ret = 0;
}
@@ -1958,10 +1959,10 @@ void __init xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn)
* pgd.
*/
if (xen_feature(XENFEAT_writable_page_tables)) {
- native_write_cr3(__pa(init_level4_pgt...
2007 Apr 18
0
[PATCH 1/5] Paravirt page alloc.patch
...CONFIG_X86_PAE
pmd_table = (pmd_t *) alloc_bootmem_low_pages(PAGE_SIZE);
+ paravirt_alloc_pd(__pa(pmd_table) >> PAGE_SHIFT);
set_pgd(pgd, __pgd(__pa(pmd_table) | _PAGE_PRESENT));
pud = pud_offset(pgd, 0);
if (pmd_table != pmd_offset(pud, 0))
@@ -82,6 +83,7 @@ static pte_t * __init one_page_table_ini
{
if (pmd_none(*pmd)) {
pte_t *page_table = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE);
+ paravirt_alloc_pt(__pa(page_table) >> PAGE_SHIFT);
set_pmd(pmd, __pmd(__pa(page_table) | _PAGE_TABLE));
if (page_table != pte_offset_kernel(pmd, 0))
BUG();
@@ -347,6 +349,8 @@ sta...
2007 Apr 18
0
[PATCH 1/5] Paravirt page alloc.patch
...CONFIG_X86_PAE
pmd_table = (pmd_t *) alloc_bootmem_low_pages(PAGE_SIZE);
+ paravirt_alloc_pd(__pa(pmd_table) >> PAGE_SHIFT);
set_pgd(pgd, __pgd(__pa(pmd_table) | _PAGE_PRESENT));
pud = pud_offset(pgd, 0);
if (pmd_table != pmd_offset(pud, 0))
@@ -82,6 +83,7 @@ static pte_t * __init one_page_table_ini
{
if (pmd_none(*pmd)) {
pte_t *page_table = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE);
+ paravirt_alloc_pt(__pa(page_table) >> PAGE_SHIFT);
set_pmd(pmd, __pmd(__pa(page_table) | _PAGE_TABLE));
if (page_table != pte_offset_kernel(pmd, 0))
BUG();
@@ -347,6 +349,8 @@ sta...
2007 Apr 18
0
[PATCH 1/6] Page allocation hooks for VMI backend
...CONFIG_X86_PAE
pmd_table = (pmd_t *) alloc_bootmem_low_pages(PAGE_SIZE);
+ paravirt_alloc_pd(__pa(pmd_table) >> PAGE_SHIFT);
set_pgd(pgd, __pgd(__pa(pmd_table) | _PAGE_PRESENT));
pud = pud_offset(pgd, 0);
if (pmd_table != pmd_offset(pud, 0))
@@ -82,6 +83,7 @@ static pte_t * __init one_page_table_ini
{
if (pmd_none(*pmd)) {
pte_t *page_table = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE);
+ paravirt_alloc_pt(__pa(page_table) >> PAGE_SHIFT);
set_pmd(pmd, __pmd(__pa(page_table) | _PAGE_TABLE));
if (page_table != pte_offset_kernel(pmd, 0))
BUG();
@@ -347,6 +349,8 @@ sta...
2007 Apr 18
0
[PATCH 1/6] Page allocation hooks for VMI backend
...CONFIG_X86_PAE
pmd_table = (pmd_t *) alloc_bootmem_low_pages(PAGE_SIZE);
+ paravirt_alloc_pd(__pa(pmd_table) >> PAGE_SHIFT);
set_pgd(pgd, __pgd(__pa(pmd_table) | _PAGE_PRESENT));
pud = pud_offset(pgd, 0);
if (pmd_table != pmd_offset(pud, 0))
@@ -82,6 +83,7 @@ static pte_t * __init one_page_table_ini
{
if (pmd_none(*pmd)) {
pte_t *page_table = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE);
+ paravirt_alloc_pt(__pa(page_table) >> PAGE_SHIFT);
set_pmd(pmd, __pmd(__pa(page_table) | _PAGE_TABLE));
if (page_table != pte_offset_kernel(pmd, 0))
BUG();
@@ -347,6 +349,8 @@ sta...
2007 Apr 18
2
pgd_alloc and [cd]tors
Is there any real use in having a ctor/dtor for the pgd cache? Given
that all pgd allocation happens via pgd_alloc/pgd_free, why not just
fold the [cd]tor in?
I'm asking because Xen wants pgd[3] to be unshared in the PAE case, and
it looks to me like the easiest way to handle that is by making
pgd_alloc/free pv-ops and doing the appropriate thing in the Xen code.
Would need to sort out the
2007 Apr 18
2
pgd_alloc and [cd]tors
Is there any real use in having a ctor/dtor for the pgd cache? Given
that all pgd allocation happens via pgd_alloc/pgd_free, why not just
fold the [cd]tor in?
I'm asking because Xen wants pgd[3] to be unshared in the PAE case, and
it looks to me like the easiest way to handle that is by making
pgd_alloc/free pv-ops and doing the appropriate thing in the Xen code.
Would need to sort out the
2007 Apr 18
1
[RFC, PATCH 19/24] i386 Vmi mmu changes
...2:55:05.000000000 -0800
+++ linux-2.6.16-rc5/arch/i386/mm/init.c 2006-03-10 15:57:08.000000000 -0800
@@ -69,7 +69,6 @@ static pmd_t * __init one_md_table_init(
pud = pud_offset(pgd, 0);
pmd_table = pmd_offset(pud, 0);
#endif
-
return pmd_table;
}
@@ -81,6 +80,7 @@ static pte_t * __init one_page_table_ini
{
if (pmd_none(*pmd)) {
pte_t *page_table = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE);
+ mach_setup_pte(__pa(page_table) >> PAGE_SHIFT);
set_pmd(pmd, __pmd(__pa(page_table) | _PAGE_TABLE));
if (page_table != pte_offset_kernel(pmd, 0))
BUG();
@@ -382,6 +382,7 @@ static...
2007 Apr 18
1
[RFC, PATCH 19/24] i386 Vmi mmu changes
...2:55:05.000000000 -0800
+++ linux-2.6.16-rc5/arch/i386/mm/init.c 2006-03-10 15:57:08.000000000 -0800
@@ -69,7 +69,6 @@ static pmd_t * __init one_md_table_init(
pud = pud_offset(pgd, 0);
pmd_table = pmd_offset(pud, 0);
#endif
-
return pmd_table;
}
@@ -81,6 +80,7 @@ static pte_t * __init one_page_table_ini
{
if (pmd_none(*pmd)) {
pte_t *page_table = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE);
+ mach_setup_pte(__pa(page_table) >> PAGE_SHIFT);
set_pmd(pmd, __pmd(__pa(page_table) | _PAGE_TABLE));
if (page_table != pte_offset_kernel(pmd, 0))
BUG();
@@ -382,6 +382,7 @@ static...
2009 Jun 05
1
[PATCH] lguest: PAE support
...MD index as well. We use the last 2MB, so we
+ * will need the last pmd entry of the last pmd page. */
+#ifdef CONFIG_X86_PAE
+#define SWITCHER_PMD_INDEX (PTRS_PER_PMD - 1)
+#define RESERVE_MEM 2U
+#define CHECK_GPGD_MASK _PAGE_PRESENT
+#else
+#define RESERVE_MEM 4U
+#define CHECK_GPGD_MASK _PAGE_TABLE
+#endif
+
/* We actually need a separate PTE page for each CPU. Remember that after the
* Switcher code itself comes two pages for each CPU, and we don't want this
* CPU's guest to see the pages of any other CPU. */
@@ -73,23 +84,58 @@ static pgd_t *spgd_addr(struct lg_cpu *cpu, u32 i...
2009 Jun 05
1
[PATCH] lguest: PAE support
...MD index as well. We use the last 2MB, so we
+ * will need the last pmd entry of the last pmd page. */
+#ifdef CONFIG_X86_PAE
+#define SWITCHER_PMD_INDEX (PTRS_PER_PMD - 1)
+#define RESERVE_MEM 2U
+#define CHECK_GPGD_MASK _PAGE_PRESENT
+#else
+#define RESERVE_MEM 4U
+#define CHECK_GPGD_MASK _PAGE_TABLE
+#endif
+
/* We actually need a separate PTE page for each CPU. Remember that after the
* Switcher code itself comes two pages for each CPU, and we don't want this
* CPU's guest to see the pages of any other CPU. */
@@ -73,23 +84,58 @@ static pgd_t *spgd_addr(struct lg_cpu *cpu, u32 i...
2009 Apr 16
1
NULL pointer dereference at __switch_to() ( __unlazy_fpu ) with lguest PAE patch
...gpage + pte_index(vaddr) * sizeof(pte_t);
}
/*:*/
@@ -184,11 +243,24 @@ static void check_gpte(struct lg_cpu *cpu, pte_t gpte)
static void check_gpgd(struct lg_cpu *cpu, pgd_t gpgd)
{
+#ifdef CONFIG_X86_PAE
+ if ((pgd_flags(gpgd) & ~_PAGE_PRESENT) ||
+#else
if ((pgd_flags(gpgd) & ~_PAGE_TABLE) ||
+#endif
(pgd_pfn(gpgd) >= cpu->lg->pfn_limit))
kill_guest(cpu, "bad page directory entry");
}
+#ifdef CONFIG_X86_PAE
+static void check_gpmd(struct lg_cpu *cpu, pmd_t gpmd)
+{
+ if ((pmd_flags(gpmd) & ~_PAGE_TABLE) ||
+ (pmd_pfn(gpmd) >= cpu->lg->pf...
2009 Apr 16
1
NULL pointer dereference at __switch_to() ( __unlazy_fpu ) with lguest PAE patch
...gpage + pte_index(vaddr) * sizeof(pte_t);
}
/*:*/
@@ -184,11 +243,24 @@ static void check_gpte(struct lg_cpu *cpu, pte_t gpte)
static void check_gpgd(struct lg_cpu *cpu, pgd_t gpgd)
{
+#ifdef CONFIG_X86_PAE
+ if ((pgd_flags(gpgd) & ~_PAGE_PRESENT) ||
+#else
if ((pgd_flags(gpgd) & ~_PAGE_TABLE) ||
+#endif
(pgd_pfn(gpgd) >= cpu->lg->pfn_limit))
kill_guest(cpu, "bad page directory entry");
}
+#ifdef CONFIG_X86_PAE
+static void check_gpmd(struct lg_cpu *cpu, pmd_t gpmd)
+{
+ if ((pmd_flags(gpmd) & ~_PAGE_TABLE) ||
+ (pmd_pfn(gpmd) >= cpu->lg->pf...
2006 Dec 01
1
[PATCH 2/10] Add support for netfront/netback acceleration drivers
...-sparse/include/asm-i386/mach-
xen/asm/pgtable.h
--- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pgtable.h Fri
Dec 01 16:21:46 2006 +0000
+++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pgtable.h Fri
Dec 01 16:22:40 2006 +0000
@@ -133,6 +133,7 @@ void paging_init(void);
#define _PAGE_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_USER |
_PAGE_ACCESSED | _PAGE_DIRTY)
#define _KERNPG_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED |
_PAGE_DIRTY)
+#define _KERNPG_TABLE_READONLY (_PAGE_PRESENT | _PAGE_ACCESSED |
_PAGE_DIRTY)
#define _PAGE_CHG_MASK (PTE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY)...
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
...ump(vcpu, "took gfp errcode %lld\n", regs->errcode);
+ lguest_dump_vcpu_regs(vcpu);
+ break;
+ case 14:
+ if (demand_page(vcpu, cr2, regs->errcode & PF_WRITE))
+ continue;
+
+ if (lguest_debug) {
+ printk ("guest taking a page fault\n");
+ lguest_print_page_tables(vcpu->pgdir->pgdir);
+ }
+
+ /* inform guest on the current state of cr2 */
+ put_user(cr2, &linfo->lguest_data->cr2);
+ if (reflect_trap(vcpu, 14, 1))
+ continue;
+
+ lguest_dump_vcpu_regs(vcpu);
+ kill_guest_dump(vcpu, "unhandled page fault at %#lx"
+...
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
...ump(vcpu, "took gfp errcode %lld\n", regs->errcode);
+ lguest_dump_vcpu_regs(vcpu);
+ break;
+ case 14:
+ if (demand_page(vcpu, cr2, regs->errcode & PF_WRITE))
+ continue;
+
+ if (lguest_debug) {
+ printk ("guest taking a page fault\n");
+ lguest_print_page_tables(vcpu->pgdir->pgdir);
+ }
+
+ /* inform guest on the current state of cr2 */
+ put_user(cr2, &linfo->lguest_data->cr2);
+ if (reflect_trap(vcpu, 14, 1))
+ continue;
+
+ lguest_dump_vcpu_regs(vcpu);
+ kill_guest_dump(vcpu, "unhandled page fault at %#lx"
+...
2007 Apr 18
15
[PATCH 0 of 13] Basic infrastructure patches for a paravirtualized kernel
[ REPOST: Apologies to anyone who has seen this before. It
didn't make it onto any of the lists it should have. -J ]
Hi Andrew,
This series of patches lays the basic ground work for the
paravirtualized kernel patches coming later on. I think this lot is
ready for the rough-and-tumble world of the -mm tree.
For the most part, these patches do nothing or very little. The
patches should