search for: pte_pag

Displaying 20 results from an estimated 54 matches for "pte_pag".

Did you mean: pte_page
2006 Mar 14
12
[RFC] VMI for Xen?
I''m sure everyone has seen the drop of VMI patches for Linux at this point, but just in case, the link is included below. I''ve read this version of the VMI spec and have made my way through most of the patches. While I wasn''t really that impressed with the first spec wrt Xen, the second version seems to be much more palatable. Specifically, the code inlining and
2019 Sep 11
6
[PATCH 0/4] HMM tests and minor fixes
These changes are based on Jason's latest hmm branch. Patch 1 was previously posted here [1] but was dropped from the orginal series. Hopefully, the tests will reduce concerns about edge conditions. I'm sure more tests could be usefully added but I thought this was a good starting point. [1] https://lore.kernel.org/linux-mm/20190726005650.2566-6-rcampbell at nvidia.com/ Ralph Campbell
2019 Jun 26
0
[PATCH 04/25] mm: remove MEMORY_DEVICE_PUBLIC support
...OR bool diff --git a/mm/gup.c b/mm/gup.c index ddde097cf9e4..fe131d879c70 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -605,13 +605,6 @@ static int get_gate_page(struct mm_struct *mm, unsigned long address, if ((gup_flags & FOLL_DUMP) || !is_zero_pfn(pte_pfn(*pte))) goto unmap; *page = pte_page(*pte); - - /* - * This should never happen (a device public page in the gate - * area). - */ - if (is_device_public_page(*page)) - goto unmap; } if (unlikely(!try_get_page(*page))) { ret = -ENOMEM; diff --git a/mm/hmm.c b/mm/hmm.c index bd260a3b6b09..376159a769fb 100644 --- a/mm/h...
2007 Apr 18
0
[PATCH 3/5] Fix missing pte update.patch
...ddr, xp, __pte(0)); } while (0) #define pmd_clear(xp) do { set_pmd(xp, __pmd(0)); } while (0) -#define __HAVE_ARCH_PTEP_GET_AND_CLEAR -#define ptep_get_and_clear(mm,addr,xp) __pte(xchg(&(xp)->pte_low, 0)) +#define raw_ptep_get_and_clear(xp) __pte(xchg(&(xp)->pte_low, 0)) #define pte_page(x) pfn_to_page(pte_pfn(x)) #define pte_none(x) (!(x).pte_low) diff -r f1dd818c2f06 include/asm-i386/pgtable-3level.h --- a/include/asm-i386/pgtable-3level.h Thu Oct 19 03:03:09 2006 -0700 +++ b/include/asm-i386/pgtable-3level.h Thu Oct 19 03:03:18 2006 -0700 @@ -119,8 +119,7 @@ static inline vo...
2007 Apr 18
0
[RFC PATCH 31/35] Add Xen grant table support
> > +#ifndef __ia64__ > > +static int map_pte_fn(pte_t *pte, struct page *pte_page, > > + unsigned long addr, void *data) > > +{ > > + unsigned long **frames = (unsigned long **)data; > > + > > + set_pte_at(&init_mm, addr, pte, pfn_pte((*frames)[0], > PAGE_KERNEL)); > > + (*frames)++; > > + return 0; > > +} > &gt...
2007 Apr 18
0
[RFC PATCH 31/35] Add Xen grant table support
> > +#ifndef __ia64__ > > +static int map_pte_fn(pte_t *pte, struct page *pte_page, > > + unsigned long addr, void *data) > > +{ > > + unsigned long **frames = (unsigned long **)data; > > + > > + set_pte_at(&init_mm, addr, pte, pfn_pte((*frames)[0], > PAGE_KERNEL)); > > + (*frames)++; > > + return 0; > > +} > &gt...
2007 Apr 18
0
[PATCH 3/5] Fix missing pte update.patch
...ddr, xp, __pte(0)); } while (0) #define pmd_clear(xp) do { set_pmd(xp, __pmd(0)); } while (0) -#define __HAVE_ARCH_PTEP_GET_AND_CLEAR -#define ptep_get_and_clear(mm,addr,xp) __pte(xchg(&(xp)->pte_low, 0)) +#define raw_ptep_get_and_clear(xp) __pte(xchg(&(xp)->pte_low, 0)) #define pte_page(x) pfn_to_page(pte_pfn(x)) #define pte_none(x) (!(x).pte_low) diff -r f1dd818c2f06 include/asm-i386/pgtable-3level.h --- a/include/asm-i386/pgtable-3level.h Thu Oct 19 03:03:09 2006 -0700 +++ b/include/asm-i386/pgtable-3level.h Thu Oct 19 03:03:18 2006 -0700 @@ -119,8 +119,7 @@ static inline vo...
2007 Apr 18
1
[PATCH 3/4] Pte xchg optimization.patch
...+ res = *ptep; + native_pte_clear(NULL, 0, ptep); + return res; +} + +#ifdef CONFIG_SMP static inline pte_t native_ptep_get_and_clear(pte_t *xp) { return __pte(xchg(&xp->pte_low, 0)); } +#else +#define native_ptep_get_and_clear(xp) native_local_ptep_get_and_clear(xp) +#endif #define pte_page(x) pfn_to_page(pte_pfn(x)) #define pte_none(x) (!(x).pte_low) diff -r 47495b2532b3 include/asm-i386/pgtable-3level.h --- a/include/asm-i386/pgtable-3level.h Wed Apr 11 18:23:01 2007 -0700 +++ b/include/asm-i386/pgtable-3level.h Wed Apr 11 18:23:05 2007 -0700 @@ -139,6 +139,17 @@ static inline v...
2007 Apr 18
1
[PATCH 3/4] Pte xchg optimization.patch
...+ res = *ptep; + native_pte_clear(NULL, 0, ptep); + return res; +} + +#ifdef CONFIG_SMP static inline pte_t native_ptep_get_and_clear(pte_t *xp) { return __pte(xchg(&xp->pte_low, 0)); } +#else +#define native_ptep_get_and_clear(xp) native_local_ptep_get_and_clear(xp) +#endif #define pte_page(x) pfn_to_page(pte_pfn(x)) #define pte_none(x) (!(x).pte_low) diff -r 47495b2532b3 include/asm-i386/pgtable-3level.h --- a/include/asm-i386/pgtable-3level.h Wed Apr 11 18:23:01 2007 -0700 +++ b/include/asm-i386/pgtable-3level.h Wed Apr 11 18:23:05 2007 -0700 @@ -139,6 +139,17 @@ static inline v...
2008 Oct 27
0
[PATCH 4/4] linux/i386: utilize hypervisor highmem handling helpers
...========================================================= --- head-2008-10-24.orig/arch/i386/mm/highmem-xen.c 2008-10-27 11:56:39.000000000 +0100 +++ head-2008-10-24/arch/i386/mm/highmem-xen.c 2008-10-27 11:56:59.000000000 +0100 @@ -151,9 +151,56 @@ struct page *kmap_atomic_to_page(void *p return pte_page(*pte); } +void clear_highpage(struct page *page) +{ + void *kaddr; + + if (likely(xen_feature(XENFEAT_highmem_assist)) + && PageHighMem(page)) { + struct mmuext_op meo; + + meo.cmd = MMUEXT_CLEAR_PAGE; + meo.arg1.mfn = pfn_to_mfn(page_to_pfn(page)); + if (HYPERVISOR_mmuext_op(&a...
2020 Nov 03
0
[patch V3 10/37] ARM: highmem: Switch to generic kmap atomic
...!= __fix_to_virt(idx)); - set_fixmap_pte(idx, __pte(0)); -#else - (void) idx; /* to kill a warning */ -#endif - kmap_atomic_idx_pop(); - } else if (vaddr >= PKMAP_ADDR(0) && vaddr < PKMAP_ADDR(LAST_PKMAP)) { - /* this address was obtained through kmap_high_get() */ - kunmap_high(pte_page(pkmap_page_table[PKMAP_NR(vaddr)])); - } -} -EXPORT_SYMBOL(kunmap_atomic_high); - -void *kmap_atomic_pfn(unsigned long pfn) -{ - unsigned long vaddr; - int idx, type; - struct page *page = pfn_to_page(pfn); - - preempt_disable(); - pagefault_disable(); - if (!PageHighMem(page)) - return page_addr...
2020 Nov 03
0
[patch V3 06/37] highmem: Provide generic variant of kmap_atomic*
...ge *page) +{ + return NULL; +} +#endif + +/* Unmap a local mapping which was obtained by kmap_high_get() */ +static inline void kmap_high_unmap_local(unsigned long vaddr) +{ +#ifdef ARCH_NEEDS_KMAP_HIGH_GET + if (vaddr >= PKMAP_ADDR(0) && vaddr < PKMAP_ADDR(LAST_PKMAP)) + kunmap_high(pte_page(pkmap_page_table[PKMAP_NR(vaddr)])); +#endif +} + +static inline int kmap_local_calc_idx(int idx) +{ + return idx + KM_MAX_IDX * smp_processor_id(); +} + +static pte_t *__kmap_pte; + +static pte_t *kmap_get_pte(void) +{ + if (!__kmap_pte) + __kmap_pte = virt_to_kpte(__fix_to_virt(FIX_KMAP_BEGIN))...
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 07/13] lguest64 loader
...RITE|PROT_EXEC, + MAP_FIXED|MAP_PRIVATE, zero_fd, 0) != (void *)0) + err(1, "Mmaping /dev/zero for %li bytes", mem); +} + +static u32 finish(unsigned long mem, unsigned long *page_offset, + const char *initrd, unsigned long *ird_size) +{ + u32 *pgdir = NULL, *linear = NULL; + int i, pte_pages; + + /* This is a top of mem. */ + *ird_size = load_initrd(initrd, mem); + + /* Below initrd is used as top level of pagetable. */ + pte_pages = 1 + (mem/getpagesize() + 1023)/1024; + + pgdir = (u32 *)page_align(mem - *ird_size - pte_pages*getpagesize()); + linear = (void *)pgdir + getpagesize();...
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 07/13] lguest64 loader
...RITE|PROT_EXEC, + MAP_FIXED|MAP_PRIVATE, zero_fd, 0) != (void *)0) + err(1, "Mmaping /dev/zero for %li bytes", mem); +} + +static u32 finish(unsigned long mem, unsigned long *page_offset, + const char *initrd, unsigned long *ird_size) +{ + u32 *pgdir = NULL, *linear = NULL; + int i, pte_pages; + + /* This is a top of mem. */ + *ird_size = load_initrd(initrd, mem); + + /* Below initrd is used as top level of pagetable. */ + pte_pages = 1 + (mem/getpagesize() + 1023)/1024; + + pgdir = (u32 *)page_align(mem - *ird_size - pte_pages*getpagesize()); + linear = (void *)pgdir + getpagesize();...
2007 Apr 18
0
[patch 6/9] Guest page hinting: writable page table entries.
...m/mprotect.c 2006-09-01 12:49:33.000000000 +0200 +++ linux-2.6-patched/mm/mprotect.c 2006-09-01 12:50:24.000000000 +0200 @@ -52,6 +52,7 @@ static void change_pte_range(struct mm_s */ if (dirty_accountable && pte_dirty(ptent)) ptent = pte_mkwrite(ptent); + page_check_writable(pte_page(ptent), ptent); set_pte_at(mm, addr, pte, ptent); lazy_mmu_prot_update(ptent); #ifdef CONFIG_MIGRATION diff -urpN linux-2.6/mm/page_alloc.c linux-2.6-patched/mm/page_alloc.c --- linux-2.6/mm/page_alloc.c 2006-09-01 12:50:23.000000000 +0200 +++ linux-2.6-patched/mm/page_alloc.c 2006-09-01...
2007 Apr 18
0
[patch 6/9] Guest page hinting: writable page table entries.
...m/mprotect.c 2006-09-01 12:49:33.000000000 +0200 +++ linux-2.6-patched/mm/mprotect.c 2006-09-01 12:50:24.000000000 +0200 @@ -52,6 +52,7 @@ static void change_pte_range(struct mm_s */ if (dirty_accountable && pte_dirty(ptent)) ptent = pte_mkwrite(ptent); + page_check_writable(pte_page(ptent), ptent); set_pte_at(mm, addr, pte, ptent); lazy_mmu_prot_update(ptent); #ifdef CONFIG_MIGRATION diff -urpN linux-2.6/mm/page_alloc.c linux-2.6-patched/mm/page_alloc.c --- linux-2.6/mm/page_alloc.c 2006-09-01 12:50:23.000000000 +0200 +++ linux-2.6-patched/mm/page_alloc.c 2006-09-01...
2007 Apr 18
1
[PATCH 0/2] Use a single loader for i386 and x86_64
...} -static u32 finish(unsigned long mem, unsigned long *page_offset, - const char *initrd, unsigned long *ird_size) +static unsigned long finish32(unsigned long mem, unsigned long *page_offset, + const char *initrd, unsigned long *ird_size) { u32 *pgdir = NULL, *linear = NULL; int i, pte_pages; @@ -169,7 +180,7 @@ static u32 finish(unsigned long mem, uns /* Now set up pgd so that this memory is at page_offset */ for (i = 0; i < mem / getpagesize(); i += getpagesize()/sizeof(u32)) { pgdir[(i + *page_offset/getpagesize())/1024] - = (((u32)linear + i*sizeof(u32)) | PAGE_PRESEN...
2007 Apr 18
1
[PATCH 0/2] Use a single loader for i386 and x86_64
...} -static u32 finish(unsigned long mem, unsigned long *page_offset, - const char *initrd, unsigned long *ird_size) +static unsigned long finish32(unsigned long mem, unsigned long *page_offset, + const char *initrd, unsigned long *ird_size) { u32 *pgdir = NULL, *linear = NULL; int i, pte_pages; @@ -169,7 +180,7 @@ static u32 finish(unsigned long mem, uns /* Now set up pgd so that this memory is at page_offset */ for (i = 0; i < mem / getpagesize(); i += getpagesize()/sizeof(u32)) { pgdir[(i + *page_offset/getpagesize())/1024] - = (((u32)linear + i*sizeof(u32)) | PAGE_PRESEN...
2007 Apr 18
3
[PATCH] abstract out bits of ldt.c
Chris Wright wrote: >* Zachary Amsden (zach@vmware.com) wrote: > > >>Does Xen assume page aligned descriptor tables? I assume from this >> >> > >Yes. > > > >>patch and snippets I have gathered from others, that is a yes, and other >>things here imply that DT pages are not shadowed. If so, Xen itself >>must have live segments
2007 Apr 18
3
[PATCH] abstract out bits of ldt.c
Chris Wright wrote: >* Zachary Amsden (zach@vmware.com) wrote: > > >>Does Xen assume page aligned descriptor tables? I assume from this >> >> > >Yes. > > > >>patch and snippets I have gathered from others, that is a yes, and other >>things here imply that DT pages are not shadowed. If so, Xen itself >>must have live segments