]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/mmu: pull computation of kvm_mmu_role_regs to kvm_init_mmu
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 10 Feb 2022 12:30:31 +0000 (07:30 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 29 Apr 2022 16:49:17 +0000 (12:49 -0400)
commit3b89cb719f89ad36050f08da8a814b50cc123cf0
tree198eaf1a553d7ce15712a2b59b8d2ef19aa99c26
parentde23e7cf5a12c31021cadada337c757e9c9cfa94
KVM: x86/mmu: pull computation of kvm_mmu_role_regs to kvm_init_mmu

The init_kvm_*mmu functions, with the exception of shadow NPT,
do not need to know the full values of CR0/CR4/EFER; they only
need to know the bits that make up the "role".  This cleanup
however will take quite a few incremental steps.  As a start,
pull the common computation of the struct kvm_mmu_role_regs
into their caller: all of them extract the struct from the vcpu
as the very first step.

Reviewed-by: David Matlack <dmatlack@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c