[PATCH 03/14] powerpc/64s: allocate lppacas individually

Michael Ellerman mpe at ellerman.id.au
Tue Mar 13 23:41:46 AEDT 2018


Nicholas Piggin <npiggin at gmail.com> writes:

> diff --git a/arch/powerpc/platforms/pseries/kexec.c b/arch/powerpc/platforms/pseries/kexec.c
> index eeb13429d685..3fe126796975 100644
> --- a/arch/powerpc/platforms/pseries/kexec.c
> +++ b/arch/powerpc/platforms/pseries/kexec.c
> @@ -23,7 +23,12 @@
>  
>  void pseries_kexec_cpu_down(int crash_shutdown, int secondary)
>  {
> -	/* Don't risk a hypervisor call if we're crashing */
> +	/*
> +	 * Don't risk a hypervisor call if we're crashing
> +	 * XXX: Why? The hypervisor is not crashing. It might be better
> +	 * to at least attempt unregister to avoid the hypervisor stepping
> +	 * on our memory.
> +	 */

Because every extra line of code we run in the crashed kernel is another
opportunity to screw up and not make it into the kdump kernel.

For example the hcalls we do to unregister the VPA might trigger hcall
tracing which runs a bunch of code and might trip up on something. We
could modify those hcalls to not be traced, but then we can't trace them
in normal operation.

And the hypervisor might continue to write to the VPA, but that's OK
because it's the VPA of the crashing kernel, the kdump kernel runs in a
separate reserved memory region.

Possibly we could fix the hcall tracing issues etc, but this code has
not given us any problems for quite a while (~13 years) - ie. there
seems to be no issue with re-registering the VPAs etc. in the kdump
kernel.

cheers


More information about the Linuxppc-dev mailing list