From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.groups.io with SMTP id smtpd.web10.10415.1624373923864789707 for ; Tue, 22 Jun 2021 07:58:44 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=C8YBfW2j; spf=pass (domain: redhat.com, ip: 216.205.24.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624373923; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=u5muxXO65p3whxf8S/1rTL9ouRWdOfraDDL36ndWuXY=; b=C8YBfW2jhpBALpEvDEHwD5obT2Ll9hYaf78DcinmwaRsr5GDKimk64N/AmSEWzdNI7Dybp Rca3jBcPwhWRDzOMsiMYWHPBRKamrlyJQC28ZgQIXMGTg+PcIwG4WJ0m2VU/UtyNqFBdqF piDCWkmpOUhDZ2IuX5iXyA1FDiiSZvo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-419-Ow7EYdqpNQWUcaUDrpD3Eg-1; Tue, 22 Jun 2021 10:58:41 -0400 X-MC-Unique: Ow7EYdqpNQWUcaUDrpD3Eg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1E2D31084F5F; Tue, 22 Jun 2021 14:58:40 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-115-52.ams2.redhat.com [10.36.115.52]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E9D0C10023B5; Tue, 22 Jun 2021 14:58:38 +0000 (UTC) Subject: Re: [PATCH] OvmfPkg/Bhyve: Remove Xen remnants To: Rebecca Cran , Peter Grehan , Ard Biesheuvel , Jordan Justen Cc: devel@edk2.groups.io References: <20210612210749.75099-1-rebecca@bsdio.com> From: "Laszlo Ersek" Message-ID: Date: Tue, 22 Jun 2021 16:58:37 +0200 MIME-Version: 1.0 In-Reply-To: <20210612210749.75099-1-rebecca@bsdio.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 06/12/21 23:07, Rebecca Cran wrote: > Several Xen remnants were left over from adapting the Ovmf code for > Bhyve. Remove them. > > Signed-off-by: Rebecca Cran > --- > OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.h | 7 ------- > OvmfPkg/Bhyve/BhyveX64.dsc | 1 - > OvmfPkg/Bhyve/PlatformPei/Platform.h | 17 ----------------- > 3 files changed, 25 deletions(-) > > diff --git a/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.h b/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.h > index 994ee2c7cd..87c9bdafba 100644 > --- a/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.h > +++ b/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.h > @@ -18,7 +18,6 @@ > #include > #include > #include > -#include > #include > > typedef struct { > @@ -46,12 +45,6 @@ BhyveInstallAcpiTable( > OUT UINTN *TableKey > ); > > -EFI_STATUS > -EFIAPI > -InstallXenTables ( > - IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol > - ); > - > EFI_STATUS > EFIAPI > InstallAcpiTables ( > diff --git a/OvmfPkg/Bhyve/BhyveX64.dsc b/OvmfPkg/Bhyve/BhyveX64.dsc > index d8792812ab..25420d8261 100644 > --- a/OvmfPkg/Bhyve/BhyveX64.dsc > +++ b/OvmfPkg/Bhyve/BhyveX64.dsc > @@ -219,7 +219,6 @@ > S3BootScriptLib|MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf > SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf > OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf > - XenPlatformLib|OvmfPkg/Library/XenPlatformLib/XenPlatformLib.inf > > > !if $(TPM_ENABLE) == TRUE > diff --git a/OvmfPkg/Bhyve/PlatformPei/Platform.h b/OvmfPkg/Bhyve/PlatformPei/Platform.h > index 8239ca05ac..e0327202a5 100644 > --- a/OvmfPkg/Bhyve/PlatformPei/Platform.h > +++ b/OvmfPkg/Bhyve/PlatformPei/Platform.h > @@ -98,28 +98,11 @@ InstallClearCacheCallback ( > VOID > ); > > -EFI_STATUS > -InitializeXen ( > - VOID > - ); > - > -BOOLEAN > -XenDetect ( > - VOID > - ); > - > VOID > AmdSevInitialize ( > VOID > ); > > -extern BOOLEAN mXen; > - > -VOID > -XenPublishRamRegions ( > - VOID > - ); > - > extern EFI_BOOT_MODE mBootMode; > > extern BOOLEAN mS3Supported; > (1) If we go for simple "xen" matches in source code, this looks mostly okay, although I see two comments that could be fixed up additionally, in - PlatformPei/Platform.c - SmbiosPlatformDxe/SmbiosPlatformDxe.c (pathnames relative to OvmfPkg/Bhyve) (2) I hinted at a larger possible cleanup in commit e43cca74ad02 ("OvmfPkg/Bhyve: make "PcdPciDisableBusEnumeration" Fixed-at-Build", 2021-06-04). If you locate "PcdPciDisableBusEnumeration" instances under OvmfPkg/Bhyve, and substitute constant TRUE for them, a bunch of already dead code in OvmfPkg/Bhyve/AcpiPlatformDxe is *shown dead* too, and you can excise it. That does not make this patch wrong, of course. Thanks Laszlo