Re: [PATCH 00/23] KVM: MMU: MMU role refactoring

From: Paolo Bonzini
Date: Thu Feb 10 2022 - 06:59:04 EST


On 2/10/22 02:11, Sean Christopherson wrote:
In a vacuum, I 100% agree that guest_role is better than cpu_role or vcpu_role,
but the term "guest" has already been claimed for "L2" in far too many places.

While we're behind the bikeshed... the resulting:

union kvm_mmu_role cpu_role;
union kvm_mmu_page_role mmu_role;

is a mess. Again, I really like "mmu_role" in a vacuum, but juxtaposed with

union kvm_mmu_role cpu_role;

it's super confusing, e.g. I expected

union kvm_mmu_role mmu_role;

What about

union kvm_mmu_page_role root_role;
union kvm_mmu_paging_mode cpu_mode;

? I already have to remove ".base" from all accesses to mmu_role, so it's not much extra churn.

Paolo