[PATCH v6 03/22] KVM: x86/mmu: Stop passing @direct to mmu_alloc_root()
Paolo Bonzini
pbonzini at redhat.com
Wed Jun 22 07:06:31 PDT 2022
On 6/16/22 20:47, Sean Christopherson wrote:
>> The argument @direct is vcpu->arch.mmu->root_role.direct, so just use
>> that.
> It's worth calling out that, unlike non-root page tables, it's impossible to have
> a direct root in an indirect MMU. I.e. provide a hint as to why there's a need to
> pass @direct in the first place.
>
I suppose there's *no* need to pass direct? Also, there's the trivial
(but less interesting) justification that kvm_mmu_load does
if (vcpu->arch.mmu->root_role.direct)
r = mmu_alloc_direct_roots(vcpu);
else
r = mmu_alloc_shadow_roots(vcpu);
and those are the only callers of mmu_alloc_root.
Paolo
More information about the kvm-riscv
mailing list