On Sun, May 06, 2018 at 05:37:26PM +1000, Nicholas Piggin wrote: > Signed-off-by: Nicholas Piggin <npiggin@xxxxxxxxx> Patch looks OK, minor nis below... > --- > arch/powerpc/kvm/book3s_64_mmu_radix.c | 32 +++++++++++++++++++------- > 1 file changed, 24 insertions(+), 8 deletions(-) > > diff --git a/arch/powerpc/kvm/book3s_64_mmu_radix.c b/arch/powerpc/kvm/book3s_64_mmu_radix.c > index da507b41fdd3..c6402032dcc8 100644 > --- a/arch/powerpc/kvm/book3s_64_mmu_radix.c > +++ b/arch/powerpc/kvm/book3s_64_mmu_radix.c > @@ -334,6 +334,26 @@ void kvmppc_free_radix(struct kvm *kvm) > kvm->arch.pgtable = NULL; > } > > +static void kvmppc_unmap_free_pmd_entry_table(struct kvm *kvm, pmd_t *pmd, > + unsigned long gpa) > +{ > + pte_t *pte = pte_offset_kernel(pmd, 0); > + > + kvmppc_unmap_free_pte(kvm, pte, false); > + pmd_clear(pmd); > + kvmppc_radix_flush_pwc(kvm, gpa); > +} > + > +static void kvmppc_unmap_free_pud_entry_table(struct kvm *kvm, pud_t *pud, > + unsigned long gpa) > +{ > + pmd_t *pmd = pmd_offset(pud, 0); > + > + kvmppc_unmap_free_pmd(kvm, pmd, false); > + pud_clear(pud); > + kvmppc_radix_flush_pwc(kvm, gpa); > +} > + > static int kvmppc_create_pte(struct kvm *kvm, pte_t pte, unsigned long gpa, > unsigned int level, unsigned long mmu_seq) > { > @@ -399,11 +419,9 @@ static int kvmppc_create_pte(struct kvm *kvm, pte_t pte, unsigned long gpa, > /* > * There's a page table page here, but we wanted to > * install a large page, so remove and free the page > - * table page. new_pmd will be NULL since level == 2. > + * table page. The change to this comment and the similar one about new_ptep belong in the previous patch. Paul. -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html