From: "Roger Pau Monné" <roger.pau@citrix.com>
To: 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>,
Andrew Cooper <andrew.cooper3@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:43:08 +0200 [thread overview]
Message-ID: <55794A1C.9040902@citrix.com> (raw)
In-Reply-To: <20150610185533.GA4214@l.oracle.com>
El 10/06/15 a les 20.55, Konrad Rzeszutek Wilk ha escrit:
> On Wed, Jun 10, 2015 at 02:34:00PM +0200, Roger Pau Monné wrote:
>> Hello,
>>
>> The discussion in [1] lead to an agreement of the missing pieces in PVH
>> (or HVM without a device-model) in order to progress with it's
>> implementation.
>>
>> One of the missing pieces is a new boot ABI, that replaces the PV boot
>> ABI. The aim of this new boot ABI is to remove the limitations of the
>
> To be fair, there is an existing boot ABI.
>
> It is the same as the PV boot but since it is an PV autotranslated
> guest some of the values that an PV guest require are undefined.
>
> With that in mind, why cannot we re-use that (xen_start_info) and
> any field which is PV specific can be treated as reserved?
IMHO I would rather get rid of start_info and fetch everything using
HVMPARAMS instead, this is more similar to what ARM guests already do.
This means we can get rid of start_info in the long run, and that we
don't paint ourselves into a corner, HVMPARAMS can always be expanded
without problems.
>> PV boot ABI, that are no longer present when using auto-translated
>> guests. The new boot protocol should allow to use the same entry point
>> for both 32bit and 64bit guests, and let the guest choose it's bitness
>> at run time without the domain builder knowing in advance.
>
> I like that idea, but that will make the work going forward
> on the 32-bit PVH and AMD PVH move out at least another half year
> - which is rather sad.
>
> Also this change will require modifying the Linux 64-bit PVH
> part. That should be mentioned - and that is likely going to
> take also three months.
>
>
>>
>> Roger.
>>
>> [1] http://lists.xen.org/archives/html/xen-devel/2015-06/msg00258.html
>>
>> ---
>> HVM direct boot ABI
>>
>> Since the Xen entry point into the kernel can be different from the
>> native entry point, ELFNOTES are used in order to tell the domain
>> builder how to load and jump into the kernel entry point. At least the
>> following ELFNOTES are required in order to use this boot ABI:
>>
>> ELFNOTE(Xen, XEN_ELFNOTE_GUEST_OS, .asciz, "FreeBSD")
>> ELFNOTE(Xen, XEN_ELFNOTE_GUEST_VERSION, .asciz, __XSTRING(__FreeBSD_version))
>> ELFNOTE(Xen, XEN_ELFNOTE_XEN_VERSION, .asciz, "xen-3.0")
>> ELFNOTE(Xen, XEN_ELFNOTE_PADDR_OFFSET, .quad, KERNBASE)
>> ELFNOTE(Xen, XEN_ELFNOTE_PADDR_ENTRY, .quad, xen_start32)
>> ELFNOTE(Xen, XEN_ELFNOTE_FEATURES, .asciz, "writable_descriptor_tables|auto_translated_physmap|supervisor_mode_kernel|hvm_callback_vector")
>
> That will choke on older hypervisors. That is a normal PV
> guest won't boot anymore. That is because the older hypervisors
> will choke on 'hvm_callback_vector' being in the XEN_ELFNOTE_FEATURES.
I see, this is what FreeBSD currently uses. We are going to choke on
older hypervisors anyway, since FreeBSD only supports PVH.
> You have to stick that in XEN_ELFNOTE_SUPPORTED_FEATURES field.
>
>> ELFNOTE(Xen, XEN_ELFNOTE_LOADER, .asciz, "generic")
>>
>> The first three notes contain information about the guest kernel and
>> the Xen hypercall ABI version. The following notes are of special
>> interest:
>>
>> * XEN_ELFNOTE_PADDR_OFFSET: the offset of the ELF paddr field from the
>> actual required physical address.
>> * XEN_ELFNOTE_PADDR_ENTRY: the 32bit entry point into the kernel.
>
> Is 'P' suppose to be 'physical' ?
>
> I am not sure how this will work with an ELF 64-bit binary like
> the Linux kernel. Usually we use the virtual address but with
> us starting in 32-bit mode with an 64-bit virtual address won't work.
That's why we are defining a new entry point instead of reusing the
current XEN_ELFNOTE_ENTRY note. This entry point is expected to be a
32bit physical address.
> But the ELF loader could figure out the offset of the virtual
> address from the ELF starting point and just call at the delta - in
> which case having XEN_ELFNOTE_ENTRY can be used with the
> understanding that we will just call at that that offset.
I'm not following you here, I don't think it's possible to reuse the
same entry point, that's why this new ELFNOTE is proposed.
Roger.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2015-06-11 8:43 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é
2015-06-11 7:18 ` Jan Beulich
2015-06-12 13:30 ` Konrad Rzeszutek Wilk
2015-06-11 8:43 ` Roger Pau Monné [this message]
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=55794A1C.9040902@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.