From: Ian Campbell <Ian.Campbell@citrix.com>
To: Simon Horman <horms@verge.net.au>
Cc: "Huang, Ying" <ying.huang@intel.com>,
Vivek Goyal <vgoyal@redhat.com>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, Magnus Damm <magnus.damn@gmail.com>
Subject: Re: [PATCH -mm 2/2] kexec/i386: kexec page table code clean up - page table setup in C
Date: Mon, 14 Jan 2008 13:29:49 +0000 [thread overview]
Message-ID: <1200317389.11020.12.camel@localhost.localdomain> (raw)
In-Reply-To: <20080110072117.GB26821@verge.net.au>
On Thu, 2008-01-10 at 16:21 +0900, Simon Horman wrote:
> [ CCing Ian Campbell who handles much of the maintenance of kexec in Xen ]
>
> On Thu, Jan 10, 2008 at 10:08:09AM +0800, Huang, Ying wrote:
> > On Wed, 2008-01-09 at 20:05 -0500, Vivek Goyal wrote:
> > > On Wed, Jan 09, 2008 at 10:57:50AM +0800, Huang, Ying wrote:
> > > > This patch transforms the kexec page tables setup code from asseumbler
> > > > code to iC code in machine_kexec_prepare. This improves readability and
> > > > reduces code line number.
> > > >
> > >
> > > I think this will create issues for Xen. Initially page table setup
> > > was in C but Xen Guests could not modify the page tables. I think Xen
> > > folks implemented a hypercall where they passed all the page table pages
> > > and the control pages and then hypervisor executed the control page(which
> > > in turn setup the page tables). I think that's why page table setup
> > > code is on the control page in assembly.
> > >
> > > You might want to go through Xen kexec implementation and dig through
> > > kexec mailing list archive.
> >
> > OK, I will check the Xen kexec implementation.
> >
> > > CCing Magnus and Horms. They had done the page tables related changes
> > > for Xen.
>
> I think that potentially there is a problem here, though weather or
> not it manifests is another question.
>
> In machine_kexec() a PAGE_SIZE blob of code starting at relocate_kernel
> gets saved. I think that previously x86 Linux excuded this saved blob,
> though the current code seems to execute relocate_kernel() directly -
> then again perhaps I'm confusing things with ia64 which still executes
> the saved blob.
>
> In any case, in the case of xen, the hypervisor will execute this saved
> blob. So I think that the crux of the issue is that the blob contains
> all the instructions required to run relocate_kernel, then it should
> work from inside xen, if and if it doesn't, then i'll blow up.
>
> The code that you have seems to satisfy this requirement,
> so relocate_kernel itself shouldn't be a problem. And as
> long as the preparation work does exacltly what the removed
> portions of relocate_kernel used to do, which it seems to,
> things should be fine.
>
> That said, this certainly warrants testing :-)
In the absence of domain 0 or Xen kexec in the upstream kernel testing
might be quite hard.
> I'm all in favour of this kind of consolodation,
> so hopefully we can bend Xen's will if it doesn't work as is.
Indeed, patch seem reasonable to me. Whatever issues this causes for Xen
will be stuff that can be fixed once someone does the kexec for Xen work
in the upstream kernel, I don't think it paints us into an inescapable
corner.
Ian.
prev parent reply other threads:[~2008-01-14 13:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-09 2:57 [PATCH -mm 2/2] kexec/i386: kexec page table code clean up - page table setup in C Huang, Ying
2008-01-10 1:05 ` Vivek Goyal
2008-01-10 2:08 ` Huang, Ying
2008-01-10 7:21 ` Simon Horman
2008-01-14 13:29 ` Ian Campbell [this message]
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=1200317389.11020.12.camel@localhost.localdomain \
--to=ian.campbell@citrix.com \
--cc=akpm@linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=horms@verge.net.au \
--cc=linux-kernel@vger.kernel.org \
--cc=magnus.damn@gmail.com \
--cc=vgoyal@redhat.com \
--cc=ying.huang@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox