| /linux-6.15/arch/x86/kvm/mmu/ |
| H A D | spte.c | 107 return spte; in make_mmio_spte() 141 if (!is_writable_pte(spte) && is_mmu_writable_spte(spte)) in spte_needs_atomic_update() 251 spte = mark_spte_for_access_track(spte); in make_spte() 277 spte = restore_acc_track_spte(spte); in modify_spte_protections() 280 spte = (spte | set) & ~clear; in modify_spte_protections() 283 spte = mark_spte_for_access_track(spte); in modify_spte_protections() 285 return spte; in modify_spte_protections() 367 return spte; in make_nonleaf_spte() 376 return spte; in mark_spte_for_access_track() 384 spte |= (spte & SHADOW_ACC_TRACK_SAVED_BITS_MASK) << in mark_spte_for_access_track() [all …]
|
| H A D | spte.h | 231 return spte == FROZEN_SPTE; in is_frozen_spte() 326 return !spte_ad_enabled(spte) && (spte & shadow_acc_track_mask) == 0; in is_access_track_spte() 375 u64 spte, int level) in is_rsvd_spte() argument 458 spte); in check_spte_writable_invariants() 460 WARN_ONCE(is_writable_pte(spte), in check_spte_writable_invariants() 477 return is_executable_pte(spte); in is_access_allowed() 480 return is_writable_pte(spte); in is_access_allowed() 483 return spte & PT_PRESENT_MASK; in is_access_allowed() 542 spte &= ~shadow_acc_track_mask; in restore_acc_track_spte() 545 spte |= saved_bits; in restore_acc_track_spte() [all …]
|
| H A D | mmutrace.h | 214 TP_ARGS(sptep, gfn, spte), 226 __entry->access = spte & ACC_ALL; 314 TP_ARGS(spte, kvm_gen, spte_gen), 319 __field(u64, spte) 325 __entry->spte = spte; 341 __field(u64, spte) 352 __entry->spte = *sptep; 361 __entry->gfn, __entry->spte, 424 TP_ARGS(gfn, spte, level, errno), 428 __field(u64, spte) [all …]
|
| H A D | mmu.c | 364 u64 spte; member 471 return spte.spte; in __get_spte_lockless() 1321 spte = spte & ~PT_WRITABLE_MASK; in spte_write_protect() 1717 u64 spte; in kvm_rmap_age_gfn_range() local 2511 u64 spte; in __link_shadow_page() local 3008 u64 spte; in mmu_set_spte() local 3577 u64 spte; in fast_page_fault() local 4257 u64 spte; in get_walk() local 4332 u64 spte; in handle_mmio_page_fault() local 4386 u64 spte; in shadow_page_table_clear_flood() local [all …]
|
| H A D | paging_tmpl.h | 169 drop_spte(vcpu->kvm, spte); in FNAME() 533 u64 *spte, pt_element_t gpte) in FNAME() 576 u64 *spte; in FNAME() local 595 spte = sp->spt + i; in FNAME() 598 if (spte == sptep) in FNAME() 601 if (is_shadow_present_pte(*spte)) in FNAME() 895 u64 *sptep, spte; in FNAME() local 949 spte = *sptep; in FNAME() 953 spte_to_pfn(spte), spte, true, true, in FNAME() 954 host_writable, &spte); in FNAME() [all …]
|
| H A D | tdp_iter.c | 64 tdp_ptep_t spte_to_child_pt(u64 spte, int level) in spte_to_child_pt() argument 70 if (!is_shadow_present_pte(spte) || is_last_spte(spte, level)) in spte_to_child_pt() 73 return (tdp_ptep_t)__va(spte_to_pfn(spte) << PAGE_SHIFT); in spte_to_child_pt()
|
| H A D | tdp_mmu.h | 113 u64 *spte);
|
| H A D | tdp_mmu.c | 1217 u64 spte = make_nonleaf_spte(sp->spt, !kvm_ad_enabled); in tdp_mmu_link_sp() local 1221 ret = tdp_mmu_set_spte_atomic(kvm, iter, spte); in tdp_mmu_link_sp() 1225 tdp_mmu_iter_set_spte(kvm, iter, spte); in tdp_mmu_link_sp() 1944 u64 *spte) in kvm_tdp_mmu_fast_pf_get_last_sptep() argument 1952 *spte = iter.old_spte; in kvm_tdp_mmu_fast_pf_get_last_sptep()
|
| H A D | mmu_internal.h | 413 void disallowed_hugepage_adjust(struct kvm_page_fault *fault, u64 spte, int cur_level);
|
| /linux-6.15/Documentation/virt/kvm/ |
| H A D | locking.rst | 79 on the spte: 87 bit if spte.HOST_WRITEABLE = 1 and spte.WRITE_PROTECT = 1, to restore the saved 104 | spte is the shadow page table entry corresponding with gpte and | 105 | spte = pfn1 | 151 spte is read-only and the Accessed bit has already been set since the 154 But it is not true after fast page fault since the spte can be marked 155 writable between reading spte and updating spte. Like below case: 200 the spte is always atomically updated in this case. 202 3) flush tlbs due to spte updated 206 writable spte might be cached on a CPU's TLB. [all …]
|
| /linux-6.15/Documentation/virt/kvm/x86/ |
| H A D | mmu.rst | 55 spte shadow pte (referring to pfns) 125 A nonleaf spte allows the hardware mmu to reach the leaf pages and 360 - walk the shadow page table to find the spte for the translation, 413 - kernel write fault: spte.u=0, spte.w=1 (allows full kernel access, 415 - read fault: spte.u=1, spte.w=0 (allows full read access, disallows kernel 424 If we get a user fetch or read fault, we'll change spte.u=1 and 450 To instantiate a large spte, four constraints must be satisfied: 452 - the spte must point to a large host page 479 When KVM finds an MMIO spte, it checks the generation number of the spte. 489 stored into the MMIO spte. Thus, the MMIO spte might be created based on [all …]
|
| /linux-6.15/arch/x86/kvm/ |
| H A D | Makefile | 11 mmu/spte.o
|
| /linux-6.15/arch/s390/mm/ |
| H A D | pgtable.c | 672 pte_t spte, tpte; in ptep_shadow_pte() local 678 spte = *sptep; in ptep_shadow_pte() 679 if (!(pte_val(spte) & _PAGE_INVALID) && in ptep_shadow_pte() 680 !((pte_val(spte) & _PAGE_PROTECT) && in ptep_shadow_pte() 684 tpte = __pte((pte_val(spte) & PAGE_MASK) | in ptep_shadow_pte()
|
| /linux-6.15/mm/ |
| H A D | hugetlb.c | 7556 pte_t *spte = NULL; in huge_pmd_share() local 7566 spte = hugetlb_walk(svma, saddr, in huge_pmd_share() 7568 if (spte) { in huge_pmd_share() 7569 ptdesc_pmd_pts_inc(virt_to_ptdesc(spte)); in huge_pmd_share() 7575 if (!spte) in huge_pmd_share() 7581 (pmd_t *)((unsigned long)spte & PAGE_MASK)); in huge_pmd_share() 7584 ptdesc_pmd_pts_dec(virt_to_ptdesc(spte)); in huge_pmd_share()
|
| /linux-6.15/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/ |
| H A 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()
|