Displaying 20 results from an estimated 195 matches for "set_pte_at".
2020 Aug 15
0
[PATCH v4 5/6] x86/paravirt: remove set_pte_at pv-op
On x86 set_pte_at() is now always falling back to set_pte(). So instead
of having this fallback after the paravirt maze just drop the
set_pte_at paravirt operation and let set_pte_at() use the set_pte()
function directly.
Signed-off-by: Juergen Gross <jgross at suse.com>
---
arch/x86/include/asm/paravirt.h...
2007 Apr 18
1
how set_pte_at()'s vaddr and ptep args relate
Hi Zach,
I'm wondering what the interface requirements of set_pte_at()'s "addr"
and "ptep" args are. I presume that in general the ptep points to the
pte entry which corresponds to the vaddr, but is this necessarily the case?
For example, it is valid to pass a non-highmem page kmap_atomic(), which
will simply return a direct pointer to t...
2007 Apr 18
1
how set_pte_at()'s vaddr and ptep args relate
Hi Zach,
I'm wondering what the interface requirements of set_pte_at()'s "addr"
and "ptep" args are. I presume that in general the ptep points to the
pte entry which corresponds to the vaddr, but is this necessarily the case?
For example, it is valid to pass a non-highmem page kmap_atomic(), which
will simply return a direct pointer to t...
2007 Apr 18
1
[PATCH 6/9] 00mm9 optimize ptep establish for pae.patch
...ing installed.
Signed-off-by: Zachary Amsden <zach@vmware.com>
===================================================================
--- a/include/asm-i386/pgtable-2level.h
+++ b/include/asm-i386/pgtable-2level.h
@@ -16,6 +16,7 @@
#define set_pte(pteptr, pteval) (*(pteptr) = pteval)
#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval)
#define set_pte_atomic(pteptr, pteval) set_pte(pteptr,pteval)
+#define set_pte_present(mm,addr,ptep,pteval) set_pte_at(mm,addr,ptep,pteval)
#define set_pmd(pmdptr, pmdval) (*(pmdptr) = (pmdval))
#define pte_clear(mm,addr,xp) do { set_pte_at(mm, addr, x...
2020 Aug 15
6
[PATCH v4 0/6] x86/paravirt: cleanup after 32-bit PV removal
...ts to V1
- new patches 3 and 4
Juergen Gross (6):
x86/paravirt: remove 32-bit support from PARAVIRT_XXL
x86/paravirt: cleanup paravirt macros
x86/paravirt: use CONFIG_PARAVIRT_XXL instead of CONFIG_PARAVIRT
x86/entry/32: revert "Fix XEN_PV build dependency"
x86/paravirt: remove set_pte_at pv-op
x86/paravirt: avoid needless paravirt step clearing page table entries
arch/x86/entry/entry_64.S | 4 +-
arch/x86/entry/vdso/vdso32/vclock_gettime.c | 1 +
arch/x86/include/asm/fixmap.h | 2 +-
arch/x86/include/asm/idtentry.h | 4 +-
arc...
2007 Apr 18
0
[patch 6/9] Guest page hinting: writable page table entries.
...install_arg_page(struct vm_area_str
{
struct mm_struct *mm = vma->vm_mm;
pte_t * pte;
+ pte_t pte_val;
spinlock_t *ptl;
if (unlikely(anon_vma_prepare(vma)))
@@ -322,8 +323,9 @@ void install_arg_page(struct vm_area_str
}
inc_mm_counter(mm, anon_rss);
lru_cache_add_active(page);
- set_pte_at(mm, address, pte, pte_mkdirty(pte_mkwrite(mk_pte(
- page, vma->vm_page_prot))));
+ pte_val = pte_mkdirty(pte_mkwrite(mk_pte(page, vma->vm_page_prot)));
+ page_check_writable(page, pte_val);
+ set_pte_at(mm, address, pte, pte_val);
page_add_new_anon_rmap(page, vma, address);
pte_unmap_...
2007 Apr 18
0
[patch 6/9] Guest page hinting: writable page table entries.
...install_arg_page(struct vm_area_str
{
struct mm_struct *mm = vma->vm_mm;
pte_t * pte;
+ pte_t pte_val;
spinlock_t *ptl;
if (unlikely(anon_vma_prepare(vma)))
@@ -322,8 +323,9 @@ void install_arg_page(struct vm_area_str
}
inc_mm_counter(mm, anon_rss);
lru_cache_add_active(page);
- set_pte_at(mm, address, pte, pte_mkdirty(pte_mkwrite(mk_pte(
- page, vma->vm_page_prot))));
+ pte_val = pte_mkdirty(pte_mkwrite(mk_pte(page, vma->vm_page_prot)));
+ page_check_writable(page, pte_val);
+ set_pte_at(mm, address, pte, pte_val);
page_add_new_anon_rmap(page, vma, address);
pte_unmap_...
2007 Apr 18
2
[PATCH 5/6] i386 virtualization - Make generic set wrprotect a macro
...de/asm-generic/pgtable.h 2005-08-15 13:54:42.000000000 -0700
> @@ -313,11 +313,12 @@
> #endif
>
> #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
>
&g...
2007 Apr 18
2
[PATCH 5/6] i386 virtualization - Make generic set wrprotect a macro
...de/asm-generic/pgtable.h 2005-08-15 13:54:42.000000000 -0700
> @@ -313,11 +313,12 @@
> #endif
>
> #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
>
&g...
2007 Apr 18
0
[PATCH 7/9] 00mma remove set pte atomic.patch
Now that ptep_establish has a definition in PAE i386 3-level paging code,
the only paging model which is insane enough to have multi-word hardware
PTEs which are not efficient to set atomically, we can remove the ghost
of set_pte_atomic from other architectures which falesly duplicated it,
and remove all knowledge of it from the generic pgtable code.
set_pte_atomic is now a private pte operator which is specific to i386
Signed-off-by: Zachary Amsden <zach@vmware.com>
===================================================...
2017 Sep 04
0
[PATCH] x86/paravirt: remove no longer used paravirt functions
...VCALL1(pv_mmu_ops.release_p4d, pfn);
}
-static inline void pte_update(struct mm_struct *mm, unsigned long addr,
- pte_t *ptep)
-{
- PVOP_VCALL3(pv_mmu_ops.pte_update, mm, addr, ptep);
-}
-
static inline pte_t __pte(pteval_t val)
{
pteval_t ret;
@@ -472,28 +457,6 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr,
PVOP_VCALL4(pv_mmu_ops.set_pte_at, mm, addr, ptep, pte.pte);
}
-static inline void set_pmd_at(struct mm_struct *mm, unsigned long addr,
- pmd_t *pmdp, pmd_t pmd)
-{
- if (sizeof(pmdval_t) > sizeof(long))
- /* 5 arg words */
- pv_mmu_ops.s...
2017 Sep 04
0
[PATCH] x86/paravirt: remove no longer used paravirt functions
...VCALL1(pv_mmu_ops.release_p4d, pfn);
}
-static inline void pte_update(struct mm_struct *mm, unsigned long addr,
- pte_t *ptep)
-{
- PVOP_VCALL3(pv_mmu_ops.pte_update, mm, addr, ptep);
-}
-
static inline pte_t __pte(pteval_t val)
{
pteval_t ret;
@@ -472,28 +457,6 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr,
PVOP_VCALL4(pv_mmu_ops.set_pte_at, mm, addr, ptep, pte.pte);
}
-static inline void set_pmd_at(struct mm_struct *mm, unsigned long addr,
- pmd_t *pmdp, pmd_t pmd)
-{
- if (sizeof(pmdval_t) > sizeof(long))
- /* 5 arg words */
- pv_mmu_ops.s...
2007 Apr 18
0
[PATCH 3/9] 00mm3 lazy mmu mode hooks.patch
...e_alloc_map_lock(mm, pmd, addr, &ptl);
if (!pte)
return -ENOMEM;
+ arch_enter_lazy_mmu_mode();
do {
struct page *page = ZERO_PAGE(addr);
pte_t zero_pte = pte_wrprotect(mk_pte(page, prot));
@@ -1118,6 +1123,7 @@ static int zeromap_pte_range(struct mm_s
BUG_ON(!pte_none(*pte));
set_pte_at(mm, addr, pte, zero_pte);
} while (pte++, addr += PAGE_SIZE, addr != end);
+ arch_leave_lazy_mmu_mode();
pte_unmap_unlock(pte - 1, ptl);
return 0;
}
@@ -1275,11 +1281,13 @@ static int remap_pte_range(struct mm_str
pte = pte_alloc_map_lock(mm, pmd, addr, &ptl);
if (!pte)
return -EN...
2007 Apr 18
2
pte_offset_map + lazy mmu
..._mode(); \
pte_clear(&init_mm, vaddr, ptep); \
__flush_tlb_one(vaddr); \
arch_leave_lazy_mmu_mode(); \
} while (0)
and take advantage of mmu batching to make this operation efficient.
But I'm not sure if this is safe.
(Also, kmap_atomic could use set_pte_at rather than set_pte.)
What do you think?
J
2007 Apr 18
2
pte_offset_map + lazy mmu
..._mode(); \
pte_clear(&init_mm, vaddr, ptep); \
__flush_tlb_one(vaddr); \
arch_leave_lazy_mmu_mode(); \
} while (0)
and take advantage of mmu batching to make this operation efficient.
But I'm not sure if this is safe.
(Also, kmap_atomic could use set_pte_at rather than set_pte.)
What do you think?
J
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 08/17] paravirt_ops - memory managment
...l(e))
-#define pgd_ERROR(e) \
- printk("%s:%d: bad pgd %p(%016lx).\n", __FILE__, __LINE__, &(e), pgd_val(e))
-
-#define pgd_none(x) (!pgd_val(x))
-#define pud_none(x) (!pud_val(x))
+#ifdef CONFIG_PARAVIRT
+#include <asm/paravirt.h>
+#else
+#define set_pte native_set_pte
+#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval)
+#define set_pmd native_set_pmd
+#define set_pud native_set_pud
+#define set_pgd native_set_pgd
+#define pte_clear(mm,addr,xp) do { set_pte_at(mm, addr, xp, __pte(0)); } while (0)
+#define pmd_clear(xp) do { set_pmd(xp, __pmd(0)); } while (0)
+#define pud_c...
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 08/17] paravirt_ops - memory managment
...l(e))
-#define pgd_ERROR(e) \
- printk("%s:%d: bad pgd %p(%016lx).\n", __FILE__, __LINE__, &(e), pgd_val(e))
-
-#define pgd_none(x) (!pgd_val(x))
-#define pud_none(x) (!pud_val(x))
+#ifdef CONFIG_PARAVIRT
+#include <asm/paravirt.h>
+#else
+#define set_pte native_set_pte
+#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval)
+#define set_pmd native_set_pmd
+#define set_pud native_set_pud
+#define set_pgd native_set_pgd
+#define pte_clear(mm,addr,xp) do { set_pte_at(mm, addr, xp, __pte(0)); } while (0)
+#define pmd_clear(xp) do { set_pmd(xp, __pmd(0)); } while (0)
+#define pud_c...
2019 Mar 08
1
[RFC PATCH V2 5/5] vhost: access vq metadata through kernel virtual address
...t/_end methods unless you rewrite
> > the locking.
> >
> > The difference with _start/_end, is that ->invalidate_range avoids the
> > _start callback basically, but to avoid the _start callback safely, it
> > has to be called in between the ptep_clear_flush and the set_pte_at
> > whenever the pfn changes like during a COW. So it cannot be coalesced
> > in a single TLB flush that invalidates all sptes in a range like we
> > prefer for performance reasons for example in KVM. It also cannot
> > sleep.
> >
> > In short ->invalidate_ra...
2019 Mar 08
1
[RFC PATCH V2 5/5] vhost: access vq metadata through kernel virtual address
...t/_end methods unless you rewrite
> > the locking.
> >
> > The difference with _start/_end, is that ->invalidate_range avoids the
> > _start callback basically, but to avoid the _start callback safely, it
> > has to be called in between the ptep_clear_flush and the set_pte_at
> > whenever the pfn changes like during a COW. So it cannot be coalesced
> > in a single TLB flush that invalidates all sptes in a range like we
> > prefer for performance reasons for example in KVM. It also cannot
> > sleep.
> >
> > In short ->invalidate_ra...
2007 Apr 19
3
[RFC, PATCH 1/5] Paravirt_ops full patching.patch
..._down_io(void) {
- paravirt_ops.io_delay();
+ PVOP_VCALL0(io_delay);
#ifdef REALLY_SLOW_IO
- paravirt_ops.io_delay();
- paravirt_ops.io_delay();
- paravirt_ops.io_delay();
+ PVOP_VCALL0(io_delay);
+ PVOP_VCALL0(io_delay);
+ PVOP_VCALL0(io_delay);
#endif
}
@@ -824,8 +838,7 @@ static inline void set_pte_at(struct mm_
static inline void set_pte_at(struct mm_struct *mm, unsigned long addr,
pte_t *ptep, pte_t pteval)
{
- /* 5 arg words */
- paravirt_ops.set_pte_at(mm, addr, ptep, pteval);
+ PVOP_VCALL5(mm, addr, ptep, pteval.pte_low, pteval.pte_high);
}
static inline void set_pte_atomic(...