[PATCH 0/3] arm64: sdei: fix entry edge cases, pseudo-NMI
From: Ada Couprie Diaz
Date: Tue Nov 17 2026 - 12:48:28 EST
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@xxxxxxxxxxxxx
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