xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <mcgrof@suse.com>
To: George Dunlap <george.dunlap@citrix.com>
Cc: "Matt Fleming" <matt@codeblueprint.co.uk>,
	jeffm@suse.com, "Michael Chang" <MChang@suse.com>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Jim Fehlig" <jfehlig@suse.com>,
	"Jan Beulich" <JBeulich@suse.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	"Daniel Kiper" <daniel.kiper@oracle.com>,
	"the arch/x86 maintainers" <x86@kernel.org>,
	"Takashi Iwai" <tiwai@suse.de>,
	"Vojtěch Pavlík" <vojtech@suse.cz>, "Gary Lin" <GLin@suse.com>,
	xen-devel <xen-devel@lists.xenproject.org>,
	"Jeffrey Cheung" <JCheung@suse.com>,
	"Juergen Gross" <jgross@suse.com>,
	"Stefano Stabellini" <stefano.stabellini@eu.citrix.com>,
	joeyli <jlee@suse.com>, "Borislav Petkov" <bp@alien8.de>,
	"Boris Ostrovsky" <boris.ostrovsky@oracle.com>,
	"Charles Arndol" <carnold@suse.com>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Julien Grall" <julien.grall@arm.com>,
	"Andy Lutomirski" <luto@amacapital.net>
Subject: Re: HVMLite / PVHv2 - using x86 EFI boot entry
Date: Thu, 7 Apr 2016 20:51:48 +0200	[thread overview]
Message-ID: <20160407185148.GL1990__34848.1360510506$1460055190$gmane$org@wotan.suse.de> (raw)
In-Reply-To: <CAFLBxZbRjB6QWH5GbG6osCXat9NQVUAyDYrAMrdALbCofpX3Dg@mail.gmail.com>

On Wed, Apr 06, 2016 at 12:07:36PM +0100, George Dunlap wrote:
> On Wed, Apr 6, 2016 at 3:40 AM, Luis R. Rodriguez <mcgrof@kernel.org> wrote:
> > A huge summary of the discussion over EFI boot option for HVMLite is now on a
> > wiki [2], below I'll just provide the outline of the discussion. Consider this a
> > request for more public review, feel free to take any of the items below and
> > elaborate on it as you see fit.
> [snip]
> >   * Issues with boot x86 boot entries
> >     * Small x86 zero page stubs
> [snip]
> >   * Points against using EFI
> >     * Nulling the claimed boot loader effect
> 
> I'm a bit confused about this. You list exactly two arguments against
> the proposed stub in the "con" section:
> 1. Bootloaders may not be able to use the extra entry point
> 2. It's an extra entry point
> 
> And then later, in another section, you actually list the reason #1 is
> irrelevant: bootloaders don't matter because the stub is there to boot
> from the Xen hypervisor.

Forgive me, the private thread was ongoing and I really wanted to capture
both sides of the expressed arguments and move to the list any extensions
to the discussion, this meant annotating both positions and letting
others fill in the gaps to determine if in fact one position was really
nullified by the other.

First I should state that it is only natural for anyone sensible to have
any type of knee-jerk reaction to kick and scream about the idea of
adding yet a new x86 entry point for Linux... IMO one should not expect
it to be sensible to simply accept yet-another-entry-point to Linux,
rather is should be the expected behaviour to have people really dig
and ensure they did their homework to ensure that if they are going to
add yet-another-entry-point they really validate and have exhausted
review of all possible avenues.

It was Andrew Coopers's position that boot loaders would not need to be
involved, and that would seem to nullify Matt's original position on this.

While Andrew's position is right in that perhaps only Xen tools have to deal
with the HVMLite specific entry, it would also still mean diverging from ARM's
own EFI entry only position, which I'd like to clarify that ARM has no custom
Xen entry, we should strive to match that. Anything far from that to me really
deserves an explanation, specially if we are going to argue that HVMLite is
the best that x86 Xen can do.

Ultimately unifying entry approaches for Xen in a streamlined fashion seems
like a sensible thing to strive for. Anything we push in the other direction,
as small as it can be, should deserve at least a 'hey, wait a minute'...

> So the only actual argument you have against the proposed PVH stub in
> the linked document is that it's an extra entry point.

