From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Daniel Kiper <daniel.kiper@oracle.com>
Cc: "kexec@lists.infradead.org" <kexec@lists.infradead.org>,
David Vrabel <david.vrabel@citrix.com>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [Xen-devel] [PATCH 5/8] kexec: extend hypercall with improved load/unload ops
Date: Mon, 11 Mar 2013 14:27:26 +0000 [thread overview]
Message-ID: <513DE9CE.9050303@citrix.com> (raw)
In-Reply-To: <20130311141316.GC13175@debian70-amd64.local.net-space.pl>
On 11/03/13 14:13, Daniel Kiper wrote:
> On Mon, Mar 11, 2013 at 01:43:02PM +0000, David Vrabel wrote:
>> On 11/03/13 13:30, Daniel Kiper wrote:
>>> On Mon, Mar 11, 2013 at 01:21:30PM +0000, David Vrabel wrote:
>>>> On 11/03/13 11:17, Daniel Kiper wrote:
>>>>> Heh... It looks that there is a misunderstanding. At first I thought
>>>>> that David was going to replace purgatory functionality by switching
>>>>> from 64-bit to 32-bit in kexec_reloc. But later I realized that
>>>>> I missed Xen 64-bit/dom 32-bit case. Now I agree that this switch
>>>>> must stay as is. However, now I think that there is another
>>>>> small mistake which should be fixed. Please look above.
>>>> Which mistake? I'm not sure what you're referring to.
>>> I thought about that:
>>>
>>> if ( image->arch == EM_386 )
>>> reloc_flags |= KEXEC_RELOC_FLAG_COMPAT;
>>>
>>> It should be change to:
>>>
>>> if ( is_pv_32on64_domain(dom0) )
>>> reloc_flags |= KEXEC_RELOC_FLAG_COMPAT;
>> This isn't a mistake but a deliberate improvement to the old interface.
> I am still not convinced.
>
>> It is clearer and more useful for this sub-architecture to be explicitly
>> supplied in the kexec_load call than implicitly through some other
>> side-channel.
> First of all you do not need to pass any info about architecure to
> new kernel or something like that (please check my previous emails).
Yes - you really do. Guessing the architecture of a blob of code is
insane, and any current interface which relies on this guessing is
broken by design.
> If any then there is another questions. What do you do if you need
> second or third argument?. You redefine kexec interface once again.
> For what? Additionally, currently there are a lot of stuff passed
> to new kernel via purgatory. And purgatory is called by your
> interface too...
>
>> If we go with what you suggest then you prevent kexec from being used
>> by: a) PVH dom0s; b) suitably privileged service domains; c) 32-bit
> Maybe for PVH should be different check. However,
> until now we do not have it in Xen yet.
>
>> guests wanting to load an image with a 64-bit entry point; and d)
> Once again:
>
> old_kernel (Xen) -> purgatory (native mode) -> new_kernel
>
> purgatory architecture is same as kexec-tools architecture. If you
> use dom0 i386 it means that kexec-tools is (and must be) i386 too.
> We do not support Xen i386 anymore. It means that my condition is
> correct.
>
> Daniel
And what happens when kexec-tools is using ia32-libs under a 64bit dom0?
That would also break.
The logic is very simple.
If the blob passed in kexec_load claims to be 32bit, Xen will switch
into 32bit mode before executing it. If the blob claims to be 64 bit
then Xen will stay in 64bit mode before executing it.
This way, purgatory from any kind of multi-arch setup in dom0 will work,
as well as all of the other usecases which your suggestion breaks.
~Andrew
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2013-03-11 14:27 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-21 17:48 [PATCH 0/8] kexec: extended kexec hypercall for use with pv-ops kernels David Vrabel
2013-02-21 17:48 ` [PATCH 1/8] x86: give FIX_EFI_MPF its own fixmap entry David Vrabel
2013-02-21 17:48 ` [PATCH 2/8] xen: make GUEST_HANDLE_64() and uint64_aligned_t available everywhere David Vrabel
2013-02-21 17:48 ` [PATCH 3/8] kexec: add public interface for improved load/unload sub-ops David Vrabel
2013-02-21 22:29 ` Daniel Kiper
2013-02-22 11:49 ` David Vrabel
2013-02-22 8:33 ` [Xen-devel] " Jan Beulich
2013-02-22 11:50 ` David Vrabel
2013-02-22 13:09 ` Jan Beulich
2013-03-08 10:50 ` Daniel Kiper
2013-03-08 11:52 ` David Vrabel
2013-03-08 12:28 ` Daniel Kiper
2013-03-08 12:36 ` [Xen-devel] " Jan Beulich
2013-03-08 15:34 ` Daniel Kiper
2013-02-21 17:48 ` [PATCH 4/8] kexec: add infrastructure for handling kexec images David Vrabel
2013-03-08 11:37 ` Daniel Kiper
2013-03-08 11:42 ` David Vrabel
2013-03-08 11:58 ` Daniel Kiper
2013-02-21 17:48 ` [PATCH 5/8] kexec: extend hypercall with improved load/unload ops David Vrabel
2013-02-21 22:41 ` Daniel Kiper
2013-02-22 8:42 ` [Xen-devel] " Jan Beulich
2013-02-22 11:54 ` David Vrabel
2013-02-22 13:11 ` Jan Beulich
2013-03-08 11:23 ` Daniel Kiper
2013-03-08 11:40 ` David Vrabel
2013-03-08 12:21 ` Daniel Kiper
2013-03-08 14:01 ` David Vrabel
2013-03-08 15:23 ` Daniel Kiper
2013-03-08 17:29 ` [Xen-devel] " Andrew Cooper
2013-03-08 21:45 ` Daniel Kiper
2013-03-08 23:38 ` Andrew Cooper
2013-03-11 11:17 ` Daniel Kiper
2013-03-11 13:21 ` David Vrabel
2013-03-11 13:30 ` Daniel Kiper
2013-03-11 13:43 ` David Vrabel
2013-03-11 14:13 ` Daniel Kiper
2013-03-11 14:27 ` Andrew Cooper [this message]
2013-03-11 20:45 ` Daniel Kiper
2013-03-11 21:18 ` Andrew Cooper
2013-03-12 11:17 ` Daniel Kiper
2013-03-12 11:36 ` Daniel Kiper
2013-02-21 17:48 ` [PATCH 6/8] xen: kexec crash image when dom0 crashes David Vrabel
2013-02-21 17:48 ` [PATCH 7/8] libxc: add hypercall buffer arrays David Vrabel
2013-03-06 14:25 ` [Xen-devel] " Ian Jackson
2013-03-07 2:44 ` Ian Campbell
2013-02-21 17:48 ` [PATCH 8/8] libxc: add API for kexec hypercall David Vrabel
2013-03-07 2:46 ` [Xen-devel] " Ian Campbell
2013-02-21 22:47 ` [PATCH 0/8] kexec: extended kexec hypercall for use with pv-ops kernels Daniel Kiper
2013-02-22 8:17 ` [Xen-devel] " Jan Beulich
2013-02-22 11:56 ` David Vrabel
2013-02-26 13:58 ` Don Slutz
2013-03-05 11:04 ` David Vrabel
-- strict thread matches above, loose matches on Subject: below --
2013-04-16 17:13 [PATCHv4 0/8] kexec: extend " David Vrabel
2013-04-16 17:13 ` [PATCH 5/8] kexec: extend hypercall with improved load/unload ops David Vrabel
2013-04-17 8:55 ` [Xen-devel] " Jan Beulich
2013-04-17 10:11 ` David Vrabel
2013-04-17 10:20 ` Jan Beulich
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=513DE9CE.9050303@citrix.com \
--to=andrew.cooper3@citrix.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