/Linux-v5.15/arch/x86/kvm/mmu/ |
D | spte.c | 57 u64 spte = generation_mmio_spte_mask(gen); in make_mmio_spte() local 63 spte |= shadow_mmio_value | access; in make_mmio_spte() 64 spte |= gpa | shadow_nonpresent_or_rsvd_mask; in make_mmio_spte() 65 spte |= (gpa & shadow_nonpresent_or_rsvd_mask) in make_mmio_spte() 68 return spte; in make_mmio_spte() 97 u64 spte = SPTE_MMU_PRESENT_MASK; in make_spte() local 101 spte |= SPTE_TDP_AD_DISABLED_MASK; in make_spte() 103 spte |= SPTE_TDP_AD_WRPROT_ONLY_MASK; in make_spte() 111 spte |= shadow_present_mask; in make_spte() 113 spte |= spte_shadow_accessed_mask(spte); in make_spte() [all …]
|
D | spte.h | 184 static inline bool is_removed_spte(u64 spte) in is_removed_spte() argument 186 return spte == REMOVED_SPTE; in is_removed_spte() 205 static inline bool is_mmio_spte(u64 spte) in is_mmio_spte() argument 207 return (spte & shadow_mmio_mask) == shadow_mmio_value && in is_mmio_spte() 221 static inline bool spte_ad_enabled(u64 spte) in spte_ad_enabled() argument 223 MMU_WARN_ON(!is_shadow_present_pte(spte)); in spte_ad_enabled() 224 return (spte & SPTE_TDP_AD_MASK) != SPTE_TDP_AD_DISABLED_MASK; in spte_ad_enabled() 227 static inline bool spte_ad_need_write_protect(u64 spte) in spte_ad_need_write_protect() argument 229 MMU_WARN_ON(!is_shadow_present_pte(spte)); in spte_ad_need_write_protect() 235 return (spte & SPTE_TDP_AD_MASK) != SPTE_TDP_AD_ENABLED_MASK; in spte_ad_need_write_protect() [all …]
|
D | mmu.c | 178 #define for_each_shadow_entry_lockless(_vcpu, _addr, _walker, spte) \ argument 181 ({ spte = mmu_spte_get_lockless(_walker.sptep); 1; }); \ 182 __shadow_walk_next(&(_walker), spte)) 188 static void mmu_spte_set(u64 *sptep, u64 spte); 298 u64 spte = make_mmio_spte(vcpu, gfn, access); in mark_mmio_spte() local 300 trace_mark_mmio_spte(sptep, gfn, spte); in mark_mmio_spte() 301 mmu_spte_set(sptep, spte); in mark_mmio_spte() 304 static gfn_t get_mmio_spte_gfn(u64 spte) in get_mmio_spte_gfn() argument 306 u64 gpa = spte & shadow_nonpresent_or_rsvd_lower_gfn_mask; in get_mmio_spte_gfn() 308 gpa |= (spte >> SHADOW_NONPRESENT_OR_RSVD_MASK_LEN) in get_mmio_spte_gfn() [all …]
|
D | mmutrace.h | 211 TP_PROTO(u64 *sptep, gfn_t gfn, u64 spte), 212 TP_ARGS(sptep, gfn, spte), 224 __entry->access = spte & ACC_ALL; 225 __entry->gen = get_mmio_spte_generation(spte); 311 TP_PROTO(u64 spte, unsigned int kvm_gen, unsigned int spte_gen), 312 TP_ARGS(spte, kvm_gen, spte_gen), 317 __field(u64, spte) 323 __entry->spte = spte; 326 TP_printk("spte %llx kvm_gen %x spte-gen %x valid %d", __entry->spte, 339 __field(u64, spte) [all …]
|
D | tdp_iter.c | 62 tdp_ptep_t spte_to_child_pt(u64 spte, int level) in spte_to_child_pt() argument 68 if (!is_shadow_present_pte(spte) || is_last_spte(spte, level)) in spte_to_child_pt() 71 return (tdp_ptep_t)__va(spte_to_pfn(spte) << PAGE_SHIFT); in spte_to_child_pt()
|
D | paging_tmpl.h | 190 struct kvm_mmu_page *sp, u64 *spte, in FNAME() 207 drop_spte(vcpu->kvm, spte); in FNAME() 562 u64 *spte, pt_element_t gpte, bool no_dirty_log) in FNAME() 568 if (FNAME(prefetch_invalid_gpte)(vcpu, sp, spte, gpte)) in FNAME() 571 pgprintk("%s: gpte %llx spte %p\n", __func__, (u64)gpte, spte); in FNAME() 585 mmu_set_spte(vcpu, spte, pte_access, false, PG_LEVEL_4K, gfn, pfn, in FNAME() 593 u64 *spte, const void *pte) in FNAME() 597 FNAME(prefetch_gpte)(vcpu, sp, spte, gpte, false); in FNAME() 628 u64 *spte; in FNAME() local 647 spte = sp->spt + i; in FNAME() [all …]
|
D | mmu_internal.h | 169 void disallowed_hugepage_adjust(u64 spte, gfn_t gfn, int cur_level,
|
D | tdp_mmu.h | 90 u64 *spte);
|
D | tdp_mmu.c | 1573 u64 *spte) in kvm_tdp_mmu_fast_pf_get_last_sptep() argument 1581 *spte = iter.old_spte; in kvm_tdp_mmu_fast_pf_get_last_sptep()
|
/Linux-v5.15/Documentation/virt/kvm/ |
D | locking.rst | 56 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 …]
|
D | mmu.rst | 55 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 229 parent_ptes bit 0 is zero, only one spte points at this page and 230 parent_ptes points at this single spte, otherwise, there exists multiple 247 Only present on 32-bit hosts, where a 64-bit spte cannot be written 312 - check for valid generation number in the spte (see "Fast invalidation of 331 - walk the shadow page table to find the spte for the translation, 334 - If this is an mmio request, cache the mmio info to the spte and set some 335 reserved bit on the spte (see callers of kvm_mmu_set_mmio_spte_mask) [all …]
|
/Linux-v5.15/arch/x86/kvm/ |
D | Makefile | 20 mmu/spte.o
|
/Linux-v5.15/arch/s390/mm/ |
D | pgtable.c | 652 pte_t spte, tpte; in ptep_shadow_pte() local 658 spte = *sptep; in ptep_shadow_pte() 659 if (!(pte_val(spte) & _PAGE_INVALID) && in ptep_shadow_pte() 660 !((pte_val(spte) & _PAGE_PROTECT) && in ptep_shadow_pte() 664 pte_val(tpte) = (pte_val(spte) & PAGE_MASK) | in ptep_shadow_pte()
|
/Linux-v5.15/mm/ |
D | hugetlb.c | 5983 pte_t *spte = NULL; in huge_pmd_share() local 5994 spte = huge_pte_offset(svma->vm_mm, saddr, in huge_pmd_share() 5996 if (spte) { in huge_pmd_share() 5997 get_page(virt_to_page(spte)); in huge_pmd_share() 6003 if (!spte) in huge_pmd_share() 6006 ptl = huge_pte_lock(hstate_vma(vma), mm, spte); in huge_pmd_share() 6009 (pmd_t *)((unsigned long)spte & PAGE_MASK)); in huge_pmd_share() 6012 put_page(virt_to_page(spte)); in huge_pmd_share()
|
/Linux-v5.15/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/ |
D | vmm.c | 448 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()
|