search for: user_ptrs_per_pgd

Displaying 20 results from an estimated 58 matches for "user_ptrs_per_pgd".

2007 Apr 18
0
[PATCH 1/5] Paravirt page alloc.patch
...mp;kpte_page->lru, &df_list); revert_page(kpte_page, address); } =================================================================== --- a/arch/i386/mm/pgtable.c +++ b/arch/i386/mm/pgtable.c @@ -245,8 +245,14 @@ void pgd_ctor(void *pgd, kmem_cache_t *c clone_pgd_range((pgd_t *)pgd + USER_PTRS_PER_PGD, swapper_pg_dir + USER_PTRS_PER_PGD, KERNEL_PGD_PTRS); + if (PTRS_PER_PMD > 1) return; + + /* must happen under lock */ + paravirt_alloc_pd_clone(__pa(pgd) >> PAGE_SHIFT, + __pa(swapper_pg_dir) >> PAGE_SHIFT, + USER_PTRS_PER_PGD, PTRS_PER_PGD - USER_PTRS_PER_PGD);...
2007 Apr 18
0
[PATCH 1/5] Paravirt page alloc.patch
...mp;kpte_page->lru, &df_list); revert_page(kpte_page, address); } =================================================================== --- a/arch/i386/mm/pgtable.c +++ b/arch/i386/mm/pgtable.c @@ -245,8 +245,14 @@ void pgd_ctor(void *pgd, kmem_cache_t *c clone_pgd_range((pgd_t *)pgd + USER_PTRS_PER_PGD, swapper_pg_dir + USER_PTRS_PER_PGD, KERNEL_PGD_PTRS); + if (PTRS_PER_PMD > 1) return; + + /* must happen under lock */ + paravirt_alloc_pd_clone(__pa(pgd) >> PAGE_SHIFT, + __pa(swapper_pg_dir) >> PAGE_SHIFT, + USER_PTRS_PER_PGD, PTRS_PER_PGD - USER_PTRS_PER_PGD);...
2007 Apr 18
0
[PATCH 1/6] Page allocation hooks for VMI backend
...mp;kpte_page->lru, &df_list); revert_page(kpte_page, address); } =================================================================== --- a/arch/i386/mm/pgtable.c +++ b/arch/i386/mm/pgtable.c @@ -245,8 +245,14 @@ void pgd_ctor(void *pgd, kmem_cache_t *c clone_pgd_range((pgd_t *)pgd + USER_PTRS_PER_PGD, swapper_pg_dir + USER_PTRS_PER_PGD, KERNEL_PGD_PTRS); + if (PTRS_PER_PMD > 1) return; + + /* must happen under lock */ + paravirt_alloc_pd_clone(__pa(pgd) >> PAGE_SHIFT, + __pa(swapper_pg_dir) >> PAGE_SHIFT, + USER_PTRS_PER_PGD, PTRS_PER_PGD - USER_PTRS_PER_PGD);...
2007 Apr 18
0
[PATCH 1/6] Page allocation hooks for VMI backend
...mp;kpte_page->lru, &df_list); revert_page(kpte_page, address); } =================================================================== --- a/arch/i386/mm/pgtable.c +++ b/arch/i386/mm/pgtable.c @@ -245,8 +245,14 @@ void pgd_ctor(void *pgd, kmem_cache_t *c clone_pgd_range((pgd_t *)pgd + USER_PTRS_PER_PGD, swapper_pg_dir + USER_PTRS_PER_PGD, KERNEL_PGD_PTRS); + if (PTRS_PER_PMD > 1) return; + + /* must happen under lock */ + paravirt_alloc_pd_clone(__pa(pgd) >> PAGE_SHIFT, + __pa(swapper_pg_dir) >> PAGE_SHIFT, + USER_PTRS_PER_PGD, PTRS_PER_PGD - USER_PTRS_PER_PGD);...
2007 Apr 18
1
[PATCH 4/10] I386 pgd clone under lock fix.patch
...zach@vmware.com> diff -r 2247ff2c3fdb arch/i386/mm/pgtable.c --- a/arch/i386/mm/pgtable.c Thu Apr 05 17:29:15 2007 -0700 +++ b/arch/i386/mm/pgtable.c Thu Apr 05 17:40:02 2007 -0700 @@ -241,18 +241,16 @@ void pgd_ctor(void *pgd, struct kmem_cac /* !PAE, no pagetable sharing */ memset(pgd, 0, USER_PTRS_PER_PGD*sizeof(pgd_t)); + spin_lock_irqsave(&pgd_lock, flags); + + /* must happen under lock */ clone_pgd_range((pgd_t *)pgd + USER_PTRS_PER_PGD, swapper_pg_dir + USER_PTRS_PER_PGD, KERNEL_PGD_PTRS); - - spin_lock_irqsave(&pgd_lock, flags); - - /* must happen under lock */ paravirt_al...
2007 Apr 18
1
[PATCH 4/10] I386 pgd clone under lock fix.patch
...zach@vmware.com> diff -r 2247ff2c3fdb arch/i386/mm/pgtable.c --- a/arch/i386/mm/pgtable.c Thu Apr 05 17:29:15 2007 -0700 +++ b/arch/i386/mm/pgtable.c Thu Apr 05 17:40:02 2007 -0700 @@ -241,18 +241,16 @@ void pgd_ctor(void *pgd, struct kmem_cac /* !PAE, no pagetable sharing */ memset(pgd, 0, USER_PTRS_PER_PGD*sizeof(pgd_t)); + spin_lock_irqsave(&pgd_lock, flags); + + /* must happen under lock */ clone_pgd_range((pgd_t *)pgd + USER_PTRS_PER_PGD, swapper_pg_dir + USER_PTRS_PER_PGD, KERNEL_PGD_PTRS); - - spin_lock_irqsave(&pgd_lock, flags); - - /* must happen under lock */ paravirt_al...
2007 Apr 18
1
[PATCH 1/5] Add pagetable allocation notifiers
...================================== --- linux-2.6.13.orig/arch/i386/mm/pgtable.c 2005-08-24 09:31:05.000000000 -0700 +++ linux-2.6.13/arch/i386/mm/pgtable.c 2005-08-24 09:40:22.000000000 -0700 @@ -209,6 +209,7 @@ void pgd_ctor(void *pgd, kmem_cache_t *c if (PTRS_PER_PMD == 1) { memset(pgd, 0, USER_PTRS_PER_PGD*sizeof(pgd_t)); + SetPagePDE(virt_to_page(pgd)); spin_lock_irqsave(&pgd_lock, flags); } @@ -227,6 +228,7 @@ void pgd_dtor(void *pgd, kmem_cache_t *c { unsigned long flags; /* can be called from interrupt context */ + ClearPagePDE(virt_to_page(pgd)); spin_lock_irqsave(&pgd_loc...
2007 Apr 18
1
[PATCH 1/5] Add pagetable allocation notifiers
...================================== --- linux-2.6.13.orig/arch/i386/mm/pgtable.c 2005-08-24 09:31:05.000000000 -0700 +++ linux-2.6.13/arch/i386/mm/pgtable.c 2005-08-24 09:40:22.000000000 -0700 @@ -209,6 +209,7 @@ void pgd_ctor(void *pgd, kmem_cache_t *c if (PTRS_PER_PMD == 1) { memset(pgd, 0, USER_PTRS_PER_PGD*sizeof(pgd_t)); + SetPagePDE(virt_to_page(pgd)); spin_lock_irqsave(&pgd_lock, flags); } @@ -227,6 +228,7 @@ void pgd_dtor(void *pgd, kmem_cache_t *c { unsigned long flags; /* can be called from interrupt context */ + ClearPagePDE(virt_to_page(pgd)); spin_lock_irqsave(&pgd_loc...
2007 Apr 18
0
[PATCH 2/2] Use page present for pae pdpes
...SHIFT)); - kmem_cache_free(pmd_cache, (void *)__va(pgd_val(pgd[i])-1)); + kmem_cache_free(pmd_cache, (void *)__va(pgd_val(pgd[i]) & PAGE_MASK)); } kmem_cache_free(pgd_cache, pgd); return NULL; @@ -268,7 +268,7 @@ void pgd_free(pgd_t *pgd) if (PTRS_PER_PMD > 1) for (i = 0; i < USER_PTRS_PER_PGD; ++i) { ClearPagePDE(pfn_to_page(pgd_val(pgd[i]) >> PAGE_SHIFT)); - kmem_cache_free(pmd_cache, (void *)__va(pgd_val(pgd[i])-1)); + kmem_cache_free(pmd_cache, (void *)__va(pgd_val(pgd[i]) & PAGE_MASK)); } /* in the non-PAE case, free_pgtables() clears user pgd entries */ kme...
2007 Apr 18
0
[PATCH 2/2] Use page present for pae pdpes
...SHIFT)); - kmem_cache_free(pmd_cache, (void *)__va(pgd_val(pgd[i])-1)); + kmem_cache_free(pmd_cache, (void *)__va(pgd_val(pgd[i]) & PAGE_MASK)); } kmem_cache_free(pgd_cache, pgd); return NULL; @@ -268,7 +268,7 @@ void pgd_free(pgd_t *pgd) if (PTRS_PER_PMD > 1) for (i = 0; i < USER_PTRS_PER_PGD; ++i) { ClearPagePDE(pfn_to_page(pgd_val(pgd[i]) >> PAGE_SHIFT)); - kmem_cache_free(pmd_cache, (void *)__va(pgd_val(pgd[i])-1)); + kmem_cache_free(pmd_cache, (void *)__va(pgd_val(pgd[i]) & PAGE_MASK)); } /* in the non-PAE case, free_pgtables() clears user pgd entries */ kme...
2007 Apr 18
1
[RFC, PATCH 19/24] i386 Vmi mmu changes
..._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 void __init pagetable_init (void) */ set_pgd(&pgd_base[0], pgd_base[USER_PTRS_PER_PGD]); #endif + } #ifdef CONFIG_SOFTWARE_SUSPEND Index: linux-2.6.16-rc5/arch/i386/mm/pgtable.c =================================================================== --- linux-2.6.16-rc5.orig/arch/i386/mm/pgtable.c 2006-03-10 12:55:05.000000000 -0800 +++ linux-2.6.16-rc5/arch/i386/mm/pgtable.c 2006-...
2007 Apr 18
1
[RFC, PATCH 19/24] i386 Vmi mmu changes
..._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 void __init pagetable_init (void) */ set_pgd(&pgd_base[0], pgd_base[USER_PTRS_PER_PGD]); #endif + } #ifdef CONFIG_SOFTWARE_SUSPEND Index: linux-2.6.16-rc5/arch/i386/mm/pgtable.c =================================================================== --- linux-2.6.16-rc5.orig/arch/i386/mm/pgtable.c 2006-03-10 12:55:05.000000000 -0800 +++ linux-2.6.16-rc5/arch/i386/mm/pgtable.c 2006-...
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
0
[RFC/PATCH PV_OPS X86_64 01/17] paravirt_ops - core changes
.... + * + * In a normal native boot, we'll be running on a + * pagetable rooted in swapper_pg_dir, but not in PAE + * mode, so this will end up clobbering the mappings + * for the lower 24Mbytes of the address space, + * without affecting the kernel address space. + */ + for (i = 0; i < USER_PTRS_PER_PGD; i++) + set_pgd(&base[i], + __pgd(__pa(empty_zero_page) | _PAGE_PRESENT)); + memset(&base[USER_PTRS_PER_PGD], 0, sizeof(pgd_t)); +} + +void native_pagetable_setup_done(pgd_t *base) +{ + /* + * Add low memory identity-mappings - SMP needs it when + * starting up on an AP from real-mode....
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 01/17] paravirt_ops - core changes
.... + * + * In a normal native boot, we'll be running on a + * pagetable rooted in swapper_pg_dir, but not in PAE + * mode, so this will end up clobbering the mappings + * for the lower 24Mbytes of the address space, + * without affecting the kernel address space. + */ + for (i = 0; i < USER_PTRS_PER_PGD; i++) + set_pgd(&base[i], + __pgd(__pa(empty_zero_page) | _PAGE_PRESENT)); + memset(&base[USER_PTRS_PER_PGD], 0, sizeof(pgd_t)); +} + +void native_pagetable_setup_done(pgd_t *base) +{ + /* + * Add low memory identity-mappings - SMP needs it when + * starting up on an AP from real-mode....
2007 Apr 18
17
[patch 00/17] paravirt_ops updates
Hi Andi, This series of patches updates paravirt_ops in various ways. Some of the changes are plain cleanups and improvements, and some add some interfaces necessary for Xen. The brief overview: add-MAINTAINERS.patch - obvious remove-CONFIG_DEBUG_PARAVIRT.patch - no longer needed paravirt-nop.patch - mark nop operations consistently paravirt-pte-accessors.patch - operations to pack/unpack
2007 Apr 18
17
[patch 00/17] paravirt_ops updates
Hi Andi, This series of patches updates paravirt_ops in various ways. Some of the changes are plain cleanups and improvements, and some add some interfaces necessary for Xen. The brief overview: add-MAINTAINERS.patch - obvious remove-CONFIG_DEBUG_PARAVIRT.patch - no longer needed paravirt-nop.patch - mark nop operations consistently paravirt-pte-accessors.patch - operations to pack/unpack
2007 Apr 18
23
[patch 00/20] paravirt_ops updates
Hi Andi, Here's a repost of the paravirt_ops update series I posted the other day. Since then, I found a few potential bugs with patching clobbering, cleaned up and documented paravirt.h and the patching machinery. Overview: add-MAINTAINERS.patch obvious remove-CONFIG_DEBUG_PARAVIRT.patch No longer meaningful or needed. paravirt-nop.patch Clean up nop paravirt_ops functions, mainly to
2007 Apr 18
23
[patch 00/20] paravirt_ops updates
Hi Andi, Here's a repost of the paravirt_ops update series I posted the other day. Since then, I found a few potential bugs with patching clobbering, cleaned up and documented paravirt.h and the patching machinery. Overview: add-MAINTAINERS.patch obvious remove-CONFIG_DEBUG_PARAVIRT.patch No longer meaningful or needed. paravirt-nop.patch Clean up nop paravirt_ops functions, mainly to