Skip to contentSkip to conversation

Patch "powerpc/kexec: Fix kexec/kdump in P9 guest kernels" has been added to the 4.14-stable tree

PATCH [email protected] 1 participant 1 message Dec 4, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

powerpc/kexec: Fix kexec/kdump in P9 guest kernels

to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
powerpc-kexec-fix-kexec-kdump-in-p9-guest-kernels.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 2621e945fbf1d6df5f3f0ba7be5bae3d2cf9b6a5 Mon Sep 17 00:00:00 2001

From: Michael Ellerman <[email protected]>
Date: Fri, 24 Nov 2017 14:51:02 +1100
Subject: powerpc/kexec: Fix kexec/kdump in P9 guest kernels

From: Michael Ellerman <[email protected]>

commit 2621e945fbf1d6df5f3f0ba7be5bae3d2cf9b6a5 upstream.

The code that cleans up the IAMR/AMOR before kexec'ing failed to remember that when we're running as a guest AMOR is not writable, it's hypervisor privileged.

They symptom is that the kexec stops before entering purgatory and nothing else is seen on the console. If you examine the state of the system all threads will be in the 0x700 program check handler.

Fix it by making the write to AMOR dependent on HV mode.

---
 arch/powerpc/kernel/misc_64.S |    2 ++
 1 file changed, 2 insertions(+)
arch/powerpc/kernel/misc_64.S +2 -0
@@ -623,7 +623,9 @@ BEGIN_FTR_SECTION
 	 * NOTE, we rely on r0 being 0 from above.
 	 */
 	mtspr	SPRN_IAMR,r0
+BEGIN_FTR_SECTION_NESTED(42)
 	mtspr	SPRN_AMOR,r0
+END_FTR_SECTION_NESTED_IFSET(CPU_FTR_HVMODE, 42)
 END_FTR_SECTION_IFSET(CPU_FTR_ARCH_300)
 
 	/* save regs for local vars on new stack.

Patches currently in stable-queue which might be from [email protected] are

queue-4.14/powerpc-powernv-fix-kexec-crashes-caused-by-tlbie-tracing.patch queue-4.14/powerpc-kexec-fix-kexec-kdump-in-p9-guest-kernels.patch queue-4.14/cxl-check-if-vphb-exists-before-iterating-over-afu-devices.patch