Re: [PATCH v4 1/5] RISC-V: KVM: Add the split page cache for ioctl context

<[email protected]> Fri, 31 Jul 2026 14:11:30 +0800 (CST)
Newsgroups org.infradead.lists.kvm-riscv,org.infradead.lists.linux-riscv,org.kernel.vger.kvm,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
> > @@ -54,6 +54,12 @@ void kvm_arch_destroy_vm(struct kvm *kvm)
> >         kvm_destroy_vcpus(kvm);
> >
> >         kvm_riscv_aia_destroy_vm(kvm);
> > +
> > +       /*
> > +        * Free the split page cache after all vCPUs and devices are destroyed.
> > +        * At this point, there are no concurrent accesses to the cache.
> > +        */
> > +       kvm_mmu_free_memory_cache(&kvm->arch.pgd_split_page_cache);
>
> Better to do this in kvm_riscv_mmu_free_pgd()
> 
> Regards,
> Anup

Thanks for the review. I'll move it back to kvm_riscv_mmu_free_pgd() in v5 version.

Regards,
Yechao

-- 
kvm-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kvm-riscv