Lines Matching refs:gpte
77 static gfn_t gpte_to_gfn_lvl(pt_element_t gpte, int lvl)
79 return (gpte & PT_LVL_ADDR_MASK(lvl)) >> PAGE_SHIFT;
101 static unsigned FNAME(gpte_access)(struct kvm_vcpu *vcpu, pt_element_t gpte)
105 access = (gpte & (PT_WRITABLE_MASK | PT_USER_MASK)) | ACC_EXEC_MASK;
108 access &= ~(gpte >> PT64_NX_SHIFT);
267 pt_element_t gpte;
272 gpte = *(const pt_element_t *)pte;
273 if (~gpte & (PT_PRESENT_MASK | PT_ACCESSED_MASK)) {
274 if (!is_present_gpte(gpte)) {
283 pgprintk("%s: gpte %llx spte %p\n", __func__, (u64)gpte, spte);
284 pte_access = sp->role.access & FNAME(gpte_access)(vcpu, gpte);
285 if (gpte_to_gfn(gpte) != vcpu->arch.update_pte.gfn)
298 is_dirty_gpte(gpte), NULL, PT_PAGE_TABLE_LEVEL,
299 gpte_to_gfn(gpte), pfn, true, true);
339 * Verify that the top-level gpte is still there. Since the page
362 * Verify that the gpte in the page we've just write
627 pt_element_t gpte;
636 if (kvm_read_guest_atomic(vcpu->kvm, pte_gpa, &gpte,
640 gfn = gpte_to_gfn(gpte);
641 if (is_rsvd_bits_set(vcpu, gpte, PT_PAGE_TABLE_LEVEL)
642 || gfn != sp->gfns[i] || !is_present_gpte(gpte)
643 || !(gpte & PT_ACCESSED_MASK)) {
646 if (is_present_gpte(gpte) || !clear_unsync)
655 pte_access = sp->role.access & FNAME(gpte_access)(vcpu, gpte);
663 is_dirty_gpte(gpte), PT_PAGE_TABLE_LEVEL, gfn,