linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Should arm64 have a custom crash shutdown handler?
@ 2022-05-04 20:00 Guilherme G. Piccoli
  2022-05-05  7:29 ` Marc Zyngier
  2022-05-05 11:10 ` Mark Rutland
  0 siblings, 2 replies; 14+ messages in thread
From: Guilherme G. Piccoli @ 2022-05-04 20:00 UTC (permalink / raw)
  To: Catalin Marinas, will Deacon, Michael Kelley (LINUX),
	Vitaly Kuznetsov, Marc Zyngier, mark.rutland, Russell King,
	Ard Biesheuvel, broonie
  Cc: linux-arm-kernel, linux-kernel, linux-hyperv

Hi folks, this email is to ask feedback / trigger a discussion about the
concept of custom crash shutdown handler, that is "missing" in arm64
while it's present in many architectures [mips, powerpc, x86, sh (!)].

Currently, when we kexec in arm64, the function machine_crash_shutdown()
is called as a handler to disable CPUs and (potentially) do extra
quiesce work. In the aforementioned architectures, there's a way to
override this function, if for example an hypervisor wish to have its
guests running their own custom shutdown machinery.

For powerpc/mips, the approach is a generic shutdown function that might
call other handler-registered functions, whereas x86/sh relies in the
"machine_ops" structure, having the crash shutdown as a callback in such
struct.

The usage for that is very broad, but heavy users are hypervisors like
Hyper-V / KVM (CCed Michael and Vitaly here for this reason). The
discussion about the need for that in arm64 is from another thread [0],
so before start implementing/playing with that, I'd like to ask ARM64
community if there is any feedback and in case it's positive, what is
the best implementation strategy (struct callback vs. handler call), etc.

I've CCed ARM64/ARM32 maintainers plus extra people I found as really
involved with ARM architecture - sorry if I added people I shouldn't or
if I forgot somebody (though the ARM mailing-list is CC).
Cheers,


Guilherme


[0]
https://lore.kernel.org/lkml/2787b476-6366-1c83-db80-0393da417497@igalia.com/
See the proposed option (b)

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

end of thread, other threads:[~2022-05-30  1:51 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-04 20:00 Should arm64 have a custom crash shutdown handler? Guilherme G. Piccoli
2022-05-05  7:29 ` Marc Zyngier
2022-05-05 12:44   ` Guilherme G. Piccoli
2022-05-05 12:53     ` Mark Rutland
2022-05-05 13:05       ` Guilherme G. Piccoli
2022-05-05 13:15         ` Mark Rutland
2022-05-05 13:19           ` Guilherme G. Piccoli
2022-05-05 13:52         ` Vitaly Kuznetsov
2022-05-05 14:07           ` Guilherme G. Piccoli
2022-05-05 14:31           ` Mark Rutland
2022-05-05 14:51             ` Vitaly Kuznetsov
2022-05-06 11:01               ` Mark Rutland
2022-05-30  1:51                 ` Michael Kelley (LINUX)
2022-05-05 11:10 ` Mark Rutland

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).