public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Laszlo Ersek" <lersek@redhat.com>
To: Rebecca Cran <rebecca@bsdio.com>,
	devel@edk2.groups.io, jiewen.yao@intel.com, "Justen,
	Jordan L" <jordan.l.justen@intel.com>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: Re: [edk2-devel] Adding Bhyve support into upstream EDK2
Date: Wed, 25 Mar 2020 01:04:59 +0100	[thread overview]
Message-ID: <e62078c1-f3ea-b216-385f-2030f95632be@redhat.com> (raw)
In-Reply-To: <e12909db-307d-f411-f4c3-edfa3f9b73e3@bsdio.com>

On 03/24/20 02:34, Rebecca Cran wrote:
> On 3/6/20 6:29 PM, Yao, Jiewen wrote:
>> Can you post the patch? :-)
> 
> Thanks, It's just about ready for review I think. There's perhaps a bit
> more deduplication between BhyvePkg and OvmfPkg to be done.
> 
> Since the patch is 1.7MB, I've uploaded it to
> https://bex.dev/bhyve-edk2-stable202002.diff .

Umm... :) This is way too large, I think.

Just because I indeed recommend creating a separate BhyvePkg, it's
really not advisable to create a complete copy of OvmfPkg, as first
step. I assume most modules can be reused from under OvmfPkg; can't they?

Consider for example ArmVirtPkg. The ArmVirtQemu DSC and FDF files refer
to a bunch of content that resides under OvmfPkg. That's what BhyvePkg
should do too:

- introduce its own DEC, DSC and FDF files,
- reuse everything possible verbatim from under OvmfPkg,
- if changes are necessary:
  - tweak existent OvmfPkg PCDs in the BhyvePkg DSC file,
  - introduce new library instances for library classes,
    and link those into OvmfPkg modules (and any other edk2 modules) via
    the BhyvePkg DSC file,
  - in the worst case, copy a *small* subset of OvmfPkg modules, and
    tweak the source under BhyvePkg.
- add totally BHYVE specific modules (drivers) under BhyvePkg.

Basically any given platform (DSC / FDF) is supposed to cherry-pick
whatever it can reuse from edk2 -- that's why edk2 is a "kit". And
virtual platforms are most welcome to depend on (consume modules from)
OvmfPkg.

Again, it's impossible to tell in advance, but in some cases, the tweaks
might be minimal enough to upstream them into OvmfPkg (conditionally on
a PCD, or conditionally on some small / easy runtime detection of
BHYVE). Then BhyvePkg only has to activate said PCD (or just rely on the
runtme detection). Again, there's no general rule; it depends on how
much the bhyve specifics would complicate the OvmfPkg code.

Thanks,
Laszlo


  reply	other threads:[~2020-03-25  0:05 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-06 16:09 Adding Bhyve support into upstream EDK2 Rebecca Cran
2020-03-06 19:54 ` Laszlo Ersek
2020-03-06 20:04   ` [edk2-devel] " Laszlo Ersek
2020-03-07  1:29 ` Yao, Jiewen
2020-03-24  1:34   ` Rebecca Cran
2020-03-25  0:04     ` Laszlo Ersek [this message]
2020-03-25 18:18       ` [EXTERNAL] " Bret Barkelew
2020-03-27 12:56         ` Laszlo Ersek
2020-03-25 18:50       ` Rebecca Cran
     [not found] ` <15F9E16A0219E7B7.19404@groups.io>
2020-03-07  1:43   ` Yao, Jiewen
2020-03-07  7:39     ` Laszlo Ersek
2020-03-07  7:52       ` Ard Biesheuvel
2020-03-08  2:40         ` Rebecca Cran
2020-03-09  6:08         ` Sean
2020-03-09 22:54           ` Laszlo Ersek
2020-03-09 23:17             ` Laszlo Ersek
2020-03-10  1:50               ` Sean
2020-03-10  9:05                 ` Laszlo Ersek
2020-03-10 17:25                   ` Sean
2020-03-10 17:54                     ` Ard Biesheuvel
2020-03-10 19:10                       ` Sean
2020-03-10 19:23                         ` Michael D Kinney
2020-03-10 19:44                           ` Sean
2020-03-10 20:04                             ` Rebecca Cran
2020-03-11  0:05                             ` Laszlo Ersek
2020-03-11  0:30                               ` Sean
2020-03-11  3:21                             ` Liming Gao
2020-03-10 23:34                     ` Laszlo Ersek
2020-03-11  0:43           ` Leif Lindholm
2020-03-07  7:53       ` Laszlo Ersek

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=e62078c1-f3ea-b216-385f-2030f95632be@redhat.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