From: David Vrabel <david.vrabel@citrix.com>
To: xen-devel@lists.xen.org
Subject: Re: kexec -e in PVHVM guests (and in PV).
Date: Mon, 30 Jun 2014 17:05:17 +0100 [thread overview]
Message-ID: <53B18ABD.8070803@citrix.com> (raw)
In-Reply-To: <20140630153600.GA19885@laptop.dumpdata.com>
On 30/06/14 16:36, Konrad Rzeszutek Wilk wrote:
> Hey,
>
> I had on my todo list an patch from Olaf patch that shuffles
> the shared_page to be in the 0xFE700000 addr (in the "gap"
> with newer QEMU's) which unfortunately did not work when
> migrating on 32-bit PVHVM guests on Xen 4.1.
>
> The commit is 9d02b43dee0d7fb18dfb13a00915550b1a3daa9f
> "xen PVonHVM: use E820_Reserved area for shared_info" and it
> ended up being reverted. I dusted it off and I think I found
> the original bug (and fixed it), but while digging in this
> the more I discovered a ton more of issues.
>
> A bit about the use case - the 'kexec -e' allows one to
> restart the Linux kernel without a reboot. It is not a crash kernel
> so it is just meant to restart and work, and then restart, etc.
>
> The 'kdump -c' (crash) is a different use case and I had not
> thought much about it. But I think that all of the solutions
> I am thinking of will make it also work. (so you could
> do kexec-crash -> kexec-e->kexec-e>kexec-crash->kexec-e, and
> so, if you would want to).
These are equivalent from your point of view -- the only different is
who does the relocation of the image to its final location. kexec -e
does it kexec time; kdump -c does it in advance and requires a region of
memory to be reserved.
> 7). Grants. Andrew Cooper hinted at this and a bit of experimentation
> shows that Xen hypervisor will indeed smack down any guest that
> tries to re-use its "old" grants. I am not even sure if the
> GNTTAB_setup call is returning the "old" grant frames.
> His suggestion was 'GNTTAB_reset' to well, reset everything.
You also need consider grants that are in use (mapped or copied to) by
the backend -- the backend might scribble all over your kexec'd state.
> My thinking is that a lot of this code is shared with PV (and PVH)
> once this is fixed we could do full scale 'kexec -e' in an PV
> (or PVH) type guest. Doing dom0 kexec -e would be an interesting
> experiment :-(
With some toolstack/Xen help you could probably destroy a domain without
freeing its memory, create a new domain (reusing all the memory) and
jump to the kexec image.
For kdump use cases, pause on crash and then have a helper domain with
permission to rummage through the crashed domain perform the crash
dump/analysis.
I think something like this would be a lot easier than a purely in-guest
kexec solution.
David
next prev parent reply other threads:[~2014-06-30 16:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-30 15:36 kexec -e in PVHVM guests (and in PV) Konrad Rzeszutek Wilk
2014-06-30 16:05 ` David Vrabel [this message]
2014-06-30 16:21 ` Konrad Rzeszutek Wilk
2014-06-30 16:28 ` Olaf Hering
2014-07-01 8:12 ` Vitaly Kuznetsov
2014-07-01 15:34 ` Konrad Rzeszutek Wilk
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=53B18ABD.8070803@citrix.com \
--to=david.vrabel@citrix.com \
--cc=xen-devel@lists.xen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.