From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Elena Ufimtseva <elena.ufimtseva@oracle.com>,
Ian Campbell <ian.campbell@citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Tim Deegan <tim@xen.org>, Jan Beulich <JBeulich@suse.com>,
xen-devel <xen-devel@lists.xenproject.org>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>
Subject: Re: [Draft A] Boot ABI for HVM guests without a device-model
Date: Thu, 11 Jun 2015 10:31:31 +0200 [thread overview]
Message-ID: <55794763.8010401@citrix.com> (raw)
In-Reply-To: <5578ACA4.9050403@citrix.com>
El 10/06/15 a les 23.31, Andrew Cooper ha escrit:
> On 10/06/2015 19:55, Konrad Rzeszutek Wilk wrote:
>>> All other processor registers and flag bits are undefined. The OS is in
>>> charge of setting up it's own stack, GDT and IDT.
>>>
>>> Note that the boot protocol resembles the multiboot1 specification,
>>> this is done so OSes with multiboot1 entry points can reuse those if
>>> desired. Also note that the processor starts with paging disabled,
>>> which means that all the memory addresses in the start_info page will
>>> be physical memory addresses.
>> Wow?! Pagetables disabled?! Why? Usually boot loaders start with some
>> pagetables setup for the OS - to cover at least the kernel and the
>> ramdisk. Either it being in 1-1 pagetables or such.
>>
>> Why make this work harder for the guest?
>> Why can't the hypervisor setup most of these things for the guest?
>
> If you start with paging enabled, the domain builder has to know the
> intended runmode and paging details a priori.
That's not 100% true, since we agreed to always launch the guest in
32bit protected mode we could create some simple 32bit page tables
without PAE.
IMHO it's not worth it, it's very unlikely that the page tables we build
are going to be suitable for the guest OS, so the guest needs to build
it's own page tables anyway.
>>From a 32bit flat entry, it is 0x40 bytes worth of instructions for
> 32bit, or 0x4f bytes worth of instructions for 64bit to get set up in
> the desired paging mode, with a usable stack (and I could definitely
> reduce those numbers, at the expense of readability). (TODO - find
> enough free time to finish the test framework and publish it.) The
> point is that it is not hard at all, but offers substantially more
> flexibility to both host and guest software.
I have the following trampoline which seems to work fine on a FreeBSD
64bit kernel (which is an ELF64 binary itself):
https://people.freebsd.org/~royger/xen-locore32.S
(I've also hacked the HVM builder code in libxc in order to load a
kernel directly instead of the hvmloader image, but that's too dirty to
post here).
Roger.
next prev parent reply other threads:[~2015-06-11 8:31 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-10 12:34 [Draft A] Boot ABI for HVM guests without a device-model Roger Pau Monné
2015-06-10 13:15 ` Jan Beulich
2015-06-10 14:53 ` Roger Pau Monné
2015-06-10 15:53 ` Jan Beulich
2015-06-10 15:42 ` Roger Pau Monné
2015-06-11 11:01 ` Tim Deegan
2015-06-10 13:18 ` Andrew Cooper
2015-06-10 15:38 ` Roger Pau Monné
2015-06-10 15:57 ` Andrew Cooper
2015-06-11 8:23 ` Roger Pau Monné
2015-06-10 18:55 ` Konrad Rzeszutek Wilk
2015-06-10 21:31 ` Andrew Cooper
2015-06-11 8:31 ` Roger Pau Monné [this message]
2015-06-11 7:18 ` Jan Beulich
2015-06-12 13:30 ` Konrad Rzeszutek Wilk
2015-06-11 8:43 ` Roger Pau Monné
2015-06-12 13:23 ` Konrad Rzeszutek Wilk
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=55794763.8010401@citrix.com \
--to=roger.pau@citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=elena.ufimtseva@oracle.com \
--cc=ian.campbell@citrix.com \
--cc=konrad.wilk@oracle.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xenproject.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.