Then you have not really read the document well, more to the point,
EFI's entry already does what the small HVMLite stub does, already
provides an existing entry and path to the kernel, so why should we
add yet another small stub?

So more to it, if the EFI entry already provides a way into Linux
in a more streamlined fashion bringing it closer to the bare metal
boot entry, why *would* we add another boot entry to x86, even if
its small and self contained ?

Another position against small stubs which I listed myself is that we may need
more semantics for early boot even if the new HVMLite small stub is added. This
remains to be seen. If we are going to add new semantics, it would seem best to
use something more standard like EFI configuration tables rather than hack on
to x86 further custom semantics. Custom sloppy semantics have proven to be
misused, and were ultimately a sloppy mess. To take this further,
virtualization semantics are being abused even outside of Xen -- drivers
developers may think that just because some semantics are available they can
use them to customize drivers to fine tune them for virtualized environments.
Even the best of our folks have taken positions to claim certain hacks are
*impossible* to change [0], when in fact only 4 days later a completely sensible
replacement was found [1], and this as even outside of Xen's situation, so its
not only Xen I am careful over here with regards to semantics. If we need early
boot code semantics or general kernel semantics for virtualization I want to
address that now and I want to be very careful with that given the abuse.
I'm doing my part to ensure that we clarify sloppy old semantics on Xen [2],
and this effort is actually proving to even pave the path for HVMLite, for
instance consider the gains of leveraging use of the legacy devices struct
in the future for ACPI_FADT_NO_VGA now, which HVMLite's specification seems
to annotate it will use. Clearing out the paravirt_enabled() hack for
pnpbios helped push for a right architectural solution to pave the path
for this in generic fashion.

[0] http://lkml.kernel.org/r/s5hvb4151v1.wl-tiwai@suse.de
[1] https://www.spinics.net/lists/alsa-devel/msg48627.html
[2] http://lkml.kernel.org/r/1459987594-5434-1-git-send-email-mcgrof@kernel.org

> 
> >   * Why use EFI for HVMlite
> >     * EFI calling conventions are standardized
> >     * EFI entry generalizes what new HVMLite entry proposes
> >     * Further semantics may be needed
> >     * Match Xen ARM's clean solution
> >     * You don't need full EFI emulation
> >       * Minimal EFI stubs for guests
> >         * GetMemoryMap()
> >         * ExitBootServices()
> >       * EFI stubs which may be needed for guests
> >         * Exit()
> >         * Variable operation functions
> >       * EFI stubs not needed for guests
> >         * GetTime()/SetTime()
> >         * SetVirtualAddressMap()
> >         * ResetSystem()
> >       * dom0 EFI
> >       * domU EFI emulation possibilities
> >         * Xen implements its own EFI environment for guests
> >         * Xen uses Tianocore / OVMF
> 
> So rather than make a new entry point which does just the minimal
> amount of work to run on a software interface (Xen), you want to take
> an interface designed for hardware (EFI) and put in hacks so that it
> knows that sometimes some EFI services are not available? 

The purpose of the discussion is to evaluate the EFI entry as a possible
alternative candidate to yet another entry point, from a completely engineering
neutral position.

> That sounds like it's going to make the EFI path just as unmanageable as the
> current PV path.

Can you describe how?

> Using the EFI entry point would certainly make sense if it was
> actually simpler than the proposed extra entry point.  But it sounds
> like it's going to be more complicated, not only for Xen, but also for
> Linux.

