Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: David Woodhouse <dwmw2@infradead.org>
Cc: Stefan Wahren <stefan.wahren@i2se.com>,
	Matthias Brugger <mbrugger@suse.com>,
	Petr Tesarik <ptesarik@suse.cz>,
	kexec mailing list <kexec@lists.infradead.org>,
	"takahiro.akashi@linaro.org" <takahiro.akashi@linaro.org>,
	James Morse <james.morse@arm.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: panic kexec broken on ARM64?
Date: Fri, 03 Aug 2018 07:06:53 +0100	[thread overview]
Message-ID: <86600sq8zm.wl-marc.zyngier@arm.com> (raw)
In-Reply-To: <1533224994.16128.81.camel@infradead.org>

On Thu, 02 Aug 2018 16:49:54 +0100,
David Woodhouse <dwmw2@infradead.org> wrote:
> 
> On Thu, 2018-07-05 at 11:19 +0100, Marc Zyngier wrote:
> > >> The criteria is "this irqchip requires a reset to be safely used in the
> > >> secondary kernel". This is a judgement call from the person writing the
> > >> driver.
> > > 
> > > This doesn't tell me anything more than "do it if you need it."
> > > So let me ask you in other words.
> > > Does gic driver need to provide a reset function?
> > > Whether yes or no, why do you think so?
> > 
> > Because I know the architecture and I can assess that it needs it. Case
> > in point: The RDs have memory tables. kexec without disabling LPIs, and
> > you end-up with memory corruption.
> > 
> > Sorry, but there is no magic bullet. You have to understand what you're
> > doing.
> 
> Remember, kexec and kdump are subtly different things.
> 
> In the case of an orderly kexec, sure you can go walking chains of
> interrupt controllers (and other devices) and nicely quiescing them.
> 
> In the kdump case it's different. You really want as few instructions
> as possible between realising you're going to panic, and entering the
> kdump kernel. You NMI¹ all the other cores to dump their state, and
> just GTFO.
> 
> In the kdump case you also aren't *reusing* the memory, which means
> that existing memory tables which are being accessed by hardware
> shouldn't be an issue. You can let the second kernel reset it all from
> a controlled and not-already-panicking environment.

Yes, in the kdump case, you can safely continue without experiencing
memory corruption. No, you cannot reset them, which is the whole
point. What you can do is use the LPI configuration as it is, and cope
with it (at the expense of changing memory that was under control of
the primary kernel -- let's hope you're not trying to debug
interrupt-related issues...).

See [1] which implements that and a bit more to actually support kexec
in such a configuration.

> ¹ Oops no NMI. Doh.

Care to help reviewing this[2]?

	M.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/log/?h=irq/gicv3-kdump

[2] https://lwn.net/Articles/755906/

-- 
Jazz is not dead, it just smell funny.

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  reply	other threads:[~2018-08-03  6:06 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-05  8:01 panic kexec broken on ARM64? Petr Tesarik
2018-06-05 17:46 ` James Morse
2018-06-06  7:02   ` Stefan Wahren
2018-06-06  8:00     ` Petr Tesarik
2018-06-06 11:41       ` Petr Tesarik
2018-06-06 11:37     ` James Morse
2018-06-10 12:24       ` Marc Zyngier
2018-07-03  7:01         ` takahiro.akashi
2018-07-03  8:58           ` Marc Zyngier
2018-07-04  8:41             ` takahiro.akashi
2018-07-04  9:02               ` Marc Zyngier
2018-07-05 10:13                 ` takahiro.akashi
2018-07-05 10:19                   ` Marc Zyngier
2018-08-02 15:49                     ` David Woodhouse
2018-08-03  6:06                       ` Marc Zyngier [this message]
2018-07-04 12:47               ` James Morse
2018-07-05 10:18                 ` takahiro.akashi
2018-07-04 14:08             ` Matthias Brugger
2018-07-04 14:20               ` Marc Zyngier
2018-06-06  5:36 ` Bhupesh Sharma
2018-06-06  7:58   ` Petr Tesarik

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=86600sq8zm.wl-marc.zyngier@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=dwmw2@infradead.org \
    --cc=james.morse@arm.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mbrugger@suse.com \
    --cc=ptesarik@suse.cz \
    --cc=stefan.wahren@i2se.com \
    --cc=takahiro.akashi@linaro.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