Lines Matching refs:spte
16 #include "spte.h"
89 u64 spte = 0;
93 spte |= SPTE_AD_DISABLED_MASK;
95 spte |= SPTE_AD_WRPROT_ONLY_MASK;
103 spte |= shadow_present_mask;
105 spte |= spte_shadow_accessed_mask(spte);
113 spte |= shadow_x_mask;
115 spte |= shadow_nx_mask;
118 spte |= shadow_user_mask;
121 spte |= PT_PAGE_SIZE_MASK;
123 spte |= kvm_x86_ops.get_mt_mask(vcpu, gfn,
127 spte |= SPTE_HOST_WRITEABLE;
132 spte |= shadow_me_mask;
134 spte |= (u64)pfn << PAGE_SHIFT;
137 spte |= PT_WRITABLE_MASK | SPTE_MMU_WRITEABLE;
140 * Optimization: for pte sync, if spte was writable the hash
153 spte &= ~(PT_WRITABLE_MASK | SPTE_MMU_WRITEABLE);
158 spte |= spte_shadow_dirty_mask(spte);
161 spte = mark_spte_for_access_track(spte);
164 *new_spte = spte;
170 u64 spte;
172 spte = __pa(child_pt) | shadow_present_mask | PT_WRITABLE_MASK |
176 spte |= SPTE_AD_DISABLED_MASK;
178 spte |= shadow_accessed_mask;
180 return spte;
217 u64 mark_spte_for_access_track(u64 spte)
219 if (spte_ad_enabled(spte))
220 return spte & ~shadow_accessed_mask;
222 if (is_access_track_spte(spte))
223 return spte;
230 WARN_ONCE((spte & PT_WRITABLE_MASK) &&
231 !spte_can_locklessly_be_made_writable(spte),
234 WARN_ONCE(spte & (SHADOW_ACC_TRACK_SAVED_BITS_MASK <<
238 spte |= (spte & SHADOW_ACC_TRACK_SAVED_BITS_MASK) <<
240 spte &= ~shadow_acc_track_mask;
242 return spte;