mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ada Couprie Diaz <ada.coupriediaz@arm.com>
To: linux-arm-kernel@lists.infradead.org
Cc: Will Deacon <will@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Vladimir Murzin <vladimir.murzin@arm.com>,
	James Morse <james.morse@arm.com>,
	Usama Arif <usama.arif@linux.dev>, Marc Zyngier <maz@kernel.org>,
	Kiryl Shutsemau <kas@kernel.org>,
	Breno Leitao <leitao@debian.org>,
	Jinjie Ruan <ruanjinjie@huawei.com>,
	Doug Anderson <dianders@chromium.org>,
	Linus Walleij <linusw@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Thomas Huth <thuth@redhat.com>, Dawei Li <dawei.li@linux.dev>,
	mrigendrachaubey <mrigendra.chaubey@gmail.com>,
	kernel-team@meta.com, linux-kernel@vger.kernel.org,
	Ada Couprie Diaz <ada.coupriediaz@arm.com>
Subject: [PATCH v3 0/3] arm64: sdei: fix entry edge cases, pseudo-NMI
Date: Mon, 23 Nov 2026 17:15:54 +0000	[thread overview]
Message-ID: <20261123171557.140944-1-ada.coupriediaz@arm.com> (raw)

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


             reply	other threads:[~2026-11-23 17:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23 17:15 Ada Couprie Diaz [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261123171557.140944-1-ada.coupriediaz@arm.com \
    --to=ada.coupriediaz@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=dawei.li@linux.dev \
    --cc=dianders@chromium.org \
    --cc=james.morse@arm.com \
    --cc=kas@kernel.org \
    --cc=kernel-team@meta.com \
    --cc=leitao@debian.org \
    --cc=linusw@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=maz@kernel.org \
    --cc=mrigendra.chaubey@gmail.com \
    --cc=peterz@infradead.org \
    --cc=ruanjinjie@huawei.com \
    --cc=thuth@redhat.com \
    --cc=usama.arif@linux.dev \
    --cc=vladimir.murzin@arm.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®