KVM: x86/mmu: Add accessors to query mmu_role bits
authorSean Christopherson <seanjc@google.com>
Tue, 22 Jun 2021 17:57:10 +0000 (10:57 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 24 Jun 2021 22:00:41 +0000 (18:00 -0400)
commit6066772455f21ce1e90f003243c9864091621773
tree978e5125f483f257722e5ef3385d96c2aad5862c
parent167f8a5cae99fb2050d3d674ca84457a526e23dd
KVM: x86/mmu: Add accessors to query mmu_role bits

Add accessors via a builder macro for all mmu_role bits that track a CR0,
CR4, or EFER bit, abstracting whether the bits are in the base or the
extended role.

Future commits will switch to using mmu_role instead of vCPU state to
configure the MMU, i.e. there are about to be a large number of users.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210622175739.3610207-26-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c
arch/x86/kvm/mmu/paging_tmpl.h