From: David Vrabel <david.vrabel@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
"Eric W. Biederman" <ebiederm@xmission.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
kexec@lists.infradead.org, David Vrabel <david.vrabel@citrix.com>,
Petr Tesarik <ptesarik@suse.cz>,
xen-devel@lists.xen.org
Subject: Re: [Xen-devel] More on kexec/purgatory handover
Date: Wed, 13 May 2015 10:53:19 +0100 [thread overview]
Message-ID: <55531F0F.4090603@citrix.com> (raw)
In-Reply-To: <5553239F0200007800079DEE@mail.emea.novell.com>
On 13/05/15 09:12, Jan Beulich wrote:
>>>> On 13.05.15 at 09:35, <ebiederm@xmission.com> wrote:
>> Fundamentally if you are transfering control in long mode you have to
>> set up some page table. I giant identity mapped page table that can use
>> 1G or 2M pages takes up very little memory, and can be very simply
>> and easily before the transfer of control takes place.
>>
>> All you have to do when you are in a half broken state is load cr3.
>> Possible after verifying a checksum.
>>
>> 640k in this case I don't think is particularly special, and certainly
>> not worth a special case. The in-kernel implementation on x86_64 sets
>> up a page table for all of memory which because of the availability of
>> huge pages winds up being simple and trivial.
>>
>> Weird things like copying off the 640k region for the kexec-on-panic
>> case can be done in the adapter/purgatory piece that lives between the
>> two kernels.
>>
>> So at a very practical level I think we shouldn't have mappings for
>> special regions we should just have mappings for all of memory.
>
> But in all of the above you (a) forget that setting up 1:1
> mappings for all memory isn't as simple as putting in place a
> couple of 1G pages - holes need to be accounted for and must
> at best be mapped UC (that's especially an issue with the low
> 640k) and (b) imply that whatever Linux behavior there is, Xen
> should mimic it (ignoring for example the fact that with the non-
> kernel based kexec which newer Xen and tools support such 1:1
> mapping setup doesn't appear to be required, i.e. [supposed]
> requirements change).
Xen's V2 kexec ABI builds 1:1 pages tables for the source and
destination pages and any additional regions requested by the guest (see
calls to machine_kexec_add_page()). kexec-tools adds a "map-only"
segment for 0-1MiB when using the V2 ABI.
These page tables are built at load time (not at exec time) and in the
crash case are placed in the crash memory area.
When using the V1 ABI, there is no way for the tools to provide an
additional "map-only" segment so you'd have to get purgatory to add
mappings for 0-1MiB, or get Xen (in the V1 path only) to do so.
David
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2015-05-13 9:54 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-09 13:21 More on kexec/purgatory handover Petr Tesarik
2015-05-13 5:26 ` Eric W. Biederman
2015-05-13 6:55 ` Jan Beulich
2015-05-13 6:55 ` Jan Beulich
2015-05-13 7:35 ` Eric W. Biederman
2015-05-13 8:12 ` Jan Beulich
2015-05-13 8:12 ` Jan Beulich
2015-05-13 9:07 ` Petr Tesarik
2015-05-13 9:07 ` Petr Tesarik
2015-05-13 9:53 ` David Vrabel [this message]
2015-05-13 10:01 ` Jan Beulich
2015-05-13 10:01 ` [Xen-devel] " Jan Beulich
2015-05-13 12:12 ` Petr Tesarik
2015-05-13 12:28 ` Jan Beulich
2015-05-13 12:28 ` [Xen-devel] " Jan Beulich
2015-05-13 12:12 ` Petr Tesarik
2015-05-13 9:53 ` David Vrabel
2015-05-13 7:35 ` Eric W. Biederman
2015-05-13 5:26 ` Eric W. Biederman
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=55531F0F.4090603@citrix.com \
--to=david.vrabel@citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=ebiederm@xmission.com \
--cc=kexec@lists.infradead.org \
--cc=ptesarik@suse.cz \
--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.