How so? Please provide specifics.

  Luis

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  parent reply	other threads:[~2016-04-07 18:51 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20160406024027.GX1990@wotan.suse.de>
2016-04-06  9:40 ` HVMLite / PVHv2 - using x86 EFI boot entry David Vrabel
2016-04-06 11:07 ` George Dunlap
2016-04-06 11:11 ` Daniel Kiper
     [not found] ` <CAFLBxZbRjB6QWH5GbG6osCXat9NQVUAyDYrAMrdALbCofpX3Dg@mail.gmail.com>
2016-04-06 15:02   ` Matt Fleming
2016-04-07 18:51   ` Luis R. Rodriguez [this message]
     [not found]   ` <20160406150240.GO2701@codeblueprint.co.uk>
2016-04-06 16:05     ` Konrad Rzeszutek Wilk
2016-04-06 16:23       ` Konrad Rzeszutek Wilk
2016-04-08 21:53         ` Luis R. Rodriguez
2016-04-13 10:03     ` Roger Pau Monné
     [not found]     ` <20160413100312.647eocdtbmak4btk@mac>
2016-04-13 10:21       ` Matt Fleming
     [not found]   ` <20160407185148.GL1990@wotan.suse.de>
2016-04-08 14:16     ` George Dunlap
     [not found]     ` <5707BD2E.20204@citrix.com>
2016-04-08 21:58       ` Luis R. Rodriguez
     [not found]       ` <20160408215854.GU1990@wotan.suse.de>
2016-04-12 22:12         ` Luis R. Rodriguez
2016-04-13  9:54         ` Roger Pau Monné
     [not found]         ` <20160412221225.GN1990@wotan.suse.de>
2016-04-13 10:05           ` George Dunlap
2016-04-13 10:25           ` Roger Pau Monné
     [not found]           ` <CAFLBxZbiGppNad=Z6-fLgx89O0yAFrSyARTCwv=vHBR3zJ=NsA@mail.gmail.com>
2016-04-13 18:54             ` Luis R. Rodriguez
     [not found]             ` <20160413185451.GY1990@wotan.suse.de>
2016-04-14  9:42               ` George Dunlap
     [not found]               ` <570F65F7.5050108@citrix.com>
2016-04-14 19:59                 ` Luis R. Rodriguez
     [not found]           ` <20160413102156.b4qwhwbqvnnpmxgw@mac>
2016-04-13 19:10             ` Luis R. Rodriguez
     [not found]         ` <20160413095428.5mcbrimvc6vxffcw@mac>
2016-04-13 18:50           ` Luis R. Rodriguez
     [not found]           ` <20160413185010.GX1990@wotan.suse.de>
2016-04-13 19:02             ` Konrad Rzeszutek Wilk
2016-04-13 19:14               ` Luis R. Rodriguez
     [not found]               ` <20160413191408.GA1990@wotan.suse.de>
2016-04-13 19:22                 ` Konrad Rzeszutek Wilk
2016-04-13 20:01                   ` Luis R. Rodriguez
     [not found]                   ` <20160413200118.GC1990@wotan.suse.de>
2016-04-13 20:11                     ` Konrad Rzeszutek Wilk
2016-04-13 20:35                       ` Luis R. Rodriguez
     [not found]                       ` <CAB=NE6VdTB1Bc=c0oCd_tTHpwwkQcxhnOFdcLfck2jX=JjuOAQ@mail.gmail.com>
2016-04-13 20:48                         ` Konrad Rzeszutek Wilk
2016-04-14 10:13                 ` George Dunlap
2016-04-13 15:44     ` George Dunlap
     [not found]     ` <CAFLBxZbJ4QyJQ1-ZuXg_Q-9YNXnWzDyPNp4SX=d9g0DS8mJKaw@mail.gmail.com>
2016-04-13 19:52       ` Luis R. Rodriguez
     [not found]       ` <20160413195257.GB1990@wotan.suse.de>
2016-04-14  9:53         ` George Dunlap
     [not found]         ` <570F68AB.2040400@citrix.com>
2016-04-14 19:44           ` Luis R. Rodriguez
     [not found]           ` <20160414194408.GP1990@wotan.suse.de>
2016-04-14 20:38             ` Konrad Rzeszutek Wilk
     [not found]             ` <20160414203847.GB21657@localhost.localdomain>
2016-04-14 21:12               ` Luis R. Rodriguez
     [not found]               ` <20160414211201.GS1990@wotan.suse.de>
2016-04-15  2:14                 ` Konrad Rzeszutek Wilk
2016-04-15  5:50             ` Juergen Gross
2016-04-15  9:59             ` George Dunlap
     [not found]             ` <57108121.1070307@suse.com>
2016-04-15 15:24               ` Luis R. Rodriguez
     [not found]             ` <5710BB74.2060409@citrix.com>
2016-04-15 15:30               ` Luis R. Rodriguez
     [not found]               ` <20160415153028.GX1990@wotan.suse.de>
2016-04-15 16:03                 ` George Dunlap
     [not found]                 ` <571110BB.2000408@citrix.com>
2016-04-15 17:17                   ` Luis R. Rodriguez
     [not found] ` <5704D978.1050101@citrix.com>
2016-04-08 20:40   ` Luis R. Rodriguez
     [not found]   ` <20160408204032.GR1990@wotan.suse.de>
2016-04-11  5:12     ` Juergen Gross
     [not found]     ` <570B3228.90400@suse.com>
2016-04-12 21:02       ` Andy Lutomirski
     [not found]       ` <CALCETrXvGR3XKJf5Ab_ZPc-iuNuzR8AzLpRBciemKz4r0vSrGA@mail.gmail.com>
2016-04-13  9:02         ` Roger Pau Monné
     [not found]         ` <20160413090202.bg2vfdl3iol7eedv@mac>
2016-04-13 10:15           ` Matt Fleming
     [not found]           ` <20160413101515.GJ2829@codeblueprint.co.uk>
2016-04-13 10:40             ` Matt Fleming
2016-04-13 11:12             ` George Dunlap
2016-04-13 11:59             ` Roger Pau Monné
     [not found]             ` <20160413115846.hyt4lg24rfkenbxu@mac>
2016-04-15 22:53               ` Matt Fleming
2016-04-13 18:29       ` Luis R. Rodriguez
     [not found]       ` <20160413182951.GW1990@wotan.suse.de>
2016-04-13 18:56         ` Konrad Rzeszutek Wilk
2016-04-13 20:40           ` Luis R. Rodriguez
     [not found]           ` <20160413204055.GD1990@wotan.suse.de>
2016-04-13 21:08             ` Konrad Rzeszutek Wilk
2016-04-13 22:23               ` Luis R. Rodriguez
     [not found]               ` <20160413222317.GH1990@wotan.suse.de>
2016-04-14  1:01                 ` Konrad Rzeszutek Wilk
     [not found]                 ` <20160414010131.GA21510@localhost.localdomain>
2016-04-14 18:40                   ` Luis R. Rodriguez
     [not found]                   ` <20160414184048.GM1990@wotan.suse.de>
2016-04-14 19:56                     ` Konrad Rzeszutek Wilk
2016-04-14 20:56                       ` Luis R. Rodriguez
     [not found]                       ` <20160414205619.GR1990@wotan.suse.de>
2016-04-15  2:02                         ` Konrad Rzeszutek Wilk
2016-04-15 10:06                         ` Julien Grall
     [not found]                         ` <5710BD0B.2070306@arm.com>
2016-04-15 14:55                           ` Luis R. Rodriguez
     [not found]                           ` <CAB=NE6UDuLOnW8xfTcgCGSbJ1aS4TkkokcGdeJGHMBps0T9=Sg@mail.gmail.com>
2016-04-15 18:44                             ` Stefano Stabellini
     [not found]                         ` <20160415020246.GA6956@localhost.localdomain>
2016-04-15 17:08                           ` Luis R. Rodriguez
     [not found] ` <20160406111130.GG3489@olila.local.net-space.pl>
2016-04-07 19:12   ` Luis R. Rodriguez
2016-04-09 17:02   ` Luis R. Rodriguez
2016-04-06  2:40 Luis R. Rodriguez

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='20160407185148.GL1990__34848.1360510506$1460055190$gmane$org@wotan.suse.de' \
    --to=mcgrof@suse.com \
    --cc=GLin@suse.com \
    --cc=JBeulich@suse.com \
    --cc=JCheung@suse.com \
    --cc=MChang@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=bp@alien8.de \
    --cc=carnold@suse.com \
    --cc=daniel.kiper@oracle.com \
    --cc=george.dunlap@citrix.com \
    --cc=hpa@zytor.com \
    --cc=jeffm@suse.com \
    --cc=jfehlig@suse.com \
    --cc=jgross@suse.com \
    --cc=jlee@suse.com \
    --cc=julien.grall@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=matt@codeblueprint.co.uk \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=tiwai@suse.de \
    --cc=vojtech@suse.cz \
    --cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).