From: Gerd Hoffmann <kraxel@suse.de>
To: Mark Williamson <mark.williamson@cl.cam.ac.uk>
Cc: xen-devel@lists.xensource.com, Horms <horms@verge.net.au>
Subject: Re: Re: [PATCH] Xen Guest Kexec
Date: Fri, 24 Feb 2006 15:35:47 +0100 [thread overview]
Message-ID: <43FF19C3.2070409@suse.de> (raw)
In-Reply-To: <200602231449.52242.mark.williamson@cl.cam.ac.uk>
Mark Williamson wrote:
>> As close as possible to normal i386 kexec ...
>>
>> Dis- and reconnecting should be ok by now I guess. I expect the paging
>> setup being the most tricky part: First because the pseudophysical
>> memory (probably not a major issue though). Second because unlike i386
>> kexec we'll have to run with paging enabled all the time ...
>
> I doubt having paging enabled would be too painful. i386 kexec disables
> paging right at the end of the process so that the new kernel will have a
> sensible start-of-day. We'd just need start-of-day to contain bootstrap
> pagetables, same as for normal Linux. Ideally you'd need to find a slot in
> the bootstrap tables for the trampoline code to live, if you take that
> approach.
x86-64 has paging enabled while trampoline is running too, so I can get
some ideas there ;)
> You've got a load of other things to worry about in this approach, like
> un-type-pinning all pages you own, etc.
Yep, that is a problem. What pages are pinned (other than pgd)? I've
seen plenty of pages with PG_pinned set, but can't figure easily what
pages that are ...
Also switching page tables seems to be not so easy. Is it possible to
switch atomically to a new, completely independant page table tree?
i.e. old tree is valid (of cource), new tree is too, but the pages of
the old tree are not mapped read-only in the new tree (and visa versa).
> The generic kexec code doesn't understand phys vs machine memory, IIRC, so you
> may need to worry about it mis-allocating your trampoline page (this is an
> issue because you need to identity map the trampoline page later on in the
> process).
Not a big issue if paging is enabled anyway, we can use a identity map
then (virtual == physical, not virtual == machine), so kexec doesn't
even notice outside the arch-specific code.
>> Right now linux kexec depends on the new kernel having a different
>> physical (and virtual) start address, so taking the very same approach
>> likely doesn't work.
>
> I'm not convinced: the reboot kernel doesn't need to be any different from the
> standard kernel *unless* you're running kdump (when the kernel will need to
> live in a different place so that it doesn't stomp on the main kernel - not a
> limitation of kexec). Or am I misunderstanding what you meant?
I think it's needed in both cases, at least I had problems making normal
kexec work (without xen) when both kernels had the same physical
address. Might have been a simple bug though.
cheers,
Gerd
--
Gerd 'just married' Hoffmann <kraxel@suse.de>
I'm the hacker formerly known as Gerd Knorr.
http://www.suse.de/~kraxel/just-married.jpeg
next prev parent reply other threads:[~2006-02-24 14:35 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-07 17:16 [PATCH] Xen Guest Kexec Mark Williamson
2005-07-08 8:59 ` [Fastboot] " Eric W. Biederman
2005-07-08 14:35 ` Mark Williamson
2005-07-08 17:35 ` Mark Williamson
2006-02-23 10:52 ` Horms
2006-02-23 11:22 ` Gerd Hoffmann
2006-02-23 11:32 ` Mark Williamson
2006-02-23 13:03 ` Gerd Hoffmann
2006-02-23 14:49 ` Mark Williamson
2006-02-24 14:35 ` Gerd Hoffmann [this message]
2006-02-27 14:29 ` Mark Williamson
2006-02-27 15:39 ` Gerd Hoffmann
2006-02-23 11:36 ` Mark Williamson
2006-02-27 3:32 ` Horms
2006-02-27 14:58 ` Mark Williamson
-- strict thread matches above, loose matches on Subject: below --
2006-02-26 22:49 Ian Pratt
2006-02-27 7:10 ` Keir Fraser
2006-02-27 15:34 ` Gerd Hoffmann
2006-02-27 16:19 ` Keir Fraser
2006-03-01 12:09 ` Gerd Hoffmann
2006-03-01 14:10 ` Gerd Hoffmann
2006-03-01 15:03 ` Keir Fraser
2006-03-01 17:35 ` Keir Fraser
2006-03-02 9:16 ` Gerd Hoffmann
2006-03-02 9:43 ` Keir Fraser
2006-03-02 11:34 ` Gerd Hoffmann
2006-03-02 11:55 ` Keir Fraser
2006-03-02 16:36 ` Gerd Hoffmann
2006-03-02 16:48 ` Keir Fraser
2006-03-03 8:39 ` Gerd Hoffmann
2006-03-03 9:14 ` Keir Fraser
2006-03-03 9:35 ` Keir Fraser
2006-03-03 11:19 ` Gerd Hoffmann
2006-03-06 14:15 ` Gerd Hoffmann
2006-03-06 16:04 ` Michael Vrable
2006-03-07 13:06 ` Gerd Hoffmann
2006-03-07 13:42 ` Keir Fraser
2006-03-07 14:43 ` Gerd Hoffmann
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=43FF19C3.2070409@suse.de \
--to=kraxel@suse.de \
--cc=horms@verge.net.au \
--cc=mark.williamson@cl.cam.ac.uk \
--cc=xen-devel@lists.xensource.com \
/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.