search for: __ptep

Displaying 20 results from an estimated 40 matches for "__ptep".

Did you mean: __pte
2007 Apr 18
1
[PATCH 4/9] Vmi fix highpte
...TE) -#define pte_offset_map(dir, address) \ - ((pte_t *)kmap_atomic(pmd_page(*(dir)),KM_PTE0) + pte_index(address)) -#define pte_offset_map_nested(dir, address) \ - ((pte_t *)kmap_atomic(pmd_page(*(dir)),KM_PTE1) + pte_index(address)) +#define pte_offset_map(dir, address) \ +({ \ + pte_t *__ptep; \ + unsigned pfn = pmd_val(*(dir)) >> PAGE_SHIFT; \ + __ptep = (pte_t *)kmap_atomic(pfn_to_page(pfn),KM_PTE0);\ + paravirt_map_pt_hook(KM_PTE0,__ptep, pfn); \ + __ptep = __ptep + pte_index(address); \ + __ptep; \ +}) +#define pte_offset_map_nested(dir, address) \ +({...
2007 Apr 18
1
[PATCH 4/9] Vmi fix highpte
...TE) -#define pte_offset_map(dir, address) \ - ((pte_t *)kmap_atomic(pmd_page(*(dir)),KM_PTE0) + pte_index(address)) -#define pte_offset_map_nested(dir, address) \ - ((pte_t *)kmap_atomic(pmd_page(*(dir)),KM_PTE1) + pte_index(address)) +#define pte_offset_map(dir, address) \ +({ \ + pte_t *__ptep; \ + unsigned pfn = pmd_val(*(dir)) >> PAGE_SHIFT; \ + __ptep = (pte_t *)kmap_atomic(pfn_to_page(pfn),KM_PTE0);\ + paravirt_map_pt_hook(KM_PTE0,__ptep, pfn); \ + __ptep = __ptep + pte_index(address); \ + __ptep; \ +}) +#define pte_offset_map_nested(dir, address) \ +({...
2008 May 15
0
[PATCH] linux/x86: utilize lookup_address() for virt_to_ptep()
...et_kernel(__pmd, (unsigned long)(__va)); \ -}) - -#define arbitrary_virt_to_machine(__va) \ -({ \ - maddr_t m = (maddr_t)pte_mfn(*virt_to_ptep(__va)) << PAGE_SHIFT;\ - m | ((unsigned long)(__va) & (PAGE_SIZE-1)); \ -}) +#define virt_to_ptep(va) \ +({ \ + pte_t *__ptep = lookup_address((unsigned long)(va)); \ + BUG_ON(!__ptep || !pte_present(*__ptep)); \ + __ptep; \ +}) + +#define arbitrary_virt_to_machine(va) \ + (((maddr_t)pte_mfn(*virt_to_ptep(va)) << PAGE_SHIFT) \ + | ((unsigned long)(va) & (PAGE_SIZE - 1))) #endif /* !__ASSEMBLY_...
2007 Apr 18
1
[PATCH 2/9] 00mm2 pte clear not present.patch
...sertions(+), 4 deletions(-) =================================================================== --- a/include/asm-generic/pgtable.h +++ b/include/asm-generic/pgtable.h @@ -110,8 +110,13 @@ do { \ }) #endif -#ifndef __HAVE_ARCH_PTE_CLEAR_FULL -#define pte_clear_full(__mm, __address, __ptep, __full) \ +/* + * Some architectures may be able to avoid expensive synchronization + * primitives when modifications are made to PTE's which are already + * not present, or in the process of an address space destruction. + */ +#ifndef __HAVE_ARCH_PTE_CLEAR_NOT_PRESENT_FULL +#define pte_clea...
2007 Apr 18
2
[PATCH 5/6] i386 virtualization - Make generic set wrprotect a macro
...#ifndef __HAVE_ARCH_PTEP_SET_WRPROTECT > -static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long address, pte_t *ptep) > -{ > - pte_t old_pte = *ptep; > - set_pte_at(mm, address, ptep, pte_wrprotect(old_pte)); > -} > +#define ptep_set_wrprotect(__mm, __address, __ptep) \ > +({ \ > + pte_t __old_pte = *(__ptep); \ > + set_pte_at((__mm), (__address), (__ptep), \ > + pte_wrprotect(__old_pte)); \ > +}) > #endif > > #ifndef __HAVE_ARCH_PTE_SAME cu Adrian -- "Is there not promise of rain?" Ling Tan...
2007 Apr 18
2
[PATCH 5/6] i386 virtualization - Make generic set wrprotect a macro
...#ifndef __HAVE_ARCH_PTEP_SET_WRPROTECT > -static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long address, pte_t *ptep) > -{ > - pte_t old_pte = *ptep; > - set_pte_at(mm, address, ptep, pte_wrprotect(old_pte)); > -} > +#define ptep_set_wrprotect(__mm, __address, __ptep) \ > +({ \ > + pte_t __old_pte = *(__ptep); \ > + set_pte_at((__mm), (__address), (__ptep), \ > + pte_wrprotect(__old_pte)); \ > +}) > #endif > > #ifndef __HAVE_ARCH_PTE_SAME cu Adrian -- "Is there not promise of rain?" Ling Tan...
2007 Apr 18
1
[RFC, PATCH 19/24] i386 Vmi mmu changes
...static inline int ptep_test_and_clear_young(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep) { if (!pte_young(*ptep)) @@ -281,6 +289,15 @@ static inline void ptep_set_wrprotect(st clear_bit(_PAGE_BIT_RW, &ptep->pte_low); } +#define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \ + do { \ + if (__dirty) { \ + (__ptep)->pte_low = (__entry).pte_low; \ + flush_tlb_page(__vma, __address); \ + } \ + } while (0) +#endif /* !__HAVE_SUBARCH_PTE_WRITE_FUNCTIONS */ + /* * clone_pgd_range(pgd_t *dst, pgd_t *src, int coun...
2007 Apr 18
1
[RFC, PATCH 19/24] i386 Vmi mmu changes
...static inline int ptep_test_and_clear_young(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep) { if (!pte_young(*ptep)) @@ -281,6 +289,15 @@ static inline void ptep_set_wrprotect(st clear_bit(_PAGE_BIT_RW, &ptep->pte_low); } +#define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \ + do { \ + if (__dirty) { \ + (__ptep)->pte_low = (__entry).pte_low; \ + flush_tlb_page(__vma, __address); \ + } \ + } while (0) +#endif /* !__HAVE_SUBARCH_PTE_WRITE_FUNCTIONS */ + /* * clone_pgd_range(pgd_t *dst, pgd_t *src, int coun...
2007 Apr 18
0
[PATCH 7/9] 00mma remove set pte atomic.patch
...==== --- a/include/asm-generic/pgtable.h +++ b/include/asm-generic/pgtable.h @@ -13,19 +13,11 @@ * Note: the old pte is known to not be writable, so we don't need to * worry about dirty bits etc getting lost. */ -#ifndef __HAVE_ARCH_SET_PTE_ATOMIC #define ptep_establish(__vma, __address, __ptep, __entry) \ do { \ set_pte_at((__vma)->vm_mm, (__address), __ptep, __entry); \ flush_tlb_page(__vma, __address); \ } while (0) -#else /* __HAVE_ARCH_SET_PTE_ATOMIC */ -#define ptep_establish(__vma, __address, __ptep, __entry) \ -do { \ - set_pte_atomic(__ptep, __en...
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
2007 Apr 18
1
[PATCH 3/5] Make set_wrprotect() value safe
...==== --- linux-2.6.13.orig/include/asm-generic/pgtable.h 2005-08-15 13:54:42.000000000 -0700 +++ linux-2.6.13/include/asm-generic/pgtable.h 2005-08-22 14:21:05.000000000 -0700 @@ -314,11 +314,11 @@ do { \ #ifndef __HAVE_ARCH_PTEP_SET_WRPROTECT #define ptep_set_wrprotect(__mm, __address, __ptep) \ -({ \ +do { \ pte_t __old_pte = *(__ptep); \ set_pte_at((__mm), (__address), (__ptep), \ pte_wrprotect(__old_pte)); \ -}) +} while (0) #endif #ifndef __HAVE_ARCH_PTE_SAME
2007 Apr 18
1
[PATCH 3/5] Make set_wrprotect() value safe
...==== --- linux-2.6.13.orig/include/asm-generic/pgtable.h 2005-08-15 13:54:42.000000000 -0700 +++ linux-2.6.13/include/asm-generic/pgtable.h 2005-08-22 14:21:05.000000000 -0700 @@ -314,11 +314,11 @@ do { \ #ifndef __HAVE_ARCH_PTEP_SET_WRPROTECT #define ptep_set_wrprotect(__mm, __address, __ptep) \ -({ \ +do { \ pte_t __old_pte = *(__ptep); \ set_pte_at((__mm), (__address), (__ptep), \ pte_wrprotect(__old_pte)); \ -}) +} while (0) #endif #ifndef __HAVE_ARCH_PTE_SAME
2020 Jul 20
1
[PATCH v2 3/5] mm/notifier: add migration invalidation type
...519,7 @@ static inline void mmu_notifier_range_init(struct mmu_notifier_range *range, > range->start = start; > range->end = end; > range->flags = flags; > + range->migrate_pgmap_owner = NULL; > } > > #define ptep_clear_flush_young_notify(__vma, __address, __ptep) \ > diff --git a/mm/migrate.c b/mm/migrate.c > index 2bbc5c4c672e..9b3dcb81be5f 100644 > +++ b/mm/migrate.c > @@ -2391,8 +2391,14 @@ static void migrate_vma_collect(struct migrate_vma *migrate) > { > struct mmu_notifier_range range; > > - mmu_notifier_range_init(&...
2007 Oct 31
5
[PATCH 0/7] (Re-)introducing pvops for x86_64 - Real pvops work part
Hey folks, This is the part-of-pvops-implementation-that-is-not-exactly-a-merge. Neat, uh? This is the majority of the work. The first patch in the series does not really belong here. It was already sent to lkml separetedly before, but I'm including it again, for a very simple reason: Try to test the paravirt patches without it, and you'll fail miserably ;-) (and it was not yet
2007 Oct 31
5
[PATCH 0/7] (Re-)introducing pvops for x86_64 - Real pvops work part
Hey folks, This is the part-of-pvops-implementation-that-is-not-exactly-a-merge. Neat, uh? This is the majority of the work. The first patch in the series does not really belong here. It was already sent to lkml separetedly before, but I'm including it again, for a very simple reason: Try to test the paravirt patches without it, and you'll fail miserably ;-) (and it was not yet
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
2020 Jul 13
0
[PATCH v2 3/5] mm/notifier: add migration invalidation type
...s(struct mm_struct *mm) @@ -513,6 +519,7 @@ static inline void mmu_notifier_range_init(struct mmu_notifier_range *range, range->start = start; range->end = end; range->flags = flags; + range->migrate_pgmap_owner = NULL; } #define ptep_clear_flush_young_notify(__vma, __address, __ptep) \ diff --git a/mm/migrate.c b/mm/migrate.c index 2bbc5c4c672e..9b3dcb81be5f 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -2391,8 +2391,14 @@ static void migrate_vma_collect(struct migrate_vma *migrate) { struct mmu_notifier_range range; - mmu_notifier_range_init(&range, MMU_NOTIFY_CLE...
2020 Jul 06
0
[PATCH 3/5] mm/notifier: add migration invalidation type
...mm_has_notifiers(struct mm_struct *mm) @@ -513,6 +519,7 @@ static inline void mmu_notifier_range_init(struct mmu_notifier_range *range, range->start = start; range->end = end; range->flags = flags; + range->data = NULL; } #define ptep_clear_flush_young_notify(__vma, __address, __ptep) \ diff --git a/mm/migrate.c b/mm/migrate.c index 2bbc5c4c672e..62270e6727b0 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -2391,8 +2391,14 @@ static void migrate_vma_collect(struct migrate_vma *migrate) { struct mmu_notifier_range range; - mmu_notifier_range_init(&range, MMU_NOTIFY_CLE...
2020 Jul 21
0
[PATCH v3 3/5] mm/notifier: add migration invalidation type
...s(struct mm_struct *mm) @@ -513,6 +519,7 @@ static inline void mmu_notifier_range_init(struct mmu_notifier_range *range, range->start = start; range->end = end; range->flags = flags; + range->migrate_pgmap_owner = NULL; } #define ptep_clear_flush_young_notify(__vma, __address, __ptep) \ diff --git a/mm/migrate.c b/mm/migrate.c index e3ea68e3a08b..96e1f41a991e 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -2392,8 +2392,14 @@ static void migrate_vma_collect(struct migrate_vma *migrate) { struct mmu_notifier_range range; - mmu_notifier_range_init(&range, MMU_NOTIFY_CLE...