Home
last modified time | relevance | path

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

/linux/arch/x86/kvm/mmu/
H A Dspte.c95 u64 spte = generation_mmio_spte_mask(gen); in make_mmio_spte() local
99 spte |= vcpu->kvm->arch.shadow_mmio_value | access; in make_mmio_spte()
100 spte |= gpa | shadow_nonpresent_or_rsvd_mask; in make_mmio_spte()
101 spte |= (gpa & shadow_nonpresent_or_rsvd_mask) in make_mmio_spte()
104 return spte; in make_mmio_spte()
164 bool spte_needs_atomic_update(u64 spte) in spte_needs_atomic_update() argument
167 if (!is_writable_pte(spte) && is_mmu_writable_spte(spte)) in spte_needs_atomic_update()
174 if (!spte_ad_enabled(spte)) in spte_needs_atomic_update()
183 return is_writable_pte(spte) && !(spte & shadow_dirty_mask); in spte_needs_atomic_update()
193 u64 spte = SPTE_MMU_PRESENT_MASK; in make_spte() local
[all …]
H A Dspte.h228 static inline bool is_frozen_spte(u64 spte) in is_frozen_spte() argument
230 return spte == FROZEN_SPTE; in is_frozen_spte()
266 static inline struct kvm_mmu_page *spte_to_child_sp(u64 spte) in spte_to_child_sp() argument
268 return to_shadow_page(spte & SPTE_BASE_ADDR_MASK); in spte_to_child_sp()
303 static inline bool is_mmio_spte(struct kvm *kvm, u64 spte) in is_mmio_spte() argument
305 return (spte & shadow_mmio_mask) == kvm->arch.shadow_mmio_value && in is_mmio_spte()
314 static inline bool is_ept_ve_possible(u64 spte) in is_ept_ve_possible() argument
317 !(spte & VMX_EPT_SUPPRESS_VE_BIT) && in is_ept_ve_possible()
318 (spte & VMX_EPT_RWX_MASK) != VMX_EPT_MISCONFIG_WX_VALUE; in is_ept_ve_possible()
326 static inline bool spte_ad_enabled(u64 spte) in spte_ad_enabled() argument
[all …]
H A Dmmutrace.h216 TP_PROTO(u64 *sptep, gfn_t gfn, u64 spte),
217 TP_ARGS(sptep, gfn, spte),
229 __entry->access = spte & ACC_ALL;
230 __entry->gen = get_mmio_spte_generation(spte);
316 TP_PROTO(u64 spte, unsigned int kvm_gen, unsigned int spte_gen),
317 TP_ARGS(spte, kvm_gen, spte_gen),
322 __field(u64, spte)
328 __entry->spte = spte;
331 TP_printk("spte %llx kvm_gen %x spte-gen %x valid %d", __entry->spte,
344 __field(u64, spte)
[all …]
H A Dmmu.c30 #include "spte.h"
175 #define for_each_shadow_entry_lockless(_vcpu, _addr, _walker, spte) \ argument
178 ({ spte = mmu_spte_get_lockless(_walker.sptep); 1; }); \
179 __shadow_walk_next(&(_walker), spte))
184 static void mmu_spte_set(u64 *sptep, u64 spte);
295 u64 spte = make_mmio_spte(vcpu, gfn, access); in mark_mmio_spte() local
297 trace_mark_mmio_spte(sptep, gfn, spte); in mark_mmio_spte()
298 mmu_spte_set(sptep, spte); in mark_mmio_spte()
301 static gfn_t get_mmio_spte_gfn(u64 spte) in get_mmio_spte_gfn() argument
303 u64 gpa = spte in get_mmio_spte_gfn()
311 get_mmio_spte_access(u64 spte) get_mmio_spte_access() argument
316 check_mmio_spte(struct kvm_vcpu * vcpu,u64 spte) check_mmio_spte() argument
337 __set_spte(u64 * sptep,u64 spte) __set_spte() argument
343 __update_clear_spte_fast(u64 * sptep,u64 spte) __update_clear_spte_fast() argument
349 __update_clear_spte_slow(u64 * sptep,u64 spte) __update_clear_spte_slow() argument
365 u64 spte; global() member
368 count_spte_clear(u64 * sptep,u64 spte) count_spte_clear() argument
380 __set_spte(u64 * sptep,u64 spte) __set_spte() argument
399 __update_clear_spte_fast(u64 * sptep,u64 spte) __update_clear_spte_fast() argument
418 __update_clear_spte_slow(u64 * sptep,u64 spte) __update_clear_spte_slow() argument
455 union split_spte spte, *orig = (union split_spte *)sptep; __get_spte_lockless() local
1008 pte_list_add(struct kvm * kvm,struct kvm_mmu_memory_cache * cache,u64 * spte,struct kvm_rmap_head * rmap_head) pte_list_add() argument
1087 pte_list_remove(struct kvm * kvm,u64 * spte,struct kvm_rmap_head * rmap_head) pte_list_remove() argument
1184 rmap_remove(struct kvm * kvm,u64 * spte) rmap_remove() argument
1318 u64 spte = *sptep; spte_write_protect() local
1346 u64 spte = *sptep; spte_clear_dirty() local
1682 __rmap_add(struct kvm * kvm,struct kvm_mmu_memory_cache * cache,const struct kvm_memory_slot * slot,u64 * spte,gfn_t gfn,unsigned int access) __rmap_add() argument
1704 rmap_add(struct kvm_vcpu * vcpu,const struct kvm_memory_slot * slot,u64 * spte,gfn_t gfn,unsigned int access) rmap_add() argument
1722 u64 spte; kvm_rmap_age_gfn_range() local
1869 mark_unsync(u64 * spte) mark_unsync() argument
2244 clear_sp_write_flooding_count(u64 * spte) clear_sp_write_flooding_count() argument
2523 __shadow_walk_next(struct kvm_shadow_walk_iterator * iterator,u64 spte) __shadow_walk_next() argument
2543 u64 spte; __link_shadow_page() local
2604 mmu_page_zap_pte(struct kvm * kvm,struct kvm_mmu_page * sp,u64 * spte,struct list_head * invalid_list) mmu_page_zap_pte() argument
3040 u64 spte; mmu_set_spte() local
3153 u64 *spte, *start = NULL; __direct_pte_prefetch() local
3412 disallowed_hugepage_adjust(struct kvm_page_fault * fault,u64 spte,int cur_level) disallowed_hugepage_adjust() argument
3640 fast_pf_get_last_sptep(struct kvm_vcpu * vcpu,gpa_t gpa,u64 * spte) fast_pf_get_last_sptep() argument
3661 u64 spte; fast_page_fault() local
4367 u64 spte; get_walk() local
4442 u64 spte; handle_mmio_page_fault() local
4496 u64 spte; shadow_page_table_clear_flood() local
6213 u64 *spte; get_written_sptes() local
6247 u64 entry, gentry, *spte; kvm_mmu_track_write() local
7060 u64 *sptep, spte; shadow_mmu_split_huge_page() local
7104 u64 spte; shadow_mmu_try_split_huge_page() local
[all...]
H A Dpaging_tmpl.h152 struct kvm_mmu_page *sp, u64 *spte, in FNAME()
169 drop_spte(vcpu->kvm, spte); in FNAME()
533 u64 *spte, pt_element_t gpte) in FNAME()
538 if (FNAME(prefetch_invalid_gpte)(vcpu, sp, spte, gpte)) in FNAME()
545 return kvm_mmu_prefetch_sptes(vcpu, gfn, spte, 1, pte_access); in FNAME()
576 u64 *spte; in FNAME() local
595 spte = sp->spt + i; in FNAME()
597 for (i = 0; i < PTE_PREFETCH_NUM; i++, spte++) { in FNAME()
598 if (spte == sptep) in FNAME()
601 if (is_shadow_present_pte(*spte)) in FNAME()
[all …]
H A Dtdp_mmu.h114 u64 *spte);
H A Dtdp_mmu.c1240 u64 spte = make_nonleaf_spte(sp->spt, !kvm_ad_enabled); in tdp_mmu_link_sp() local
1244 ret = tdp_mmu_set_spte_atomic(kvm, iter, spte); in tdp_mmu_link_sp()
1248 tdp_mmu_iter_set_spte(kvm, iter, spte); in tdp_mmu_link_sp()
1969 u64 *spte) in kvm_tdp_mmu_fast_pf_get_last_sptep() argument
1977 *spte = iter.old_spte; in kvm_tdp_mmu_fast_pf_get_last_sptep()
H A Dmmu_internal.h407 void disallowed_hugepage_adjust(struct kvm_page_fault *fault, u64 spte, int cur_level);
/linux/Documentation/virt/kvm/
H A Dlocking.rst78 write-protect. That means we just need to change the W bit of the spte.
81 on the spte:
88 On fast page fault path, we will use cmpxchg to atomically set the spte W
89 bit if spte.HOST_WRITEABLE = 1 and spte.WRITE_PROTECT = 1, to restore the saved
90 R/X bits if for an access-traced spte, or both. This is safe because whenever
106 | spte is the shadow page table entry corresponding with gpte and |
107 | spte = pfn1 |
115 | old_spte = *spte; | |
119 | | spte = 0; |
126 | | spte = pfn1; |
[all …]
/linux/Documentation/virt/kvm/x86/
H A 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
251 parent_ptes bit 0 is zero, only one spte points at this page and
252 parent_ptes points at this single spte, otherwise, there exists multiple
272 Only present on 32-bit hosts, where a 64-bit spte cannot be written
341 - check for valid generation number in the spte (see "Fast invalidation of
360 - walk the shadow page table to find the spte for the translation,
363 - If this is an mmio request, cache the mmio info to the spte and set some
364 reserved bit on the spte (see callers of kvm_mmu_set_mmio_spte_mask)
[all …]
/linux/mm/
H A Dhugetlb.c6886 pte_t *spte = NULL; in huge_pmd_share() local
6896 spte = hugetlb_walk(svma, saddr, in huge_pmd_share()
6898 if (spte) { in huge_pmd_share()
6899 ptdesc_pmd_pts_inc(virt_to_ptdesc(spte)); in huge_pmd_share()
6905 if (!spte) in huge_pmd_share()
6911 (pmd_t *)((unsigned long)spte & PAGE_MASK)); in huge_pmd_share()
6914 ptdesc_pmd_pts_dec(virt_to_ptdesc(spte)); in huge_pmd_share()
/linux/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/
H A Dvmm.c472 bool spte = !!pgt->pte[ptei].s.sptes; in nvkm_vmm_ref_hwpt() local
475 if (spte != next) in nvkm_vmm_ref_hwpt()
479 if (!spte) { in nvkm_vmm_ref_hwpt()