[PATCH v2 10/26] KVM: x86/mmu: Use common code to free kvm_mmu_page structs

Peter Xu peterx at redhat.com
Tue Mar 15 03:22:46 PDT 2022


On Fri, Mar 11, 2022 at 12:25:12AM +0000, David Matlack wrote:
>  static void tdp_mmu_free_sp(struct kvm_mmu_page *sp)
>  {
> -	free_page((unsigned long)sp->spt);
> -	kmem_cache_free(mmu_page_header_cache, sp);
> +	kvm_mmu_free_shadow_page(sp);
>  }

Perhaps tdp_mmu_free_sp() can be dropped altogether with this?

Reviewed-by: Peter Xu <peterx at redhat.com>

-- 
Peter Xu




More information about the kvm-riscv mailing list