xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Petr Tesarik <ptesarik@suse.com>, daniel.kiper@oracle.com
Cc: xen-devel <xen-devel@lists.xenproject.org>,
	Jan Beulich <JBeulich@suse.com>
Subject: Re: [PATCH 2/2] Allow kdump with crash_kexec_post_notifiers
Date: Mon, 1 Aug 2016 10:25:22 -0400	[thread overview]
Message-ID: <20160801142522.GG21356@char.us.oracle.com> (raw)
In-Reply-To: <20160801161510.5121f60a@hananiah.suse.cz>

On Mon, Aug 01, 2016 at 04:15:10PM +0200, Petr Tesarik wrote:
> On Mon, 1 Aug 2016 15:47:58 +0200
> "Jan Beulich" <JBeulich@suse.com> wrote:
> 
> > (re-adding xen-devel)
> > 
> > >>> On 01.08.16 at 15:02, <PTesarik@suse.com> wrote:
> > > On Mon, 1 Aug 2016 13:55:01 +0200
> > > "Jan Beulich" <JBeulich@suse.com> wrote:
> > > 
> > >> >>> On 13.07.16 at 14:53, <david.vrabel@citrix.com> wrote:
> > >> > On 13/07/16 13:20, Petr Tesarik wrote:
> > >> >> If a crash kernel is loaded, do not crash the running domain. This is
> > >> >> needed if the kernel is loaded with crash_kexec_post_notifiers, because
> > >> >> panic notifiers are run before __crash_kexec() in that case, and this
> > >> >> Xen hook prevents its being called later.
> > >> > 
> > >> > Prioritising the in-kernel kexec image over the hypervisor one seems
> > >> > sensible behaviour to me.
> > >> 
> > >> For HVM guests certainly; does loading of an in-kernel crash kernel
> > >> properly fail for PV guests (and namely PV Dom0), or does such a
> > >> setup work nowadays?
> > > 
> > > This is a good question, but I don't think it is relevant to this
> > > patch. It does not change anything unless the kernel is booted with
> > > crash_kexec_post_notifiers.
> > > 
> > > I fully understand that Dom0 kernels want to load the panic kernel in
> > > the hypervisor and crash the complete machine, rather than just Dom0,
> > > but if you want that behaviour, simply pass the "crashkernel="
> > > parameter only to the Xen hypervisor and not to the Dom0 kernel.
> > > 
> > > Did I miss something?
> > 
> > For one there are still many people who, for varying reasons, add
> > "crashkernel=" also to Dom0's command line.
> 
> Is there a valid use case for it?
> 
> FWIW the legacy Xen implementation (as found in SLES) simply ignores
> the 'crashkernel=' kernel parameter. The code is not even compiled in.

I wonder if Xen should do that - as in 'fix' the bootparams to not have it.
Or perhaps Linux code during bootup can sanitze this..

> 
> > And then trying to invoke a locally loaded crash kernel which won't
> > work is bad
> 
> Without actually knowing whether a PV kernel can kexec another PV
> kernel, this discussion is somewhat moot...
> 
> But let me repeat: if PV kexec works, then it has always had priority
> over the hypercall. If it doesn't work, then it has always been broken.
> For the latter case, I agree that the kernel should not even allow to
> load the kexec image, but that's unrelated to my patch.
> 
> Has anyone here tried booting up a PV domain and performing kexec(2)?

Yes. Daniel (CC-ed) did it. He had it working but only for one CPU
and then Greg KH picked up the patchset .. and not sure what happend.

The underlaying issue was the PV guest could not re-initialize the grants,
events, etc - but now with Vitaly's 'reset' hypercall it would be possible.
Except the 'reset' hypercall is only for HVM guests.

> I can't test it with my SLES12 installation, because the kexec(8)
> user-space utility is patched in SLES to load the hypervisor kexec
> image with a hypercall if Xen is detected.

Also the upstream one would do this.
> 
> Petr T
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> https://lists.xen.org/xen-devel

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  parent reply	other threads:[~2016-08-01 14:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20160713121950.14969.78606.stgit@hananiah.suse.cz>
2016-07-13 12:19 ` [PATCH 1/2] Add a kexec_crash_loaded() function Petr Tesarik
2016-07-13 12:20 ` [PATCH 2/2] Allow kdump with crash_kexec_post_notifiers Petr Tesarik
2016-07-13 12:27 ` [PATCH 0/2] Allow crash dumps " Petr Tesarik
     [not found] ` <20160713121955.14969.69080.stgit@hananiah.suse.cz>
2016-07-13 12:52   ` [PATCH 1/2] Add a kexec_crash_loaded() function Josh Triplett
     [not found]   ` <20160713125232.GA32462@x>
2016-07-13 13:03     ` Petr Tesarik
     [not found] ` <20160713122000.14969.99963.stgit@hananiah.suse.cz>
2016-07-13 12:53   ` [PATCH 2/2] Allow kdump with crash_kexec_post_notifiers David Vrabel
     [not found]   ` <578639AE.10500@citrix.com>
2016-08-01 11:55     ` Jan Beulich
     [not found]     ` <579F54B502000078001013F1@suse.com>
2016-08-01 13:02       ` Petr Tesarik
2016-08-01 13:47         ` Jan Beulich
     [not found]         ` <579F6F2E0200007800101563@suse.com>
2016-08-01 14:15           ` Petr Tesarik
2016-08-01 14:22             ` Jan Beulich
2016-08-01 14:25             ` Konrad Rzeszutek Wilk [this message]
2016-08-03 17:55               ` Daniel Kiper
     [not found]             ` <579F773A02000078001015C1@suse.com>
2016-08-01 15:17               ` 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=20160801142522.GG21356@char.us.oracle.com \
    --to=konrad.wilk@oracle.com \
    --cc=JBeulich@suse.com \
    --cc=daniel.kiper@oracle.com \
    --cc=ptesarik@suse.com \
    --cc=xen-devel@lists.xenproject.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).