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
_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm