linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Guilherme G. Piccoli" <gpiccoli@igalia.com>
To: Catalin Marinas <catalin.marinas@arm.com>,
	will Deacon <will@kernel.org>,
	"Michael Kelley (LINUX)" <mikelley@microsoft.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	Marc Zyngier <maz@kernel.org>,
	mark.rutland@arm.com, Russell King <linux@armlinux.org.uk>,
	Ard Biesheuvel <ardb@kernel.org>,
	broonie@kernel.org
Cc: "linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>
Subject: Should arm64 have a custom crash shutdown handler?
Date: Wed, 4 May 2022 17:00:42 -0300	[thread overview]
Message-ID: <427a8277-49f0-4317-d6c3-4a15d7070e55@igalia.com> (raw)

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)

             reply	other threads:[~2022-05-04 20:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-04 20:00 Guilherme G. Piccoli [this message]
2022-05-05  7:29 ` Should arm64 have a custom crash shutdown handler? 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

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=427a8277-49f0-4317-d6c3-4a15d7070e55@igalia.com \
    --to=gpiccoli@igalia.com \
    --cc=ardb@kernel.org \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=maz@kernel.org \
    --cc=mikelley@microsoft.com \
    --cc=vkuznets@redhat.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;
as well as URLs for NNTP newsgroup(s).