Lines Matching refs:gpte
96 static inline gfn_t pse36_gfn_delta(u32 gpte) in pse36_gfn_delta() argument
100 return (gpte & PT32_DIR_PSE36_MASK) << shift; in pse36_gfn_delta()
104 static gfn_t gpte_to_gfn_lvl(pt_element_t gpte, int lvl) in gpte_to_gfn_lvl() argument
106 return (gpte & PT_LVL_ADDR_MASK(lvl)) >> PAGE_SHIFT; in gpte_to_gfn_lvl()
110 unsigned gpte) in FNAME()
122 mask |= (gpte >> (PT_GUEST_DIRTY_SHIFT - PT_WRITABLE_SHIFT)) & in FNAME()
136 static bool FNAME(is_bad_mt_xwr)(struct rsvd_bits_validate *rsvd_check, u64 gpte) in FNAME()
141 return __is_bad_mt_xwr(rsvd_check, gpte); in FNAME()
145 static bool FNAME(is_rsvd_bits_set)(struct kvm_mmu *mmu, u64 gpte, int level) in FNAME()
147 return __is_rsvd_bits_set(&mmu->guest_rsvd_check, gpte, level) || in FNAME()
148 FNAME(is_bad_mt_xwr)(&mmu->guest_rsvd_check, gpte); in FNAME()
153 u64 gpte) in FNAME()
155 if (!FNAME(is_present_gpte)(gpte)) in FNAME()
160 !(gpte & PT_GUEST_ACCESSED_MASK)) in FNAME()
163 if (FNAME(is_rsvd_bits_set)(vcpu->arch.mmu, gpte, PG_LEVEL_4K)) in FNAME()
179 static inline unsigned FNAME(gpte_access)(u64 gpte) in FNAME()
183 access = ((gpte & VMX_EPT_WRITABLE_MASK) ? ACC_WRITE_MASK : 0) | in FNAME()
184 ((gpte & VMX_EPT_EXECUTABLE_MASK) ? ACC_EXEC_MASK : 0) | in FNAME()
185 ((gpte & VMX_EPT_READABLE_MASK) ? ACC_USER_MASK : 0); in FNAME()
189 access = gpte & (PT_WRITABLE_MASK | PT_USER_MASK | PT_PRESENT_MASK); in FNAME()
191 access ^= (gpte >> PT64_NX_SHIFT); in FNAME()
259 static inline unsigned FNAME(gpte_pkeys)(struct kvm_vcpu *vcpu, u64 gpte) in FNAME()
263 pte_t pte = {.pte = gpte}; in FNAME()
271 unsigned int level, unsigned int gpte) in FNAME()
288 gpte &= level - (PT32_ROOT_LEVEL + mmu->cpu_role.ext.cr4_pse); in FNAME()
295 gpte |= level - PG_LEVEL_4K - 1; in FNAME()
297 return gpte & PT_PAGE_SIZE_MASK; 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()
534 gfn = gpte_to_gfn(gpte); in FNAME()
535 pte_access = sp->role.access & FNAME(gpte_access)(gpte); in FNAME()
536 FNAME(protect_clean_gpte)(vcpu->arch.mmu, &pte_access, gpte); in FNAME()
929 pt_element_t gpte; in FNAME() local
946 if (kvm_vcpu_read_guest_atomic(vcpu, pte_gpa, &gpte, in FNAME()
950 FNAME(prefetch_gpte)(vcpu, sp, sptep, gpte, false); in FNAME()
1035 pt_element_t gpte; in FNAME() local
1044 if (kvm_vcpu_read_guest_atomic(vcpu, pte_gpa, &gpte, in FNAME()
1048 if (FNAME(prefetch_invalid_gpte)(vcpu, sp, &sp->spt[i], gpte)) { in FNAME()
1053 gfn = gpte_to_gfn(gpte); in FNAME()
1055 pte_access &= FNAME(gpte_access)(gpte); in FNAME()
1056 FNAME(protect_clean_gpte)(vcpu->arch.mmu, &pte_access, gpte); in FNAME()