From: ebiederm@xmission.com (Eric W. Biederman)
To: David Vrabel <david.vrabel@citrix.com>
Cc: Daniel Kiper <daniel.kiper@oracle.com>,
"kexec@lists.infradead.org" <kexec@lists.infradead.org>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH 1/3] kexec: extend hypercall with improved load/unload ops
Date: Fri, 18 Jan 2013 11:01:50 -0800 [thread overview]
Message-ID: <87pq12pb6p.fsf@xmission.com> (raw)
In-Reply-To: <50F83A8D.2030307@citrix.com> (David Vrabel's message of "Thu, 17 Jan 2013 17:53:17 +0000")
David Vrabel <david.vrabel@citrix.com> writes:
> On 17/01/13 15:17, Daniel Kiper wrote:
>> On Thu, Jan 17, 2013 at 02:50:26PM +0000, David Vrabel wrote:
>>> On 17/01/13 12:28, Daniel Kiper wrote:
>>>> On Wed, Jan 16, 2013 at 04:29:04PM +0000, David Vrabel wrote:
> [..]
>>>>> + if ( image->class == KEXEC_CLASS_32 )
>>>>> + compat_machine_kexec(image->entry_maddr);
>>>>
>>>> Why do you need that?
>>>
>>> image->class controls whether the processor is in 32-bit or 64-bit mode
>>> when calling the image. The current implementation only allows images
>>> to be executed with the same class as dom0.
>>>
>>> It's called class because that's the term ELF uses in the ELF header.
>>
>> As I correctly understand this sets processor mode before new kernel exection.
>> If yes then it is not needed. Purgatory code (from kexec-tools) does all
>> needed things. Please check.
>
> On x86 I think it would probably be fine to specify entry is always in
> 64-bit mode but for ARM and future architectures it is less clear and it
> becomes more difficult to have a well-defined ABI.
>
> In fact, we probably want a more generic architecture field. e.g,
>
> #define XEN_KEXEC_ARCH_X86_32 0
> #define XEN_KEXEC_ARCH_X86_64 1
> #define XEN_KEXEC_ARCH_ARMv7 2
> #define XEN_KEXEC_ARCH_ARMv8 3
The way this is defined for kexec on linux is that we always transition
in the processors native mode. The page tables for the transition are
definined as being identity mapped for the pages specified in the image.
The linux kexec pass in what architecture it thinks the system is runing
in so that the kexec_load implemenation can fail load requests with the
wrong architecture.
In particular a 32bit kexec on a x86_64 kernel does expect to transition
in 64bit mode.
Non-native transitions are possible if you want to support them when Xen
is crashing but I don't see the point. I do admit I am a bit puzzled on
how a 32bit dom0 on a 64bit hypervisor implements kexec on panic
functionality today. Xen is weird. Shrug.
Eric
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2013-01-18 20:22 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-16 16:29 [RFC PATCH 0/3] Improve kexec support in Xen hypervisor David Vrabel
2013-01-16 16:29 ` [PATCH 1/3] kexec: extend hypercall with improved load/unload ops David Vrabel
2013-01-17 12:28 ` Daniel Kiper
2013-01-17 14:50 ` David Vrabel
2013-01-17 15:17 ` Daniel Kiper
2013-01-17 17:53 ` David Vrabel
2013-01-18 9:44 ` Daniel Kiper
2013-01-18 9:50 ` [Xen-devel] " Ian Campbell
2013-01-18 19:01 ` Eric W. Biederman [this message]
2013-01-17 12:33 ` Ian Campbell
2013-01-16 16:29 ` [PATCH 2/3] kexec: remove kexec_load and kexec_unload ops David Vrabel
2013-01-16 16:29 ` [PATCH 3/3] libxc: add API for kexec hypercall David Vrabel
2013-01-16 16:59 ` [Xen-devel] " Ian Campbell
2013-01-16 16:33 ` [RFC PATCH 0/3] Improve kexec support in Xen hypervisor David Vrabel
2013-01-16 17:02 ` [Xen-devel] " Ian Campbell
2013-01-16 17:48 ` David Vrabel
2013-01-17 9:35 ` Ian Campbell
2013-01-17 10:46 ` Jan Beulich
2013-01-17 10:51 ` Jan Beulich
2013-01-17 11:27 ` Daniel Kiper
2013-01-17 11:37 ` [Xen-devel] " Andrew Cooper
2013-01-17 12:59 ` Daniel Kiper
2013-01-17 13:01 ` David Vrabel
2013-01-17 13:25 ` 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=87pq12pb6p.fsf@xmission.com \
--to=ebiederm@xmission.com \
--cc=daniel.kiper@oracle.com \
--cc=david.vrabel@citrix.com \
--cc=kexec@lists.infradead.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox