Home
last modified time | relevance | path

Searched refs:spte (Results 1 – 15 of 15) sorted by relevance

/Linux-v6.1/arch/x86/kvm/mmu/
Dspte.c74 u64 spte = generation_mmio_spte_mask(gen); in make_mmio_spte() local
80 spte |= shadow_mmio_value | access; in make_mmio_spte()
81 spte |= gpa | shadow_nonpresent_or_rsvd_mask; in make_mmio_spte()
82 spte |= (gpa & shadow_nonpresent_or_rsvd_mask) in make_mmio_spte()
85 return spte; in make_mmio_spte()
114 bool spte_has_volatile_bits(u64 spte) in spte_has_volatile_bits() argument
122 if (!is_writable_pte(spte) && is_mmu_writable_spte(spte)) in spte_has_volatile_bits()
125 if (is_access_track_spte(spte)) in spte_has_volatile_bits()
128 if (spte_ad_enabled(spte)) { in spte_has_volatile_bits()
129 if (!(spte & shadow_accessed_mask) || in spte_has_volatile_bits()
[all …]
Dspte.h201 static inline bool is_removed_spte(u64 spte) in is_removed_spte() argument
203 return spte == REMOVED_SPTE; in is_removed_spte()
222 static inline bool is_mmio_spte(u64 spte) in is_mmio_spte() argument
224 return (spte & shadow_mmio_mask) == shadow_mmio_value && in is_mmio_spte()
249 static inline bool spte_ad_enabled(u64 spte) in spte_ad_enabled() argument
251 MMU_WARN_ON(!is_shadow_present_pte(spte)); in spte_ad_enabled()
252 return (spte & SPTE_TDP_AD_MASK) != SPTE_TDP_AD_DISABLED_MASK; in spte_ad_enabled()
255 static inline bool spte_ad_need_write_protect(u64 spte) in spte_ad_need_write_protect() argument
257 MMU_WARN_ON(!is_shadow_present_pte(spte)); in spte_ad_need_write_protect()
263 return (spte & SPTE_TDP_AD_MASK) != SPTE_TDP_AD_ENABLED_MASK; in spte_ad_need_write_protect()
[all …]
Dmmutrace.h212 TP_PROTO(u64 *sptep, gfn_t gfn, u64 spte),
213 TP_ARGS(sptep, gfn, spte),
225 __entry->access = spte & ACC_ALL;
226 __entry->gen = get_mmio_spte_generation(spte);
312 TP_PROTO(u64 spte, unsigned int kvm_gen, unsigned int spte_gen),
313 TP_ARGS(spte, kvm_gen, spte_gen),
318 __field(u64, spte)
324 __entry->spte = spte;
327 TP_printk("spte %llx kvm_gen %x spte-gen %x valid %d", __entry->spte,
340 __field(u64, spte)
[all …]
Dmmu.c151 #define for_each_shadow_entry_lockless(_vcpu, _addr, _walker, spte) \ argument
154 ({ spte = mmu_spte_get_lockless(_walker.sptep); 1; }); \
155 __shadow_walk_next(&(_walker), spte))
161 static void mmu_spte_set(u64 *sptep, u64 spte);
266 u64 spte = make_mmio_spte(vcpu, gfn, access); in mark_mmio_spte() local
268 trace_mark_mmio_spte(sptep, gfn, spte); in mark_mmio_spte()
269 mmu_spte_set(sptep, spte); in mark_mmio_spte()
272 static gfn_t get_mmio_spte_gfn(u64 spte) in get_mmio_spte_gfn() argument
274 u64 gpa = spte & shadow_nonpresent_or_rsvd_lower_gfn_mask; in get_mmio_spte_gfn()
276 gpa |= (spte >> SHADOW_NONPRESENT_OR_RSVD_MASK_LEN) in get_mmio_spte_gfn()
[all …]
Dpaging_tmpl.h152 struct kvm_mmu_page *sp, u64 *spte, in FNAME()
169 drop_spte(vcpu->kvm, spte); in FNAME()
522 u64 *spte, pt_element_t gpte, bool no_dirty_log) in FNAME()
529 if (FNAME(prefetch_invalid_gpte)(vcpu, sp, spte, gpte)) in FNAME()
532 pgprintk("%s: gpte %llx spte %p\n", __func__, (u64)gpte, spte); in FNAME()
547 mmu_set_spte(vcpu, slot, spte, pte_access, gfn, pfn, NULL); in FNAME()
580 u64 *spte; in FNAME() local
599 spte = sp->spt + i; in FNAME()
601 for (i = 0; i < PTE_PREFETCH_NUM; i++, spte++) { in FNAME()
602 if (spte == sptep) in FNAME()
[all …]
Dtdp_iter.c65 tdp_ptep_t spte_to_child_pt(u64 spte, int level) in spte_to_child_pt() argument
71 if (!is_shadow_present_pte(spte) || is_last_spte(spte, level)) in spte_to_child_pt()
74 return (tdp_ptep_t)__va(spte_to_pfn(spte) << PAGE_SHIFT); in spte_to_child_pt()
Dtdp_mmu.h66 u64 *spte);
Dtdp_mmu.c1130 u64 spte = make_nonleaf_spte(sp->spt, !kvm_ad_enabled()); in tdp_mmu_link_sp() local
1134 ret = tdp_mmu_set_spte_atomic(kvm, iter, spte); in tdp_mmu_link_sp()
1138 tdp_mmu_set_spte(kvm, iter, spte); in tdp_mmu_link_sp()
1889 u64 *spte) in kvm_tdp_mmu_fast_pf_get_last_sptep() argument
1897 *spte = iter.old_spte; in kvm_tdp_mmu_fast_pf_get_last_sptep()
Dmmu_internal.h314 void disallowed_hugepage_adjust(struct kvm_page_fault *fault, u64 spte, int cur_level);
/Linux-v6.1/Documentation/virt/kvm/
Dlocking.rst56 write-protect. That means we just need to change the W bit of the spte.
59 on the spte:
66 On fast page fault path, we will use cmpxchg to atomically set the spte W
67 bit if spte.HOST_WRITEABLE = 1 and spte.WRITE_PROTECT = 1, to restore the saved
68 R/X bits if for an access-traced spte, or both. This is safe because whenever
84 | spte is the shadow page table entry corresponding with gpte and |
85 | spte = pfn1 |
93 | old_spte = *spte; | |
97 | | spte = 0; |
104 | | spte = pfn1; |
[all …]
/Linux-v6.1/Documentation/virt/kvm/x86/
Dmmu.rst55 spte shadow pte (referring to pfns)
125 A nonleaf spte allows the hardware mmu to reach the leaf pages and
128 A leaf spte corresponds to either one or two translations encoded into
233 parent_ptes bit 0 is zero, only one spte points at this page and
234 parent_ptes points at this single spte, otherwise, there exists multiple
251 Only present on 32-bit hosts, where a 64-bit spte cannot be written
316 - check for valid generation number in the spte (see "Fast invalidation of
335 - walk the shadow page table to find the spte for the translation,
338 - If this is an mmio request, cache the mmio info to the spte and set some
339 reserved bit on the spte (see callers of kvm_mmu_set_mmio_spte_mask)
[all …]
/Linux-v6.1/arch/x86/kvm/
DMakefile15 mmu/spte.o
/Linux-v6.1/arch/s390/mm/
Dpgtable.c666 pte_t spte, tpte; in ptep_shadow_pte() local
672 spte = *sptep; in ptep_shadow_pte()
673 if (!(pte_val(spte) & _PAGE_INVALID) && in ptep_shadow_pte()
674 !((pte_val(spte) & _PAGE_PROTECT) && in ptep_shadow_pte()
678 tpte = __pte((pte_val(spte) & PAGE_MASK) | in ptep_shadow_pte()
/Linux-v6.1/mm/
Dhugetlb.c6976 pte_t *spte = NULL; in huge_pmd_share() local
6987 spte = huge_pte_offset(svma->vm_mm, saddr, in huge_pmd_share()
6989 if (spte) { in huge_pmd_share()
6990 get_page(virt_to_page(spte)); in huge_pmd_share()
6996 if (!spte) in huge_pmd_share()
6999 ptl = huge_pte_lock(hstate_vma(vma), mm, spte); in huge_pmd_share()
7002 (pmd_t *)((unsigned long)spte & PAGE_MASK)); in huge_pmd_share()
7005 put_page(virt_to_page(spte)); in huge_pmd_share()
/Linux-v6.1/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/
Dvmm.c448 bool spte = pgt->pte[ptei] & NVKM_VMM_PTE_SPTES; in nvkm_vmm_ref_hwpt() local
451 if (spte != next) in nvkm_vmm_ref_hwpt()
455 if (!spte) { in nvkm_vmm_ref_hwpt()