From: Anthony PERARD <anthony.perard@citrix.com>
To: Laszlo Ersek <lersek@redhat.com>
Cc: <edk2-devel@ml01.01.org>,
Jordan Justen <jordan.l.justen@intel.com>,
<xen-devel@lists.xen.org>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>,
"Gary Ching-Pang Lin" <glin@suse.com>
Subject: Re: OVMF for Xen PVH
Date: Tue, 13 Sep 2016 14:46:24 +0100 [thread overview]
Message-ID: <20160913134624.GA1839@perard.uk.xensource.com> (raw)
In-Reply-To: <f5e03398-33ca-c90d-743f-691d927657d3@redhat.com>
On Thu, Sep 08, 2016 at 12:24:46PM +0200, Laszlo Ersek wrote:
> On 09/08/16 11:38, Anthony PERARD wrote:
> > Hello,
> >
> > We are introducing a new virtualisation mode in Xen called PVHv2 (also
> > called hvmlite in the past). We would like to have a UEFI firmware
> > running on it to make it easier to start a guest. (Right now, I think it
> > involves supplying the guest kernel to the guest config, like a PV
> > guest.)
> >
> > I'm exploring different possibility of what could be done, and what
> > should be avoided. It would be nice to have only one binary for both
> > PVHv2 guest and HVM guest.
> >
> > Would it be possible to introduce a different entry point in OVMF? The
> > current one cannot be used at the start of the day of a PVHv2 guest.
> >
> > If not, we'll try to use the current entry point or create a new package
> > like it has been done for Xen on ARM.
> >
> > Thanks for any feedback,
> >
>
> I've been thinking about having a shared OVMF binary for Xen and
> QEMU/KVM (from a different perspective), and I did recall that ArmVirt
> has separate platform DSCs / FDFs for Xen and QEMU.
Right now, I can already use the same OVMF binary for both KVM and Xen
HVM on x86.
> The question that made me think about this is the number and size of
> modules that we now build into the OVMF binary. The binary has been
> continuously growing (internally), and while Ard did some fantastic work
> on enabling -Os for a bunch of edk2 compilers and platforms, the
> compressed size (= the ultimate utilization of the flash chip) has not
> gone down significantly, if I recall correctly.
>
> Growing the non-compressed DXEFV (which -Os mitigates significantly) is
> not terribly hard, as long as we don't outgrow OVMF_CODE.fd (1920 KB),
> i.e., the external thingy after compression. Outgrowing OVMF_CODE.fd
> might be major pain for distros however, so I've been thinking about
> trimming the builds statically.
>
> There's some low hanging fruit for that; for example the virtio drivers
> should only go into the qemu/KVM build, same for the SMM driver stack,
> same for the pflash driver. Whereas the XenPV drivers, the FS-based
> varstore emulation, etc should go only into the Xen build.
>
> So, from this (independent) POV, I'd prefer separate builds for Xen and
> qemu/KVM.
Yes, that might be an issue. We are going to need an extra module for
PV network if we want to boot from network in an environment where
there is no QEMU, so no emulated NIC.
> Regarding the entry point itself, the SMM work has complicated those
> early (= SEC / PEI) modules quite a bit (for example, grep OvmfPkg for
> "PcdSmmSmramRequire"). I think if you start with a separate platform,
> that will make your work easier (giving you more freedom in
> accommodating both PVHv2 and HVM, without regard to qemu/KVM), and allow
> me to keep my sanity -- think regressions, reviews, etc :)
>
> Here's another point I've been thinking about, on-and-off: I find it
> regrettable that we don't have any official co-maintainer in
> Maintainers.txt for OvmfPkg's Xen parts. We've regressed Xen a few times
> in the past because none of the OvmfPkg co-maintainers run Xen. This
> should certainly be fixed.
Well, we do have our CI loop (osstest) running upstream OVMF with Xen,
but it still needs someone to look at the result. I usually try to keep
an eye on them.
> Now, if you create a new platform (DSC + FDF) for Xen, that sort of
> forces someone from the Xen community to assume co-maintainership for
> the Xen bits. (Hopefully those bits would be easily identifiable by
> pathname.) I'd welcome that *very much*.
>
> So, I prefer a separate platform. I'd suggest to extract the Xen
> platform with the current functionality first (with all those additional
> benefits), then rework the new Xen platform to accommodate PVHv2 as well
> (possibly with different Sec / PlatformPei modules etc).
>
> Do wait for feedback from Jordan please.
I'll wait.
Thanks,
--
Anthony PERARD
prev parent reply other threads:[~2016-09-13 13:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-08 9:38 OVMF for Xen PVH Anthony PERARD
2016-09-08 10:24 ` Laszlo Ersek
2016-09-13 13:46 ` Anthony PERARD [this message]
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-list 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=20160913134624.GA1839@perard.uk.xensource.com \
--to=devel@edk2.groups.io \
/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