[PATCH] powerpc/64s: Fix KVM interrupt using wrong save area

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE2237d LANDED: 1 (0M)

1 review trailer; landed in mainline as 0bdcfa182506 on 2020-06-16.

2 messages, 2 authors, 2020-06-18 · open the first message on its own page

[PATCH] powerpc/64s: Fix KVM interrupt using wrong save area

From: Nicholas Piggin <npiggin@gmail.com>
Date: 2020-06-15 06:14:43

The CTR register reload in the KVM interrupt path used the wrong save
area for SLB (and NMI) interrupts.

Fixes: 9600f261acaaa ("powerpc/64s/exception: Move KVM test to common code")
Reported-by: Christian Zigotzky <redacted>
Tested-by: Christian Zigotzky <redacted>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 arch/powerpc/kernel/exceptions-64s.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
index e70ebb5c318c..fa080694e581 100644
--- a/arch/powerpc/kernel/exceptions-64s.S
+++ b/arch/powerpc/kernel/exceptions-64s.S
@@ -270,7 +270,7 @@ BEGIN_FTR_SECTION
 END_FTR_SECTION_IFSET(CPU_FTR_CFAR)
 	.endif
 
-	ld	r10,PACA_EXGEN+EX_CTR(r13)
+	ld	r10,IAREA+EX_CTR(r13)
 	mtctr	r10
 BEGIN_FTR_SECTION
 	ld	r10,IAREA+EX_PPR(r13)
@@ -298,7 +298,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_HAS_PPR)
 
 	.if IKVM_SKIP
 89:	mtocrf	0x80,r9
-	ld	r10,PACA_EXGEN+EX_CTR(r13)
+	ld	r10,IAREA+EX_CTR(r13)
 	mtctr	r10
 	ld	r9,IAREA+EX_R9(r13)
 	ld	r10,IAREA+EX_R10(r13)
-- 
2.23.0

Re: [PATCH] powerpc/64s: Fix KVM interrupt using wrong save area

From: Michael Ellerman <hidden>
Date: 2020-06-18 12:49:56

On Mon, 15 Jun 2020 16:12:47 +1000, Nicholas Piggin wrote:
The CTR register reload in the KVM interrupt path used the wrong save
area for SLB (and NMI) interrupts.
Applied to powerpc/fixes.

[1/1] powerpc/64s: Fix KVM interrupt using wrong save area
      https://git.kernel.org/powerpc/c/0bdcfa182506526fbe4e088ff9ca86a31b81828d

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help