From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web11.96876.1673327134518995179 for ; Mon, 09 Jan 2023 21:05:34 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NpHZD9fT; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673327133; 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=7jRTAeJKwW7vrYj4CmIdJRp4T7g95zB+/mFtJ1e17To=; b=NpHZD9fTIVTlh9i2QzyT7ZQolOpFJqB83k0Q5p6JxBo7pQgq5LQP2PaM1mqUMIR3b9Elyh 9O3/chbiL5bJfuJBM9quKEwNXhDMMUCfk7TYu1hcuL1CvJ/fJCeZCUDjW2G8HKaN4qZITT I/Bj3z4mi9PXgIsTJOsQkPz0KqrMxVw= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-486-rQwEE91MNIa0StqoEV99JQ-1; Tue, 10 Jan 2023 00:05:29 -0500 X-MC-Unique: rQwEE91MNIa0StqoEV99JQ-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4F0D23811F27; Tue, 10 Jan 2023 05:05:29 +0000 (UTC) Received: from [10.39.192.22] (unknown [10.39.192.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B99FF492C14; Tue, 10 Jan 2023 05:05:27 +0000 (UTC) Message-ID: <68457e19-4011-d357-675b-c65b157a8f96@redhat.com> Date: Tue, 10 Jan 2023 06:05:26 +0100 MIME-Version: 1.0 Subject: Re: [edk2-devel] [PATCH V2 1/6] OvmfPkg/AcpiPlatformDxe: Remove QEMU_ACPI_TABLE_NOTIFY_PROTOCOL To: devel@edk2.groups.io, min.m.xu@intel.com Cc: Erdem Aktas , James Bottomley , Jiewen Yao , Gerd Hoffmann , Tom Lendacky , Sebastien Boeuf References: <20230109135917.1752-1-min.m.xu@intel.com> <20230109135917.1752-2-min.m.xu@intel.com> From: "Laszlo Ersek" In-Reply-To: <20230109135917.1752-2-min.m.xu@intel.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 1/9/23 14:59, Min Xu wrote: > From: Min M Xu > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4237 > > The QEMU_ACPI_TABLE_NOTIFY_PROTOCOL structure is superfluous because NULL > protocol interfaces have been used in edk2 repeatedly. A protocol instance > can exist in the protocol database with a NULL associated interface. > Therefore the QEMU_ACPI_TABLE_NOTIFY_PROTOCOL type, the > "QemuAcpiTableNotify.h" header, and the "mAcpiNotifyProtocol" global > variable can be removed. > > Cc: Laszlo Ersek > Cc: Erdem Aktas > Cc: James Bottomley > Cc: Jiewen Yao > Cc: Gerd Hoffmann > Cc: Tom Lendacky > Cc: Sebastien Boeuf > Reported-by: Laszlo Ersek > Signed-off-by: Min Xu > --- > OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c | 7 ++--- > OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c | 6 ++--- > .../Include/Protocol/QemuAcpiTableNotify.h | 27 ------------------- > 3 files changed, 4 insertions(+), 36 deletions(-) > delete mode 100644 OvmfPkg/Include/Protocol/QemuAcpiTableNotify.h > > diff --git a/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c b/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c > index cbe8bb9b0c75..ad39e4253478 100644 > --- a/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c > +++ b/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c > @@ -15,15 +15,12 @@ > #include // PcdGet32() > #include // GetFirstGuidHob(), GetNextGuidHob() > #include // gBS > - > #include > #include > -#include // QEMU_ACPI_TABLE_NOTIFY_PROTOCOL > > #include "AcpiPlatform.h" > > -EFI_HANDLE mChAcpiHandle = NULL; > -QEMU_ACPI_TABLE_NOTIFY_PROTOCOL mChAcpiNotifyProtocol; > +EFI_HANDLE mChAcpiHandle = NULL; > > EFI_STATUS > EFIAPI > @@ -96,7 +93,7 @@ InstallCloudHvTablesTdx ( > &mChAcpiHandle, > &gQemuAcpiTableNotifyProtocolGuid, > EFI_NATIVE_INTERFACE, > - &mChAcpiNotifyProtocol > + NULL > ); > > return EFI_SUCCESS; > diff --git a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c b/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c > index c8dee17c13e6..1a3852904df9 100644 > --- a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c > +++ b/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c > @@ -19,10 +19,8 @@ > #include // QemuFwCfgS3Enabled() > #include // gBS > > -#include > #include "AcpiPlatform.h" > -EFI_HANDLE mQemuAcpiHandle = NULL; > -QEMU_ACPI_TABLE_NOTIFY_PROTOCOL mAcpiNotifyProtocol; > +EFI_HANDLE mQemuAcpiHandle = NULL; > > // > // The user structure for the ordered collection that will track the fw_cfg > @@ -1284,7 +1282,7 @@ UninstallAcpiTables: > &mQemuAcpiHandle, > &gQemuAcpiTableNotifyProtocolGuid, > EFI_NATIVE_INTERFACE, > - &mAcpiNotifyProtocol > + NULL > ); > } > > diff --git a/OvmfPkg/Include/Protocol/QemuAcpiTableNotify.h b/OvmfPkg/Include/Protocol/QemuAcpiTableNotify.h > deleted file mode 100644 > index a3dd2fc1dc91..000000000000 > --- a/OvmfPkg/Include/Protocol/QemuAcpiTableNotify.h > +++ /dev/null > @@ -1,27 +0,0 @@ > -/** @file > - > - SPDX-License-Identifier: BSD-2-Clause-Patent > - > -**/ > - > -#ifndef QEMU_ACPI_TABLE_NOTIFY_H_ > -#define QEMU_ACPI_TABLE_NOTIFY_H_ > - > -#define QEMU_ACPI_TABLE_NOTIFY_GUID \ > - { 0x928939b2, 0x4235, 0x462f, { 0x95, 0x80, 0xf6, 0xa2, 0xb2, 0xc2, 0x1a, 0x4f } }; > - > -/// > -/// Forward declaration > -/// > -typedef struct _QEMU_ACPI_TABLE_NOTIFY_PROTOCOL QEMU_ACPI_TABLE_NOTIFY_PROTOCOL; > - > -/// > -/// Protocol structure > -/// > -struct _QEMU_ACPI_TABLE_NOTIFY_PROTOCOL { > - UINT8 Notify; > -}; > - > -extern EFI_GUID gQemuAcpiTableNotifyProtocolGuid; > - > -#endif Reviewed-by: Laszlo Ersek