Commit ec761cfd authored by Sean Christopherson's avatar Sean Christopherson Committed by Paolo Bonzini

KVM: x86/mmu: Move initial kvm_mmu_set_mask_ptes() call into MMU proper

Move kvm_mmu_set_mask_ptes() into mmu.c as prep for future cleanup of the
mask initialization code.

No functional change intended.
Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
Message-Id: <20210225204749.1512652-16-seanjc@google.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent c4827eab
...@@ -5840,6 +5840,10 @@ int kvm_mmu_module_init(void) ...@@ -5840,6 +5840,10 @@ int kvm_mmu_module_init(void)
kvm_set_mmio_spte_mask(); kvm_set_mmio_spte_mask();
kvm_mmu_set_mask_ptes(PT_USER_MASK, PT_ACCESSED_MASK,
PT_DIRTY_MASK, PT64_NX_MASK, 0,
PT_PRESENT_MASK, 0, sme_me_mask);
pte_list_desc_cache = kmem_cache_create("pte_list_desc", pte_list_desc_cache = kmem_cache_create("pte_list_desc",
sizeof(struct pte_list_desc), sizeof(struct pte_list_desc),
0, SLAB_ACCOUNT, NULL); 0, SLAB_ACCOUNT, NULL);
......
...@@ -8041,9 +8041,6 @@ int kvm_arch_init(void *opaque) ...@@ -8041,9 +8041,6 @@ int kvm_arch_init(void *opaque)
if (r) if (r)
goto out_free_percpu; goto out_free_percpu;
kvm_mmu_set_mask_ptes(PT_USER_MASK, PT_ACCESSED_MASK,
PT_DIRTY_MASK, PT64_NX_MASK, 0,
PT_PRESENT_MASK, 0, sme_me_mask);
kvm_timer_init(); kvm_timer_init();
perf_register_guest_info_callbacks(&kvm_guest_cbs); perf_register_guest_info_callbacks(&kvm_guest_cbs);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment