Lines Matching defs:direct

646 	return tdp_mmu_enabled && vcpu->arch.mmu->root_role.direct;
726 if (!sp->role.direct)
744 * For direct MMUs (e.g. TDP or non-paging guests) or passthrough SPs,
748 * For direct SPs in indirect MMUs (shadow paging), i.e. when KVM
768 sp->role.passthrough ? "passthrough" : "direct",
773 sp->role.passthrough ? "passthrough" : "direct",
1738 if (!sp->role.direct)
1893 if (sp->role.direct)
1938 if (WARN_ON_ONCE(sp->role.direct || !vcpu->arch.mmu->sync_spte ||
2143 * unsync, thus @vcpu can be NULL if @role.direct is true.
2179 if (sp->role.direct)
2240 if (!role.direct)
2265 /* Note, @vcpu may be NULL if @role.direct is true; see kvm_mmu_find_shadow_page. */
2301 static union kvm_mmu_page_role kvm_mmu_child_role(u64 *sptep, bool direct,
2310 role.direct = direct;
2349 bool direct, unsigned int access)
2356 role = kvm_mmu_child_role(sptep, direct, access);
2370 !vcpu->arch.mmu->root_role.direct)
2446 * The non-direct sub-pagetable must be updated before linking. For
2449 * so sp->unsync can be true or false. For higher level non-direct
2471 * For the direct sp, if the guest pte's dirty bit
2774 if (vcpu->arch.mmu->root_role.direct)
3005 WARN_ON_ONCE(!sp->role.direct);
3340 * mechanism only supports direct MMUs.
3471 * direct MMUs, nested MMUs are always indirect, and KVM always
3513 * Currently, fast page fault only works for direct mapping
3652 WARN_ON_ONCE(role.direct && role.has_4_byte_gpte);
3700 /* root.pgd is ignored for direct MMUs. */
3862 * directory. Othwerise each PAE page direct shadows one guest
3900 if (mmu->root_role.direct ||
3998 if (vcpu->arch.mmu->root_role.direct)
4056 static bool mmio_info_in_cache(struct kvm_vcpu *vcpu, u64 addr, bool direct)
4065 if (direct)
4146 static int handle_mmio_page_fault(struct kvm_vcpu *vcpu, u64 addr, bool direct)
4151 if (mmio_info_in_cache(vcpu, addr, direct))
4165 if (direct)
4228 arch.direct_map = vcpu->arch.mmu->root_role.direct;
4239 if ((vcpu->arch.mmu->root_role.direct != work->arch.direct_map) ||
4247 if (!vcpu->arch.mmu->root_role.direct &&
4530 if (!role.direct && pgd != root->pgd)
4653 * If this is a direct root page, it doesn't have a write flooding
4656 if (!new_role.direct) {
4894 * the direct page table on host, use as much mmu features as
5121 role.base.direct = 1;
5191 role.direct = true;
5286 WARN_ON_ONCE(cpu_role.base.direct);
5312 role.base.direct = false;
5458 r = mmu_topup_memory_caches(vcpu, !vcpu->arch.mmu->root_role.direct);
5464 if (vcpu->arch.mmu->root_role.direct)
5700 bool direct = vcpu->arch.mmu->root_role.direct;
5718 r = handle_mmio_page_fault(vcpu, cr2_or_gpa, direct);
5743 if (vcpu->arch.mmu->root_role.direct &&
5760 if (!mmio_info_in_cache(vcpu, cr2_or_gpa, direct) && !is_guest_mode(vcpu))
6353 * Note, huge page splitting always uses direct shadow pages, regardless
6354 * of whether the huge page itself is mapped by a direct or indirect
6358 role = kvm_mmu_child_role(huge_sptep, /*direct=*/true, access);
6364 /* Safe to pass NULL for vCPU since requesting a direct SP. */
6391 * gfn-to-pfn translation since the SP is direct, so no need to
6588 if (sp->role.direct &&
7048 WARN_ON_ONCE(!sp->role.direct);