mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 13:14:02 +02:00
KVM: x86/mmu: cleanup functions that initialize shadow MMU
Now that the GVA->GPA page walker is initialized independently, init_kvm_softmmu() does not do anything more than calling kvm_init_shadow_mmu() so eliminate it from the call chain. At the same time, rename kvm_init_shadow_mmu() to init_kvm_shadow_mmu() for consistency with init_kvm_tdp_mmu(). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
148fe965df
commit
7ccb75f2bf
|
|
@ -5990,7 +5990,7 @@ static void shadow_mmu_init_context(struct kvm_vcpu *vcpu, struct kvm_mmu *conte
|
|||
reset_shadow_zero_bits_mask(vcpu, context);
|
||||
}
|
||||
|
||||
static void kvm_init_shadow_mmu(struct kvm_vcpu *vcpu,
|
||||
static void init_kvm_shadow_mmu(struct kvm_vcpu *vcpu,
|
||||
union kvm_cpu_role cpu_role)
|
||||
{
|
||||
struct kvm_mmu *context = &vcpu->arch.root_mmu;
|
||||
|
|
@ -6122,12 +6122,6 @@ void kvm_init_shadow_ept_mmu(struct kvm_vcpu *vcpu, bool execonly,
|
|||
}
|
||||
EXPORT_SYMBOL_FOR_KVM_INTERNAL(kvm_init_shadow_ept_mmu);
|
||||
|
||||
static void init_kvm_softmmu(struct kvm_vcpu *vcpu,
|
||||
union kvm_cpu_role cpu_role)
|
||||
{
|
||||
kvm_init_shadow_mmu(vcpu, cpu_role);
|
||||
}
|
||||
|
||||
void kvm_init_mmu(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
struct kvm_mmu_role_regs regs = vcpu_to_role_regs(vcpu);
|
||||
|
|
@ -6139,7 +6133,7 @@ void kvm_init_mmu(struct kvm_vcpu *vcpu)
|
|||
if (tdp_enabled)
|
||||
init_kvm_tdp_mmu(vcpu, cpu_role);
|
||||
else
|
||||
init_kvm_softmmu(vcpu, cpu_role);
|
||||
init_kvm_shadow_mmu(vcpu, cpu_role);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_FOR_KVM_INTERNAL(kvm_init_mmu);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user