Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] arm64: sdei: fix entry edge cases, pseudo-NMI
@ 2026-11-17 17:48 Ada Couprie Diaz
  2026-11-17 17:48 ` [PATCH 1/3] arm64: entry: sdei: always set VBAR_EL1 on SDEI entry Ada Couprie Diaz
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Ada Couprie Diaz @ 2026-11-17 17:48 UTC (permalink / raw)
  To: linux-arm-kernel, Will Deacon, Mark Rutland, Catalin Marinas
  Cc: Kiryl Shutsemau, Thomas Huth, Vladimir Murzin, Peter Zijlstra,
	Marc Zyngier, Jinjie Ruan, kernel-team, Doug Anderson,
	linux-kernel, mrigendrachaubey, Breno Leitao, Linus Walleij,
	Dawei Li

Hi,

As discussed in [0], SDEI entry has a number of remaining issues.
This small series aims to fix the biggest potential issues :
 - Patch 1 : with KVM in VHE, VBAR_EL1 might not be correct
 - Patch 2 : PMR was not handled at all when using pseudo-NMI
 - Patch 3 : very early SDEI interrupt might end up with `current == NULL`

I have booted the patches, but I don't have an SDEI test setup yet,
so I would really appreciate real-world testing that nothing breaks while
I set up something, /especially/ with `CONFIG_ARM64_PSEUDO_NMI=y` and
`irqchip.gicv3_pseudo_nmi=1` given the new PMR handling !


Contrary to what I said in [0], patch 1 and 2 fix things in C rather than
in entry.S. SDEI is already a special case and very edge-case-y, so
as we cannot really hope to share code with the regular entry path,
we might as well handle the edge cases that we can in C.

I think everything should be easily backportable if needed, though patch 3
depends on commit 3d8c1a013d78 ("arm64: smp: initialize cpu offset
earlier") which I don't think is in the 5.10 tree.


There are a couple of possible un-addressed issues still:
 - SWPAN is not handled on SDEI entry, but users of both SDEI and SWPAN
   are quite unlikely. Given that SDEI can interrupt anything at any time,
   and SWPAN is already very fiddly because of non-atomic register
   accesses, we might disallow the combination if it causes issues ;
 - Pointer Authentication is not handled either, but is not covered here as
   it does not present an immediate functionnal issue.


Thanks in advance
Ada

Based on v7.4-rc3
[0]: https://lore.kernel.org/r/20261105120835.3321912-1-kirill@shutemov.name 

Ada Couprie Diaz (3):
  arm64: entry: sdei: always set VBAR_EL1 on SDEI entry
  arm64: entry: sdei: save and restore PMR for pseudo-NMI
  arm64: head: set __entry_task along with task setup

 arch/arm64/kernel/entry-common.c | 40 ++++++++++++++++++++++----------
 arch/arm64/kernel/head.S         |  3 +++
 arch/arm64/kernel/process.c      |  3 ---
 3 files changed, 31 insertions(+), 15 deletions(-)


base-commit: aebb7274476403040d582c61478df8f4a7bf9cd3
-- 
2.43.0



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-11-18 15:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-17 17:48 [PATCH 0/3] arm64: sdei: fix entry edge cases, pseudo-NMI Ada Couprie Diaz
2026-11-17 17:48 ` [PATCH 1/3] arm64: entry: sdei: always set VBAR_EL1 on SDEI entry Ada Couprie Diaz
2026-11-17 17:48 ` [PATCH 2/3] arm64: entry: sdei: save and restore PMR for pseudo-NMI Ada Couprie Diaz
2026-11-18  9:58   ` Vladimir Murzin
2026-11-18 15:43     ` Ada Couprie Diaz
2026-11-18 15:42   ` [PATCH v2 " Ada Couprie Diaz
2026-11-17 17:48 ` [PATCH 3/3] arm64: head: set __entry_task along with task setup Ada Couprie Diaz
2026-11-18 11:01   ` Vladimir Murzin
2026-11-18 15:30     ` Ada Couprie Diaz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox