All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Boris Ostrovsky <boris.ostrovsky@oracle.com>, maran.wilson@oracle.com
Cc: "Juergen Gross" <jgross@suse.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	"The development of GNU GRUB" <grub-devel@gnu.org>,
	"Daniel Kiper" <daniel.kiper@oracle.com>,
	xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [Xen-devel] Xen PVH support in grub2
Date: Thu, 9 Nov 2017 00:01:49 -0500	[thread overview]
Message-ID: <20171109050149.GC13715@char.us.oracle.com> (raw)
In-Reply-To: <f35cbf85-1d03-89b1-46de-60a881327dd2@oracle.com>

On Tue, Nov 07, 2017 at 11:10:29AM -0500, Boris Ostrovsky wrote:
> On 11/07/2017 02:42 AM, Juergen Gross wrote:
> > On 06/11/17 17:42, Boris Ostrovsky wrote:
> >> On 11/06/2017 10:05 AM, Juergen Gross wrote:
> >>> On 06/11/17 15:51, Boris Ostrovsky wrote:
> >>>> On 11/06/2017 02:16 AM, Juergen Gross wrote:
> >>>>> On 03/11/17 20:00, Boris Ostrovsky wrote:
> >>>>>> On 11/03/2017 02:40 PM, Juergen Gross wrote:
> >>>>>>> On 03/11/17 19:35, Boris Ostrovsky wrote:
> >>>>>>>> On 11/03/2017 02:23 PM, Juergen Gross wrote:
> >>>>>>>>> On 03/11/17 19:19, Boris Ostrovsky wrote:
> >>>>>>>>>> On 11/03/2017 02:05 PM, Juergen Gross wrote:
> >>>>>>>>>>> So again the question: how to tell whether we are PVH or HVM in
> >>>>>>>>>>> init_hypervisor_platform()? ACPi tables are scanned way later...
> >>>>>>>>>> Can we make grub/OVMF append a boot option?
> >>>>>>>>>>
> >>>>>>>>>> Or set setup_header.hardware_subarch to something? We already have
> >>>>>>>>>> X86_SUBARCH_XEN but it is only used by PV.  Or we might be able to use
> >>>>>>>>>> hardware_subarch_data (will need to get a buy-in from x86 maintainers, I
> >>>>>>>>>> think).
> >>>>>>>>> But wouldn't this break the idea to reuse the native boot paths in
> >>>>>>>>> grub/OVMF without further modifications?
> >>>>>>>> WDYM? We will have to have some sort of a plugin in either one to build
> >>>>>>>> the zeropage anyway. So we'd set hardware_subarch there, in addition to
> >>>>>>>> other things like setting memory and such.
> >>>>>>> But isn't the zeropage already being built? I admit that setting subarch
> >>>>>>> isn't a big deal, but using another entry with a passed-through pvh
> >>>>>>> start struct isn't either...
> >>>>>> I don't follow, sorry. My understanding is that zeropage will be built
> >>>>>> by PVH-enlightened grub so part of this process would be setting the
> >>>>>> subarch bit.
> >>>>> My reasoning was based on Roger's remark:
> >>>>>
> >>>>> "OTOH if Linux is capable of booting from the native entry point inside
> >>>>> of a PVH container, we would only have to port OVMF and grub in order
> >>>>> to work inside of a PVH container, leaving the rest of the logic
> >>>>> untouched."
> >>>> Right, and in my mind porting OVMF/grub includes creating proper zeropage.
> >>> Aah, okay. I reasoned on the assumption to just enable OVMF/grub to run
> >>> in PVH environment without touching the parts setting up anything for
> >>> the new kernel.
> >> Someone needs to do what xen_prepare_pvh() does.
> > As the loader is filling in the memory map information 
> 
> That's the thing that I thought may need to be done by us (setting
> commandline too) . But I haven't looked at Xen support in grub so maybe
> it's already there.
> 
> > the only thing
> > remaining would be setting xen_pvh. And this could be delayed as my test
> > have shown, so we only need to detect the PVH case from inside the
> > kernel. One possibility would be the flags in the ACPI FADT table as
> > Roger mentioned, another idea would be a flag in zeropage set by the
> > loader.
> >
> >> And, for 64-bit, we also may need to build early pagetables since
> >> startup_64() (unlike startup_32()) expects paging to be on. (I don't
> >> know whether this is already part of standard FW codepath)
> > This would be done the same way as for a native kernel.
> 
> This is done by Linux trampoline code. AFAIK grub loads kernel in realmode.

Adding in Maran who is looking at re-using PVH for qemu launching
the kernels.

