From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (NAM02-BL2-obe.outbound.protection.outlook.com [40.107.75.119]) by mx.groups.io with SMTP id smtpd.web10.19187.1585160283033888293 for ; Wed, 25 Mar 2020 11:18:03 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@microsoft.com header.s=selector2 header.b=MlPCF8DN; spf=pass (domain: microsoft.com, ip: 40.107.75.119, mailfrom: bret.barkelew@microsoft.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HLERrEA2I9jVMgm5mj0UqYjpA4y/bvPkk7vkC05Dp9jPv5dphtcJnVF+1Hv5/hXRHPPRE3M0vdMfnY6GWPBkQ0P0DA83T05kwZf7Bi/+HYO9OcAPXrvHr2FpmMSfwllDM3CnCEPRR2hvMqOiY7u7P572NZfZ2+H3ycZA8bqT28CBXAdyuyl8dX0mmXnf8ua4H72B+ZwHBZgr/K054GnZzkBwRQWatZ1+VN/h+Gs6GsqllnaDWZSQV4zT8yt0bnOVgCGc3ZxdC4eHqLgB56bg3vlMrzLdKaw8lcMxz0qKavo6aRvsuiImIyozvBvh+jP/f7kE1840nDNFuEZYJzfYiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XlExfYCIi6SgBflc/NOdWqLHsbP+PHiy8x7oHflkHKQ=; b=Yq6rWldhw5mH/UwXa4O7EHmc7DaiFlHAy98YRo7+CmBYGukpQG1pUc2UxYQ7qg2rBRJvHozxgM1mBszlba4sZtNoDc6RvCH957MdHijr0YN3J8VkgGe8A0zonuxEpI7FrqyuR4jk6zq5OqhKQgoR6Jr104l5APqgrBcbBw1U0xhG+Kp3EWoQnUoDoRQMP5IVK7u8fmgWBunzBLYkm29MPHZdY++xS0p9DkmUo/t4NUHWldl3TjIb7rpJTg3F78QlbPBkQYq6VNPInGL2cukbVKOH/aTZUNI2liY4riFITYua8naCTxw5T4KYGiOg5mhPoLtO0+yJYkY8oTR8QIS8aQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XlExfYCIi6SgBflc/NOdWqLHsbP+PHiy8x7oHflkHKQ=; b=MlPCF8DNfPCTJApwkjG9JCT/1RNlIQMtgXRO24i+GGeZ91+lM+VLr7ObDtqGM+293h8nPQtvU54Ejyhy1Q1WMFbG/t5+TU3kt40vB6+KZyiGv9KIRPQVwnjBm1UMIQTBdHnjq/oF2AMgTxVo1jYsrQ8wkiEmiGiBTRit//XbBAM= Received: from CY4PR21MB0743.namprd21.prod.outlook.com (2603:10b6:903:b2::9) by CY4PR21MB0775.namprd21.prod.outlook.com (2603:10b6:903:b8::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.9; Wed, 25 Mar 2020 18:18:00 +0000 Received: from CY4PR21MB0743.namprd21.prod.outlook.com ([fe80::90d:10d9:c5bc:5318]) by CY4PR21MB0743.namprd21.prod.outlook.com ([fe80::90d:10d9:c5bc:5318%10]) with mapi id 15.20.2878.007; Wed, 25 Mar 2020 18:18:00 +0000 From: "Bret Barkelew" To: "devel@edk2.groups.io" , "lersek@redhat.com" , Rebecca Cran , "jiewen.yao@intel.com" , "Justen, Jordan L" , Ard Biesheuvel Subject: Re: [EXTERNAL] Re: [edk2-devel] Adding Bhyve support into upstream EDK2 Thread-Topic: [EXTERNAL] Re: [edk2-devel] Adding Bhyve support into upstream EDK2 Thread-Index: AQHV9B/mZJ33PhYIKUqmDEx3K79MCqhXEJYAgAF5NoCAATDc1Q== Date: Wed, 25 Mar 2020 18:18:00 +0000 Message-ID: References: <74D8A39837DF1E4DA445A8C0B3885C503F972D18@shsmsx102.ccr.corp.intel.com> , In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2020-03-25T18:16:07.1394914Z;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Privileged authentication-results: spf=none (sender IP is ) smtp.mailfrom=Bret.Barkelew@microsoft.com; x-originating-ip: [71.212.145.195] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: dec37fcb-6cac-45a2-6b8c-08d7d0e8da0d x-ms-traffictypediagnostic: CY4PR21MB0775: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-forefront-prvs: 0353563E2B x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CY4PR21MB0743.namprd21.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(10019020)(4636009)(366004)(346002)(376002)(136003)(39860400002)(396003)(52536014)(66446008)(64756008)(66556008)(66476007)(76116006)(91956017)(26005)(186003)(8990500004)(81156014)(8676002)(81166006)(8936002)(10290500003)(478600001)(966005)(66946007)(5660300002)(316002)(110136005)(55016002)(9686003)(86362001)(7696005)(33656002)(53546011)(6506007)(2906002)(71200400001);DIR:OUT;SFP:1102; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: /0i1Wg+r3aCgPtq2piqRmJYDZ9RbbQD9BU+6jkCOejugQYXPwzzGZKbG6oH1w2p2a54E4KU3vrNU1MwmEdAO7JfTOvLOBVA8SBW+Z21Jc8mSAmKKPIQUyGPasQhm361Y4yi7eITMqv5x+R/npmKd0Bh6l1KmCdZE2Ho81gQqKxG8+noRmyZd3AVn2CejeOcxMLVwqz4VX7Jcg0PK8RnGQz6eawW/MUZYV8jGwQoluzmuy2QHLE+rLgugUoLWo/+guQFYV97sY3ugyhsOSq9gwmF1akWWQ9oMQS7GiNBiMuapqtmEXQV/9c63SoRI+t3rtGF9F7vWq4gzuMRnPe5YOz49NgZ9YASK3QTAXzNANlWk/dUAVsFWyMjKTc8FE9fkgTyDwDm0HYRMLaE2v8GAvCZkgrOQgrWKs9LuDqNClhPifc8q5ye9iGE0UyKcl6W9/YgvC0NAyHwVRMgyDrIbo/FuplWkZfkS0Vbk7DHhrlHexHePQfNj4lhcpKCp8bUAFhuf/9uOh6VUtJ47z+c2FQ== x-ms-exchange-antispam-messagedata: 0rwc1crJ6kUD22dcWsFoKjehGiJYMU+9h+nNb2wCWNuqcWiNHKx1wuEn+JRcU6WhnueBxyOffhRofv47VKm0yGCivFrFmAg3IUxSjlN3LXVwxsVlE/zKhBEJUtkKeeXcZj7UW/6jHU8p5/VOpHWDvg== x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: dec37fcb-6cac-45a2-6b8c-08d7d0e8da0d X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Mar 2020 18:18:00.4817 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: hyVNx8z/eAgL7w7NwJ8XqUB8xU8bnfPr3ewHp1zUFAbTTwrT5jmF1W0J0RrrbCIy4G+XW867rDMWeaEmKQwWmA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0775 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_CY4PR21MB0743CEA9D2C1A0E770DC2E01EFCE0CY4PR21MB0743namp_" --_000_CY4PR21MB0743CEA9D2C1A0E770DC2E01EFCE0CY4PR21MB0743namp_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Should it though? It seems like it should go the opposite way. ArmVirt->Ovm= f and ArmVirt->Bhyve. Which one is the more core package? By naming it woul= d *seem* that ArmVirt is more core, but maybe I=92m wrong. - Bret From: Laszlo Ersek via Groups.Io Sent: Tuesday, March 24, 2020 5:05 PM To: Rebecca Cran; devel@edk2.groups.io; jiewen.yao@intel.com; Jus= ten, Jordan L; Ard Biesheuvel Subject: [EXTERNAL] Re: [edk2-devel] Adding Bhyve support into upstream ED= K2 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=3Dhttps%3A%2F%2Fbex.= dev%2Fbhyve-edk2-stable202002.diff&data=3D02%7C01%7CBret.Barkelew%40mic= rosoft.com%7C6b91de2e92934a455baf08d7d0503889%7C72f988bf86f141af91ab2d7cd01= 1db47%7C1%7C0%7C637206915279358560&sdata=3DYIqsjfqvNXGqZnEt86sCxMl3%2F1= YVpkEJf7%2FPFseEAyM%3D&reserved=3D0 . 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 --_000_CY4PR21MB0743CEA9D2C1A0E770DC2E01EFCE0CY4PR21MB0743namp_ Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable

Should it though? It seems like it should go the op= posite way. ArmVirt->Ovmf and ArmVirt->Bhyve. Which one is the more c= ore package? By naming it would *seem* that ArmVirt is more core, bu= t maybe I=92m wrong.

 

- Bret

 

From: Laszlo Ersek via Groups.Io=
Sent: Tuesday, March 24, 2020 5:05 PM
To: Rebecca Cran; devel@edk2.groups.io; jiewen.y= ao@intel.com; Justen, Jordan L; Ard Biesheuvel
Subject: [EXTERNAL] Re: [edk2-devel] Adding Bhyve support into upst= ream EDK2

 

On 03/24/20 02:34, R= ebecca 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 b= it
> 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=3Dhttps%3A%2F%2Fbex.de= v%2Fbhyve-edk2-stable202002.diff&amp;data=3D02%7C01%7CBret.Barkelew%40m= icrosoft.com%7C6b91de2e92934a455baf08d7d0503889%7C72f988bf86f141af91ab2d7cd= 011db47%7C1%7C0%7C637206915279358560&amp;sdata=3DYIqsjfqvNXGqZnEt86sCxM= l3%2F1YVpkEJf7%2FPFseEAyM%3D&amp;reserved=3D0 .

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?<= br>
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<= br>     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". A= nd
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


 

--_000_CY4PR21MB0743CEA9D2C1A0E770DC2E01EFCE0CY4PR21MB0743namp_--