[PATCH v3 0/3] arm64: sdei: fix entry edge cases, pseudo-NMI

From: Ada Couprie Diaz

Date: Mon Nov 23 2026 - 12:16:10 EST


Hi,

This v3 has a few small fixes and commit message clarifications.
More details in the [v1] cover.

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 on non-boot hotplugged CPU
might end up with `current == NULL`

I spent most of my time digging into the details of boot and
CPU bringup so I still do not have an SDEI test setup, so any testing
especially with `CONFIG_ARM64_PSEUDO_NMI=y` and
`irqchip.gicv3_pseudo_nmi=1` would be appreciated !

After some discussion and digging in the code, it looks like the issue
patch 3 fixes should be incredibly rare, so we might be OK without pulling
this patch at all. (Though the comment change for `__entry_task`
remains a relevant clarification.)

Thanks in advance
Ada

Changes in v3:
- Clean up comment that an SDEI interrupt during KVM world switch
would always hyp panic as patch 1 should avoid it (Kiryl)
- Reword the commit message to detail the specifics in which the SDEI
handler might get a NULL `__entry_task`
Changes in [v2] (patch 2 only):
- Properly use pt_regs to save/restore the PMR in `__sdei_handler()`
(Vladimir)
- Update commit message accordingly

[0]: https://lore.kernel.org/r/20261105120835.3321912-1-kirill@xxxxxxxxxxxxx
[v2]: https://lore.kernel.org/r/20261118154233.83599-1-ada.coupriediaz@xxxxxxx
[v1]: https://lore.kernel.org/r/20261117174814.95936-1-ada.coupriediaz@xxxxxxx

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 | 38 +++++++++++++++++++++++---------
arch/arm64/kernel/head.S | 3 +++
arch/arm64/kernel/process.c | 3 ---
arch/arm64/kernel/sdei.c | 3 ---
4 files changed, 30 insertions(+), 17 deletions(-)


base-commit: b6a9fa34ce4187cb69d3c588a4bbffc31ce5db8f
--
2.43.0