Lines Matching refs:gpte

100 static gfn_t gpte_to_gfn_lvl(pt_element_t gpte, int lvl)
102 return (gpte & PT_LVL_ADDR_MASK(lvl)) >> PAGE_SHIFT;
106 unsigned gpte)
118 mask |= (gpte >> (PT_GUEST_DIRTY_SHIFT - PT_WRITABLE_SHIFT)) &
132 static bool FNAME(is_bad_mt_xwr)(struct rsvd_bits_validate *rsvd_check, u64 gpte)
137 return __is_bad_mt_xwr(rsvd_check, gpte);
141 static bool FNAME(is_rsvd_bits_set)(struct kvm_mmu *mmu, u64 gpte, int level)
143 return __is_rsvd_bits_set(&mmu->guest_rsvd_check, gpte, level) ||
144 FNAME(is_bad_mt_xwr)(&mmu->guest_rsvd_check, gpte);
188 u64 gpte)
190 if (!FNAME(is_present_gpte)(gpte))
193 /* if accessed bit is not supported prefetch non accessed gpte */
195 !(gpte & PT_GUEST_ACCESSED_MASK))
198 if (FNAME(is_rsvd_bits_set)(vcpu->arch.mmu, gpte, PG_LEVEL_4K))
214 static inline unsigned FNAME(gpte_access)(u64 gpte)
218 access = ((gpte & VMX_EPT_WRITABLE_MASK) ? ACC_WRITE_MASK : 0) |
219 ((gpte & VMX_EPT_EXECUTABLE_MASK) ? ACC_EXEC_MASK : 0) |
220 ((gpte & VMX_EPT_READABLE_MASK) ? ACC_USER_MASK : 0);
224 access = gpte & (PT_WRITABLE_MASK | PT_USER_MASK | PT_PRESENT_MASK);
226 access ^= (gpte >> PT64_NX_SHIFT);
294 static inline unsigned FNAME(gpte_pkeys)(struct kvm_vcpu *vcpu, u64 gpte)
298 pte_t pte = {.pte = gpte};
529 u64 *spte, pt_element_t gpte, bool no_dirty_log)
535 if (FNAME(prefetch_invalid_gpte)(vcpu, sp, spte, gpte))
538 pgprintk("%s: gpte %llx spte %p\n", __func__, (u64)gpte, spte);
540 gfn = gpte_to_gfn(gpte);
541 pte_access = sp->role.access & FNAME(gpte_access)(gpte);
542 FNAME(protect_clean_gpte)(vcpu->arch.mmu, &pte_access, gpte);
562 pt_element_t gpte = *(const pt_element_t *)pte;
564 FNAME(prefetch_gpte)(vcpu, sp, spte, gpte, false);
647 * Verify that the top-level gpte is still there. Since the page
675 * Verify that the gpte in the page we've just write
930 pt_element_t gpte;
947 if (kvm_vcpu_read_guest_atomic(vcpu, pte_gpa, &gpte,
951 FNAME(update_pte)(vcpu, sp, sptep, &gpte);
1033 pt_element_t gpte;
1042 if (kvm_vcpu_read_guest_atomic(vcpu, pte_gpa, &gpte,
1046 if (FNAME(prefetch_invalid_gpte)(vcpu, sp, &sp->spt[i], gpte)) {
1057 gfn = gpte_to_gfn(gpte);
1059 pte_access &= FNAME(gpte_access)(gpte);
1060 FNAME(protect_clean_gpte)(vcpu->arch.mmu, &pte_access, gpte);