Subject: Re: [PATCH 2/5] powerpc/64s/radix: Fix memory hot-unplug page table split

From: "Aneesh Kumar K.V" <[email-masked]>
Date: Wed, 24 Jul 2019 15:25:28 +0530

Nicholas Piggin <[email-masked]> writes:

> create_physical_mapping expects physical addresses, but splitting
> these mapping on hot unplug is supplying virtual (effective)
> addresses.
>
> [I'm not sure how to test this one]
>

Memory hot unplug with kvm?

Reviewed-by: Aneesh Kumar K.V <[email-masked]>

> Cc: Balbir Singh <[email-masked]>
> Fixes: 4dd5f8a99e791 ("powerpc/mm/radix: Split linear mapping on hot-unplug")
> Signed-off-by: Nicholas Piggin <[email-masked]>
> ---
>  arch/powerpc/mm/book3s64/radix_pgtable.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/mm/book3s64/radix_pgtable.c b/arch/powerpc/mm/book3s64/radix_pgtable.c
> index c5cc16ab1954..2204d8eeb784 100644
> --- a/arch/powerpc/mm/book3s64/radix_pgtable.c
> +++ b/arch/powerpc/mm/book3s64/radix_pgtable.c
> @@ -737,8 +737,8 @@ static int __meminit stop_machine_change_mapping(void *data)
>  
>  	spin_unlock(&init_mm.page_table_lock);
>  	pte_clear(&init_mm, params->aligned_start, params->pte);
> -	create_physical_mapping(params->aligned_start, params->start, -1);
> -	create_physical_mapping(params->end, params->aligned_end, -1);
> +	create_physical_mapping(__pa(params->aligned_start), __pa(params->start), -1);
> +	create_physical_mapping(__pa(params->end), __pa(params->aligned_end), -1);
>  	spin_lock(&init_mm.page_table_lock);
>  	return 0;
>  }
> -- 
> 2.22.0