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

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@shutemov.name
[v2]: https://lore.kernel.org/r/20261118154233.83599-1-ada.coupriediaz@arm.com
[v1]: https://lore.kernel.org/r/20261117174814.95936-1-ada.coupriediaz@arm.com

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


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

end of thread, other threads:[~2026-11-23 17:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23 17:15 [PATCH v3 0/3] arm64: sdei: fix entry edge cases, pseudo-NMI Ada Couprie Diaz
2026-11-23 17:15 ` [PATCH v3 1/3] arm64: entry: sdei: always set VBAR_EL1 on SDEI entry Ada Couprie Diaz
2026-11-23 17:15 ` [PATCH v3 2/3] arm64: entry: sdei: save and restore PMR for pseudo-NMI Ada Couprie Diaz
2026-11-23 17:15 ` [PATCH v3 3/3] arm64: head: set __entry_task along with task setup 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

all inboxes | Powered by JetHome®