linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 0/7] APEI: Move arm64 NMI notifications to use estatus cache
@ 2018-01-22 19:29 James Morse
  2018-01-22 19:29 ` [RFC 1/7] ACPI / APEI: Move the estatus queue code up, and under its own ifdef James Morse
                   ` (7 more replies)
  0 siblings, 8 replies; 10+ messages in thread
From: James Morse @ 2018-01-22 19:29 UTC (permalink / raw)
  To: Dongjiu Geng; +Cc: linux-acpi, huangshaoyu, Tyler Baicar, James Morse

Hi guys, kbuild-robot,

This RFC is rough, and not at all ready. This is the current status of
my attempts to split up the ghes.c code to allow multiple notifications
to be NMI-like. On arm64 we have NOTIFY_{SEA, SEI, SDEI} all of which
have NMI-like behaviour.

This series splits up APEIs in_nmi() path so that more than one
notification can use it. To support the asyncronous notifications: SEI
and SDEI we move all the NMI-like handlers over to the estatus-cache.
This gives us the same APEI behaviour as x86, and means the multiple
notification methods can interact if firmware implements more than one.

estatus.. queue? ghes.c has three things all called 'estatus'. One is
a pool of memory that has a static size, and is grown/shrunk when new
NMI users are allocated. The second is the cache, this holds recent
notifications so it can suppress notifications we've already handled.
The last is the queue, which holds data from NMI notifications (in pool
memory) that can't be handled immediatly.

So far this has only been tested using SDEI.

This RFC makes a know race worse. (I aim to fix the race before dropping
the RFC tag). Xie XiuQi reported that both the arch code and
memory_failure() will signal an affected process, what the process gets
depends on the order these run in, and how the signals get merged.
Using the estatus-cache makes this worse. My intention is for the arch
code's new 'apei_claim_x()' helpers to give any queue that the claimed
RAS event may be stuck in a kick, depending on which irq/preemptible
flags the notification caused to be set.

Your CC list is wrong! Yes, given how ropey this is I want to keep the
noise low, it would only need posting again at rc1.


Comments on the overall approach welcome!


Thanks,

James Morse (7):
  ACPI / APEI: Move the estatus queue code up, and under its own ifdef
  ACPI / APEI: Generalise the estatus queue's add/remove and notify code
  ACPI / APEI: Switch NOTIFY_SEA to use the estatus queue
  KVM: arm/arm64: Add kvm_ras.h to collect kvm specific RAS plumbing
  arm64: KVM/mm: Move SEA handling behind a single 'claim' interface.
  ACPI / APEI: Make the fixmap_idx per-ghes to allow multiple in_nmi()
    users
  ACPI / APEI: Split fixmap pages for arm64 NMI-like notifications

 arch/arm/include/asm/kvm_ras.h       |  14 ++
 arch/arm/include/asm/system_misc.h   |   5 -
 arch/arm64/include/asm/acpi.h        |   2 +
 arch/arm64/include/asm/daifflags.h   |   1 +
 arch/arm64/include/asm/fixmap.h      |   4 +-
 arch/arm64/include/asm/kvm_ras.h     |  23 ++
 arch/arm64/include/asm/system_misc.h |   2 -
 arch/arm64/kernel/acpi.c             |  30 +++
 arch/arm64/mm/fault.c                |  30 +--
 drivers/acpi/apei/ghes.c             | 467 ++++++++++++++++++-----------------
 include/acpi/ghes.h                  |   5 +
 virt/kvm/arm/mmu.c                   |   4 +-
 12 files changed, 327 insertions(+), 260 deletions(-)
 create mode 100644 arch/arm/include/asm/kvm_ras.h
 create mode 100644 arch/arm64/include/asm/kvm_ras.h

-- 
2.15.1


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

end of thread, other threads:[~2018-01-23  8:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-22 19:29 [RFC 0/7] APEI: Move arm64 NMI notifications to use estatus cache James Morse
2018-01-22 19:29 ` [RFC 1/7] ACPI / APEI: Move the estatus queue code up, and under its own ifdef James Morse
2018-01-22 19:29 ` [RFC 2/7] ACPI / APEI: Generalise the estatus queue's add/remove and notify code James Morse
2018-01-22 19:29 ` [RFC 3/7] ACPI / APEI: Switch NOTIFY_SEA to use the estatus queue James Morse
2018-01-22 19:29 ` [RFC 4/7] KVM: arm/arm64: Add kvm_ras.h to collect kvm specific RAS plumbing James Morse
2018-01-22 19:29 ` [RFC 5/7] arm64: KVM/mm: Move SEA handling behind a single 'claim' interface James Morse
2018-01-23  8:46   ` gengdongjiu
2018-01-22 19:29 ` [RFC 6/7] ACPI / APEI: Make the fixmap_idx per-ghes to allow multiple in_nmi() users James Morse
2018-01-22 19:29 ` [RFC 7/7] ACPI / APEI: Split fixmap pages for arm64 NMI-like notifications James Morse
2018-01-23  8:51 ` [RFC 0/7] APEI: Move arm64 NMI notifications to use estatus cache gengdongjiu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).