* [PATCH] Fix "[v3, 10/32] powerpc/64s/exception: move real->virt switch into the common handler"
@ 2020-03-30 12:31 Nicholas Piggin
0 siblings, 0 replies; only message in thread
From: Nicholas Piggin @ 2020-03-30 12:31 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Nicholas Piggin
It's possible for interrupts to be replayed when TM is enabled and
suspended, for example rt_sigreturn, where the mtmsrd MSR_KERNEL in
the real-mode entry point to the common handler causes a TM Bad Thing
exception (due to attempting to clear suspended).
The fix for this is to have replay interrupts go to the _virt entry
point and skip the mtmsrd, which matches what happens before this
patch.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
arch/powerpc/kernel/exceptions-64s.S | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
index 112cdb446e03..42fced32c8af 100644
--- a/arch/powerpc/kernel/exceptions-64s.S
+++ b/arch/powerpc/kernel/exceptions-64s.S
@@ -2757,12 +2757,12 @@ handle_dabr_fault:
h_doorbell_common_msgclr:
LOAD_REG_IMMEDIATE(r3, PPC_DBELL_MSGTYPE << (63-36))
PPC_MSGCLR(3)
- b h_doorbell_common
+ b h_doorbell_common_virt
doorbell_super_common_msgclr:
LOAD_REG_IMMEDIATE(r3, PPC_DBELL_MSGTYPE << (63-36))
PPC_MSGCLRP(3)
- b doorbell_super_common
+ b doorbell_super_common_virt
/*
* Called from arch_local_irq_enable when an interrupt needs
@@ -2788,20 +2788,20 @@ _GLOBAL(__replay_interrupt)
mfcr r9
ori r12,r12,MSR_EE
cmpwi r3,0x900
- beq decrementer_common
+ beq decrementer_common_virt
cmpwi r3,0x500
BEGIN_FTR_SECTION
- beq h_virt_irq_common
+ beq h_virt_irq_common_virt
FTR_SECTION_ELSE
- beq hardware_interrupt_common
+ beq hardware_interrupt_common_virt
ALT_FTR_SECTION_END_IFSET(CPU_FTR_HVMODE | CPU_FTR_ARCH_300)
cmpwi r3,0xf00
- beq performance_monitor_common
+ beq performance_monitor_common_virt
BEGIN_FTR_SECTION
cmpwi r3,0xa00
beq h_doorbell_common_msgclr
cmpwi r3,0xe60
- beq hmi_exception_common
+ beq hmi_exception_common_virt
FTR_SECTION_ELSE
cmpwi r3,0xa00
beq doorbell_super_common_msgclr
--
2.23.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-03-30 12:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-30 12:31 [PATCH] Fix "[v3, 10/32] powerpc/64s/exception: move real->virt switch into the common handler" Nicholas Piggin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.