KVM: x86/mmu: remove extended bits from mmu_role, rename field
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 14 Feb 2022 13:46:24 +0000 (08:46 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 29 Apr 2022 16:49:56 +0000 (12:49 -0400)
commit7a458f0e1ba150a6ea012171a43c4b947f1d825d
treed3c3bb4a32acd42ff8e080a45cd7e1fc88ddc644
parent362505deb8e2ce27993a1dee0b3c5755d4d6646e
KVM: x86/mmu: remove extended bits from mmu_role, rename field

mmu_role represents the role of the root of the page tables.
It does not need any extended bits, as those govern only KVM's
page table walking; the is_* functions used for page table
walking always use the CPU role.

ext.valid is not present anymore in the MMU role, but an
all-zero MMU role is impossible because the level field is
never zero in the MMU role.  So just zap the whole mmu_role
in order to force invalidation after CPUID is updated.

While making this change, which requires touching almost every
occurrence of "mmu_role", rename it to "root_role".

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/mmu/mmu.c
arch/x86/kvm/mmu/paging_tmpl.h
arch/x86/kvm/mmu/tdp_mmu.c