Re: [PATCH v2 23/25] KVM: x86/mmu: replace direct_map with root_role.direct

Sean Christopherson
2022-03-08T19:53:00Z

On Mon, Feb 21, 2022, Paolo Bonzini wrote:
> direct_map is always equal to the direct field of the root page's role:
>
> - for shadow paging, direct_map is true if CR0.PG=0 and root_role.direct is
> copied from cpu_mode.base.direct
>
> - for TDP, it is always true and root_role.direct is also always true
>
> - for shadow EPT, it is always false and root_role.direct is also always

Uber nit, s/EPT/TDP to cover shadow NPT, which at this point we are 100% sure is
indirect ;-)

> false
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Reviewed-by: Sean Christopherson <seanjc@google.com>