From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.132.183.28, mailfrom: lersek@redhat.com) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by groups.io with SMTP; Wed, 10 Apr 2019 07:27:21 -0700 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 05DF130027D7; Wed, 10 Apr 2019 14:27:19 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-121-133.rdu2.redhat.com [10.10.121.133]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8862F5D719; Wed, 10 Apr 2019 14:27:17 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH v2 02/31] OvmfPkg: Create platform XenOvmf To: Jordan Justen , Anthony PERARD , devel@edk2.groups.io Cc: Ard Biesheuvel , Julien Grall , xen-devel@lists.xenproject.org References: <20190409110844.14746-1-anthony.perard@citrix.com> <20190409110844.14746-3-anthony.perard@citrix.com> <155488970861.20447.12525571872411959890@jljusten-skl> From: "Laszlo Ersek" Message-ID: Date: Wed, 10 Apr 2019 16:27:15 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <155488970861.20447.12525571872411959890@jljusten-skl> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Wed, 10 Apr 2019 14:27:20 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 04/10/19 11:48, Jordan Justen wrote: > On 2019-04-09 04:08:15, Anthony PERARD wrote: >> This is a copy of OvmfX64, removing VirtIO and some SMM. >> >> This new platform will be changed to make it works on two types of Xen >> guest: HVM and PVH. >> >> Compare to OvmfX64, this patch: >> >> - changed: PLATFORM_GUID, OUTPUT_DIRECTORY, FLASH_DEFINITION >> - removed: VirtioLib class resolution >> - removed: all UEFI_DRIVER modules for virtio devices >> - removed: DXE_SMM_DRIVER and SMM_CORE lib class resolutions >> - removed: DXE_SMM_DRIVER and SMM_CORE FDF rules >> - removed: Everything related to SMM_REQUIRE==true >> - removed: Everything related to SECURE_BOOT_ENABLE==true >> - removed: Everything related to TPM2_ENABLE==true >> - changed: PcdPciDisableBusEnumeration dynamic default flipped to TRUE >> - changed: default FD_SIZE_IN_KB to 2M. >> >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Anthony PERARD >> --- >> OvmfPkg/{OvmfPkgX64.dsc => XenOvmf.dsc} | 202 +------------------- > > I guess we all want our name to be first :), but OvmfXen seems more > like the pattern that edk2 uses when making sub-platforms. > > Also, in some cases we've used !ifdef type things to keep dsc and fdf > files common. Would that not be workable here? Maybe it would get too > ugly. :\ I've been happy with a similar Xen<->QEMU split under ArmVirtPkg. Duplications in updates are usually not a huge burden, and keeping the files separate has proved very helpful for determining maintainer/reviewer/tester responsibility. > It could help to prevent having to sync dsc changes across, and > prevent changes from being omitted for Xen on accident. True, but in my experience that's been the smaller problem. The larger problem has been modifying Xen stuff in unintended ways (= regressing Xen), because we can't test (or don't even notice) the Xen-side implications of changes made to common source. Personally I prefer another (DSC + FDF) pair under OvmfPkg (beyond the three we already have) to another layer of (conditional?) includes. The !if's that are being eliminated in this Xen-customized copy (i.e., in this patch) are complex enough already :) ... It's not that I *generally* prefer duplication; as you say, we do have a number of !includes already. I do prefer duplication specifically for Xen vs. QEMU however. Thanks Laszlo