> 
> 
> -boris
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> https://lists.xen.org/xen-devel


  parent reply	other threads:[~2017-11-09  5:02 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-29 14:46 Xen PVH support in grub2 Juergen Gross
2017-09-29 15:07 ` George Dunlap
2017-09-29 15:07   ` [Xen-devel] " George Dunlap
2017-09-29 15:24 ` Roger Pau Monné
2017-09-29 15:24   ` [Xen-devel] " Roger Pau Monné
2017-09-29 15:33   ` Juergen Gross
2017-09-29 15:51     ` Roger Pau Monné
2017-09-29 15:51       ` [Xen-devel] " Roger Pau Monné
2017-09-29 17:02       ` Boris Ostrovsky
2017-09-29 17:02         ` [Xen-devel] " Boris Ostrovsky
2017-09-29 17:07         ` Roger Pau Monné
2017-09-29 17:07           ` [Xen-devel] " Roger Pau Monné
2017-09-29 17:22           ` Boris Ostrovsky
2017-09-29 17:22             ` [Xen-devel] " Boris Ostrovsky
2017-10-03  8:56             ` Roger Pau Monné
2017-10-03  8:56             ` [Xen-devel] " Roger Pau Monné
2017-10-03 12:47               ` Boris Ostrovsky
2017-10-03 12:47               ` Boris Ostrovsky
2017-11-03 12:00       ` Juergen Gross
2017-11-03 12:00         ` [Xen-devel] " Juergen Gross
2017-11-03 12:17         ` Roger Pau Monné
2017-11-03 12:17         ` [Xen-devel] " Roger Pau Monné
2017-11-03 12:50           ` Juergen Gross
2017-11-03 12:50           ` [Xen-devel] " Juergen Gross
2017-11-03 14:07             ` Roger Pau Monné
2017-11-03 14:24               ` Juergen Gross
2017-11-03 14:36                 ` Boris Ostrovsky
2017-11-03 14:36                   ` [Xen-devel] " Boris Ostrovsky
2017-11-03 14:59                   ` Juergen Gross
2017-11-03 15:10                     ` Boris Ostrovsky
2017-11-03 15:27                       ` Juergen Gross
2017-11-03 18:05                         ` Juergen Gross
2017-11-03 18:19                           ` Boris Ostrovsky
2017-11-03 18:19                           ` [Xen-devel] " Boris Ostrovsky
2017-11-03 18:23                             ` Juergen Gross
2017-11-03 18:35                               ` Boris Ostrovsky
2017-11-03 18:40                                 ` Juergen Gross
2017-11-03 19:00                                   ` Boris Ostrovsky
2017-11-03 19:00                                   ` [Xen-devel] " Boris Ostrovsky
2017-11-06  7:16                                     ` Juergen Gross
2017-11-06  7:16                                     ` [Xen-devel] " Juergen Gross
2017-11-06 14:51                                       ` Boris Ostrovsky
2017-11-06 14:51                                       ` [Xen-devel] " Boris Ostrovsky
2017-11-06 15:05                                         ` Juergen Gross
2017-11-06 16:42                                           ` Boris Ostrovsky
2017-11-07  7:42                                             ` Juergen Gross
2017-11-07  7:42                                             ` [Xen-devel] " Juergen Gross
2017-11-07 16:10                                               ` Boris Ostrovsky
2017-11-07 16:10                                               ` [Xen-devel] " Boris Ostrovsky
2017-11-09  5:01                                                 ` Konrad Rzeszutek Wilk
2017-11-09  5:01                                                 ` Konrad Rzeszutek Wilk [this message]
2017-11-06 16:42                                           ` Boris Ostrovsky
2017-11-06 15:05                                         ` Juergen Gross
2017-11-03 18:40                                 ` Juergen Gross
2017-11-03 18:35                               ` Boris Ostrovsky
2017-11-03 18:37                               ` Roger Pau Monné
2017-11-03 18:37                                 ` [Xen-devel] " Roger Pau Monné
2017-11-03 18:47                                 ` Juergen Gross
2017-11-03 18:47                                 ` Juergen Gross
2017-11-03 18:23                             ` Juergen Gross
2017-11-03 18:05                         ` Juergen Gross
2017-11-03 15:27                       ` Juergen Gross
2017-11-03 15:10                     ` Boris Ostrovsky
2017-11-03 14:59                   ` Juergen Gross
2017-11-03 14:24               ` Juergen Gross
2017-11-03 14:07             ` Roger Pau Monné
2017-11-06 11:36           ` [Xen-devel] " Juergen Gross
2017-11-07 14:49             ` Juergen Gross
2017-11-07 14:49             ` [Xen-devel] " Juergen Gross
2017-11-06 11:36           ` Juergen Gross
2017-09-29 15:33   ` Juergen Gross
2017-09-29 15:34   ` George Dunlap
2017-09-29 15:34     ` [Xen-devel] " George Dunlap

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=20171109050149.GC13715@char.us.oracle.com \
    --to=konrad.wilk@oracle.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=daniel.kiper@oracle.com \
    --cc=grub-devel@gnu.org \
    --cc=jgross@suse.com \
    --cc=maran.wilson@oracle.com \
    --cc=roger.pau@citrix.com \
    --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.