public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Bret Barkelew" <bret.barkelew@microsoft.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"lersek@redhat.com" <lersek@redhat.com>,
	Rebecca Cran <rebecca@bsdio.com>,
	"jiewen.yao@intel.com" <jiewen.yao@intel.com>,
	"Justen, Jordan L" <jordan.l.justen@intel.com>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: Re: [EXTERNAL] Re: [edk2-devel] Adding Bhyve support into upstream EDK2
Date: Wed, 25 Mar 2020 18:18:00 +0000	[thread overview]
Message-ID: <CY4PR21MB0743CEA9D2C1A0E770DC2E01EFCE0@CY4PR21MB0743.namprd21.prod.outlook.com> (raw)
In-Reply-To: <e62078c1-f3ea-b216-385f-2030f95632be@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2914 bytes --]

Should it though? It seems like it should go the opposite way. ArmVirt->Ovmf and ArmVirt->Bhyve. Which one is the more core package? By naming it would *seem* that ArmVirt is more core, but maybe I’m wrong.

- Bret

From: Laszlo Ersek via Groups.Io<mailto:lersek=redhat.com@groups.io>
Sent: Tuesday, March 24, 2020 5:05 PM
To: Rebecca Cran<mailto:rebecca@bsdio.com>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>; jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>; Justen, Jordan L<mailto:jordan.l.justen@intel.com>; Ard Biesheuvel<mailto:ard.biesheuvel@linaro.org>
Subject: [EXTERNAL] Re: [edk2-devel] Adding Bhyve support into upstream EDK2

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://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbex.dev%2Fbhyve-edk2-stable202002.diff&amp;data=02%7C01%7CBret.Barkelew%40microsoft.com%7C6b91de2e92934a455baf08d7d0503889%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637206915279358560&amp;sdata=YIqsjfqvNXGqZnEt86sCxMl3%2F1YVpkEJf7%2FPFseEAyM%3D&amp;reserved=0 .

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





[-- Attachment #2: Type: text/html, Size: 5407 bytes --]

  reply	other threads:[~2020-03-25 18:18 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
2020-03-25 18:18       ` Bret Barkelew [this message]
2020-03-27 12:56         ` [EXTERNAL] " 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=CY4PR21MB0743CEA9D2C1A0E770DC2E01EFCE0@CY4PR21MB0743.namprd21.prod.outlook.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