From nobody Sun May 19 01:43:14 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+98259+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+98259+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1673400234; cv=none; d=zohomail.com; s=zohoarc; b=Lac2YvM6f+YnWko2wNbqfhDvhijvJdmWJ7pi0YCTKSP84OKMM6jrW4G9X309n0RaYA2vXYWK4bV5kab1fvufFITFJLAq07N02+aCzI2FDz7mRrRULIn7brM0kcvuDrlpPljX5js8MHi5JKIjX1xvp4J5xJQFh+v/8fHqGnRDuIU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673400234; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=86v4ak3PMVa9OqipH5i6VheAM4DMcNYLaa+/0LPFn1U=; b=AlHoUfW+d1vPtxN131vATmFSMUAmoNI9qp39gzQR+l353PokldVamDGxIv8VrjQhgLYqwjA/PUF1EuoHJMbYvpZTy3LQeqUBSv/BTMD9NhxBqx9zFBj+b0q80D3PL2CIjgRBvqQn0ZBI1KxaP6hJoA8e0CXlrLzirl+df/YC954= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+98259+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1673400234379287.64218752951194; Tue, 10 Jan 2023 17:23:54 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id rSSsYY1788612xw0mnxHFkBp; Tue, 10 Jan 2023 17:23:53 -0800 X-Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web11.12260.1673400233170620400 for ; Tue, 10 Jan 2023 17:23:53 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10586"; a="387764308" X-IronPort-AV: E=Sophos;i="5.96,315,1665471600"; d="scan'208";a="387764308" X-Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jan 2023 17:23:52 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10586"; a="659192717" X-IronPort-AV: E=Sophos;i="5.96,315,1665471600"; d="scan'208";a="659192717" X-Received: from mxu9-mobl1.ccr.corp.intel.com ([10.213.42.137]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jan 2023 17:23:46 -0800 From: "Min Xu" To: devel@edk2.groups.io Cc: Min M Xu , Laszlo Ersek , Erdem Aktas , James Bottomley , Jiewen Yao , Gerd Hoffmann , Tom Lendacky , Sebastien Boeuf Subject: [edk2-devel] [PATCH V3 1/6] OvmfPkg/AcpiPlatformDxe: Remove QEMU_ACPI_TABLE_NOTIFY_PROTOCOL Date: Wed, 11 Jan 2023 09:22:30 +0800 Message-Id: <20230111012235.189-2-min.m.xu@intel.com> In-Reply-To: <20230111012235.189-1-min.m.xu@intel.com> References: <20230111012235.189-1-min.m.xu@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,min.m.xu@intel.com X-Gm-Message-State: 1lHAMHxWsLCfFTboZIy6UZOjx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1673400233; bh=wBxIxINGQIyy2Ty+HHqilMWHUT9dhscntYIF5LTJm8k=; h=Cc:Date:From:Reply-To:Subject:To; b=FPxUmrekn79iF207NpcQuH8o6r8inY69YRSh9bzDSe5rzATY/KphX/O7q9vak775SzM Ch2blL4U5cBWvJZYOEzE+xYZToKigPsiJ3/kDuv8zQlb3yaKJZzXeJ6B6KO3BsDATpnUR 9XX0J27caGJw9iQolpMQEHwAfic1I6+FFk0= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1673400235269100001 Content-Type: text/plain; charset="utf-8" From: Min M Xu BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4237 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 Reviewed-by: Laszlo Ersek Signed-off-by: Min Xu Reviewed-by: Sebastien Boeuf --- 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/AcpiPlatformDx= e/CloudHvAcpi.c index cbe8bb9b0c75..ad39e4253478 100644 --- a/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c +++ b/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c @@ -15,15 +15,12 @@ #include // PcdGet32() #include // GetFirstGuidH= ob(), GetNextGuidHob() #include // gBS - #include #include -#include // QEMU_ACPI_TAB= LE_NOTIFY_PROTOCOL =20 #include "AcpiPlatform.h" =20 -EFI_HANDLE mChAcpiHandle =3D NULL; -QEMU_ACPI_TABLE_NOTIFY_PROTOCOL mChAcpiNotifyProtocol; +EFI_HANDLE mChAcpiHandle =3D NULL; =20 EFI_STATUS EFIAPI @@ -96,7 +93,7 @@ InstallCloudHvTablesTdx ( &mChAcpiHandle, &gQemuAcpiTableNotifyProtocolGuid, EFI_NATIVE_INTERFACE, - &mChAcpiNotifyProtocol + NULL ); =20 return EFI_SUCCESS; diff --git a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c b/OvmfPkg/AcpiPlatform= Dxe/QemuFwCfgAcpi.c index c8dee17c13e6..1a3852904df9 100644 --- a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c +++ b/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c @@ -19,10 +19,8 @@ #include // QemuFwCfgS3Enabled() #include // gBS =20 -#include #include "AcpiPlatform.h" -EFI_HANDLE mQemuAcpiHandle =3D NULL; -QEMU_ACPI_TABLE_NOTIFY_PROTOCOL mAcpiNotifyProtocol; +EFI_HANDLE mQemuAcpiHandle =3D NULL; =20 // // 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 ); } =20 diff --git a/OvmfPkg/Include/Protocol/QemuAcpiTableNotify.h b/OvmfPkg/Inclu= de/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_PRO= TOCOL; - -/// -/// Protocol structure -/// -struct _QEMU_ACPI_TABLE_NOTIFY_PROTOCOL { - UINT8 Notify; -}; - -extern EFI_GUID gQemuAcpiTableNotifyProtocolGuid; - -#endif --=20 2.29.2.windows.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#98259): https://edk2.groups.io/g/devel/message/98259 Mute This Topic: https://groups.io/mt/96191590/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sun May 19 01:43:14 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+98260+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+98260+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1673400244; cv=none; d=zohomail.com; s=zohoarc; b=Q/XnuHo0QVlLZEHONkIxF3Nbzv8CvltXpOLLzRW7E87G2qadmsTJXzhEsFO0Z8d/qRYvJkhfllQl/0s4yhYThsqbVGeHoPgh+EDdJXc+osltXutPZv6iEPKNBukruB+FGZ/HRilAzAem2FuUTLgLFSyrT6r/ICiLTbiqp7r5/0c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673400244; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=D003eSYaK/CcEQ8hnBJLnHo59TO4JUvAsUrXhmSpUCc=; b=nFwDvkbHcW14cISqWXHzSzBAJ90x5Ex9x4OHvbCABI50Vs0MBJJfoYzw8y/JdOFVLHE/QEbYUgpazQ2QrXxk74eHhH9go+XBUmUchE2xIPoU+vnTq7mom8FCEr3SCApcGfnbcaLL0AepxyXLI/MwPpV/jjpLgkXIUf8Cn5WPtog= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+98260+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1673400244875135.97196677093177; Tue, 10 Jan 2023 17:24:04 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id IcEFYY1788612xQ1ewExET12; Tue, 10 Jan 2023 17:24:04 -0800 X-Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web11.12263.1673400243431217605 for ; Tue, 10 Jan 2023 17:24:03 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10586"; a="387764360" X-IronPort-AV: E=Sophos;i="5.96,315,1665471600"; d="scan'208";a="387764360" X-Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jan 2023 17:24:02 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10586"; a="659192775" X-IronPort-AV: E=Sophos;i="5.96,315,1665471600"; d="scan'208";a="659192775" X-Received: from mxu9-mobl1.ccr.corp.intel.com ([10.213.42.137]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jan 2023 17:23:52 -0800 From: "Min Xu" To: devel@edk2.groups.io Cc: Min M Xu , Laszlo Ersek , Erdem Aktas , James Bottomley , Jiewen Yao , Gerd Hoffmann , Tom Lendacky , Sebastien Boeuf Subject: [edk2-devel] [PATCH V3 2/6] OvmfPkg/AcpiPlatformDxe: Use local variable in CloudHvAcpi.c Date: Wed, 11 Jan 2023 09:22:31 +0800 Message-Id: <20230111012235.189-3-min.m.xu@intel.com> In-Reply-To: <20230111012235.189-1-min.m.xu@intel.com> References: <20230111012235.189-1-min.m.xu@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,min.m.xu@intel.com X-Gm-Message-State: iYcZnCnwKj5dxkJr727KN3gXx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1673400244; bh=uzu9ivXRhKGqdGp9yltdIs5CETdPNWV3hzjjoJvPZnw=; h=Cc:Date:From:Reply-To:Subject:To; b=Caww6GdR+J5YMmzB8KrH8hY3i+mTkzDd5tcaJPx0ssf9NHWrtvGaiOWL6MaeNZtj0w7 35au3jeCOBZ77OvFNHuZlKq7IxXAkStxMYYsLBkkvTYcQF4ZsxYamw+rRKmEd41jMURfy 2jcRZ5M39r7Ql7y2zOcxY+2O6O9Hh2Tj/Sg= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1673400245308100001 Content-Type: text/plain; charset="utf-8" From: Min M Xu BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4237 The handle of mChAcpiHandle is not needed for anything, beyond the scope of the InstallCloudHvTablesTdx (). A local variable (ChAcpiHandle) suffices for storing the handle. 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 Reviewed-by: Sebastien Boeuf --- OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c b/OvmfPkg/AcpiPlatformDx= e/CloudHvAcpi.c index ad39e4253478..8f90ea23996d 100644 --- a/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c +++ b/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c @@ -20,8 +20,6 @@ =20 #include "AcpiPlatform.h" =20 -EFI_HANDLE mChAcpiHandle =3D NULL; - EFI_STATUS EFIAPI InstallCloudHvTablesTdx ( @@ -30,6 +28,7 @@ InstallCloudHvTablesTdx ( { EFI_STATUS Status; UINTN TableHandle; + EFI_HANDLE ChAcpiHandle; =20 EFI_PEI_HOB_POINTERS Hob; EFI_ACPI_DESCRIPTION_HEADER *CurrentTable; @@ -89,8 +88,9 @@ InstallCloudHvTablesTdx ( // Install a protocol to notify that the ACPI table provided by CH is // ready. // + ChAcpiHandle =3D NULL; gBS->InstallProtocolInterface ( - &mChAcpiHandle, + &ChAcpiHandle, &gQemuAcpiTableNotifyProtocolGuid, EFI_NATIVE_INTERFACE, NULL --=20 2.29.2.windows.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#98260): https://edk2.groups.io/g/devel/message/98260 Mute This Topic: https://groups.io/mt/96191591/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sun May 19 01:43:14 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+98261+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+98261+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1673400254; cv=none; d=zohomail.com; s=zohoarc; b=lija2/23UPGXv3xrOlGopIluz/2qC8ny2JNBiQF0koQ1h/8eZ4R+g1VsasRw8sqPWlGTWtON5ZLAiJvreSY0vQC56ey205IeWf9fYtiIS244vxg6PhD/zPEZ2AZ07I+zqBtJ9sxC1w3BCeE26MC2PVZF5ZnYExRqJ/GUvfGvKB0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673400254; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=jpdtMgvCgLkUmPxC7fIM2EfKbJQDNxh9fYLt5j/M9C4=; b=bNupMKfko2FRgfa/6BtQe80Kz0+OytcYzOZdyJqhOdcYGENZrkmmoBf9KwTRheIUvj4BeJhHCQhfayrd3yeQFwhKDooR60HYattNTMBWj3G+1b/tjiSGrqVsR9dwV+XPzQuH2RdoSBnHal23hdDVkfuXvoEEGzd95ctaM3yFqXM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+98261+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1673400254572201.91191843438844; Tue, 10 Jan 2023 17:24:14 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id L69WYY1788612x4NZRW1X3KM; Tue, 10 Jan 2023 17:24:14 -0800 X-Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web11.12270.1673400253669081955 for ; Tue, 10 Jan 2023 17:24:13 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10586"; a="387764414" X-IronPort-AV: E=Sophos;i="5.96,315,1665471600"; d="scan'208";a="387764414" X-Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jan 2023 17:24:12 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10586"; a="659192805" X-IronPort-AV: E=Sophos;i="5.96,315,1665471600"; d="scan'208";a="659192805" X-Received: from mxu9-mobl1.ccr.corp.intel.com ([10.213.42.137]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jan 2023 17:24:03 -0800 From: "Min Xu" To: devel@edk2.groups.io Cc: Min M Xu , Laszlo Ersek , Erdem Aktas , James Bottomley , Jiewen Yao , Gerd Hoffmann , Tom Lendacky Subject: [edk2-devel] [PATCH V3 3/6] OvmfPkg/AcpiPlatformDxe: Use local variable in QemuFwCfgAcpi.c Date: Wed, 11 Jan 2023 09:22:32 +0800 Message-Id: <20230111012235.189-4-min.m.xu@intel.com> In-Reply-To: <20230111012235.189-1-min.m.xu@intel.com> References: <20230111012235.189-1-min.m.xu@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,min.m.xu@intel.com X-Gm-Message-State: bsjpAMGrYfn8WGXh89N0xsI0x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1673400254; bh=TSQJDZ4uVQM6eWiUA885MMzsz3enxoQuJLusM0+RZSY=; h=Cc:Date:From:Reply-To:Subject:To; b=jTdubijLItYJ0M2wEDQNNGiTuFxTWCsXvTdqIeEGORZamJUl/FQdC7BsyD/45zaxzjh JbTq0O3GaeZBrHgq0L4h6XHthPyK+EVM4xhULwPtjvhyWrO1O0Aew7B0PnGl0IuSPGo5n PS/+M0VEztQMgQ5fzZl+m0W69urv/CV+1xE= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1673400255388100001 Content-Type: text/plain; charset="utf-8" From: Min M Xu BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4237 The handle of mQemuAcpiHandle is not needed for anything, beyond the scope of the InstallQemuFwCfgTables(). So a local variable will suffice for storing the handle. Cc: Laszlo Ersek Cc: Erdem Aktas Cc: James Bottomley Cc: Jiewen Yao Cc: Gerd Hoffmann Cc: Tom Lendacky Reported-by: Laszlo Ersek Reviewed-by: Laszlo Ersek Signed-off-by: Min Xu --- OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c b/OvmfPkg/AcpiPlatform= Dxe/QemuFwCfgAcpi.c index 1a3852904df9..9711335c6cac 100644 --- a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c +++ b/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c @@ -20,7 +20,6 @@ #include // gBS =20 #include "AcpiPlatform.h" -EFI_HANDLE mQemuAcpiHandle =3D NULL; =20 // // The user structure for the ordered collection that will track the fw_cfg @@ -1101,6 +1100,7 @@ InstallQemuFwCfgTables ( ORDERED_COLLECTION_ENTRY *TrackerEntry, *TrackerEntry2; ORDERED_COLLECTION *SeenPointers; ORDERED_COLLECTION_ENTRY *SeenPointerEntry, *SeenPointerEntry2; + EFI_HANDLE QemuAcpiHandle; =20 Status =3D QemuFwCfgFindFile ("etc/table-loader", &FwCfgItem, &FwCfgSize= ); if (EFI_ERROR (Status)) { @@ -1278,8 +1278,9 @@ UninstallAcpiTables: // Install a protocol to notify that the ACPI table provided by Qemu is // ready. // + QemuAcpiHandle =3D NULL; gBS->InstallProtocolInterface ( - &mQemuAcpiHandle, + &QemuAcpiHandle, &gQemuAcpiTableNotifyProtocolGuid, EFI_NATIVE_INTERFACE, NULL --=20 2.29.2.windows.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#98261): https://edk2.groups.io/g/devel/message/98261 Mute This Topic: https://groups.io/mt/96191595/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sun May 19 01:43:14 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+98262+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+98262+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1673400262; cv=none; d=zohomail.com; s=zohoarc; b=Eyah0MHBJRnO9sT7quPq7lrWDGVgEJn93oxrGs3vNgeVCTSwleertO9UkBl51eMaDkb/OgBSlbLhIOpIZW8Ha4T2pFmKZGZeTXH0VUV8JR8SH2Hpmffnp2R+ZGdWaoS01PC5lRACzssvrqFtwNtIL+7AdFYYh2iD26Z7zDjNA0Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673400262; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=7qHBSRvMjEiTZTLRbtuKUKaNLtBtvO1lW4F8IKT/O2c=; b=L5N4QVELlkq6GXn/NpLfr31nj7a4oL3SdP1HyNxH1Z8s6nHvUnxJ4bKlkOFo90CbLwpMlwXPBSBtTG1k3vYChqTK2EJUQxgNgZolB3CcAoHPoU0sg9Q6jjWerl3vxhUWkkgH6lrA6t46gW/AWFfsqNAfjAkcqQRFhIC1PZOx9oU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+98262+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1673400262683892.8683807934317; Tue, 10 Jan 2023 17:24:22 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id afMWYY1788612xkM59clHWGP; Tue, 10 Jan 2023 17:24:22 -0800 X-Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web10.12253.1673400261367396460 for ; Tue, 10 Jan 2023 17:24:21 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10586"; a="387764447" X-IronPort-AV: E=Sophos;i="5.96,315,1665471600"; d="scan'208";a="387764447" X-Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jan 2023 17:24:20 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10586"; a="659192831" X-IronPort-AV: E=Sophos;i="5.96,315,1665471600"; d="scan'208";a="659192831" X-Received: from mxu9-mobl1.ccr.corp.intel.com ([10.213.42.137]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jan 2023 17:24:14 -0800 From: "Min Xu" To: devel@edk2.groups.io Cc: Min M Xu , Laszlo Ersek , Erdem Aktas , James Bottomley , Jiewen Yao , Gerd Hoffmann , Tom Lendacky Subject: [edk2-devel] [PATCH V3 4/6] OvmfPkg/AcpiPlatformDxe: Add log to show the installed tables Date: Wed, 11 Jan 2023 09:22:33 +0800 Message-Id: <20230111012235.189-5-min.m.xu@intel.com> In-Reply-To: <20230111012235.189-1-min.m.xu@intel.com> References: <20230111012235.189-1-min.m.xu@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,min.m.xu@intel.com X-Gm-Message-State: k4JtVNW3DM9f2tBKzaW9gBEgx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1673400262; bh=yP2iKeX/9I8yDZ2JO2izzagP51qs9MSFFOYsZC9w8Ks=; h=Cc:Date:From:Reply-To:Subject:To; b=JdlR1fKLcbvIpby1aRPaDgjHrpxLXUDup/1/9UV9r3+GVhfdb7jfRgolW3a7w1Fd9+z 6AmGez/D558G2WqpZcvDB6haU+IFfEq0aKN81My5Wvr2AUsFHMtQh+upAO7zGv5+DkNlY e1JvaMAjLzv97ZPdz89lPn0+YYoMUg/rRHQ= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1673400263418100001 Content-Type: text/plain; charset="utf-8" From: Min M Xu BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4237 Commit 9fdc70af6ba8 wrongly removed the log from InstallQemuFwCfgTables after ACPI tables are successfully installed. This patch add the log back after all operations succeed. Cc: Laszlo Ersek Cc: Erdem Aktas Cc: James Bottomley Cc: Jiewen Yao Cc: Gerd Hoffmann Cc: Tom Lendacky Reported-by: Laszlo Ersek Reviewed-by: Laszlo Ersek Signed-off-by: Min Xu --- OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c b/OvmfPkg/AcpiPlatform= Dxe/QemuFwCfgAcpi.c index 9711335c6cac..462921466604 100644 --- a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c +++ b/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c @@ -1264,6 +1264,8 @@ InstallQemuFwCfgTables ( S3Context =3D NULL; } =20 + DEBUG ((DEBUG_INFO, "%a: installed %d tables\n", __FUNCTION__, Installed= )); + UninstallAcpiTables: if (EFI_ERROR (Status)) { // --=20 2.29.2.windows.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#98262): https://edk2.groups.io/g/devel/message/98262 Mute This Topic: https://groups.io/mt/96191596/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sun May 19 01:43:14 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+98263+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+98263+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1673400290; cv=none; d=zohomail.com; s=zohoarc; b=ERIdHujHVHBrJqkxr2eKun7dojio1KIpkVBVR+Qfmdk61NNztf2m71CKECrmnl5NEyS2QSf7MaNu/r58OHiKUx/u1hbihhszTubeJRN/yNIfESPZtVIGkRylPKrHoHBus0OU0t8IQZiI+0jsiWSC/s/6sAoD0jVUIL8MQPC1gbk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673400290; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=IK/wgN6w2kQTApFsFXreV389v+T8cWHhWfNxwlFbgrI=; b=H3TZfUEUrO3nqd7o7waec+OaHcfQM4gmj5C3aL4TLjEC3xz1pH4HOlNMb1fVIumCZC8XtTsc47fjXuIQaClHky8yeyMDk6nLDehxmdp1CK8JZSIrVy9xGj08TmvHdWOYFcTG65SYkveY2PI3lKxu6VbjH/ZQq1Xehk07MulxU60= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+98263+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1673400290159684.1351860120187; Tue, 10 Jan 2023 17:24:50 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id 9roxYY1788612xmnlqBXoIHy; Tue, 10 Jan 2023 17:24:49 -0800 X-Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web10.12263.1673400289090483968 for ; Tue, 10 Jan 2023 17:24:49 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10586"; a="387764489" X-IronPort-AV: E=Sophos;i="5.96,315,1665471600"; d="scan'208";a="387764489" X-Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jan 2023 17:24:28 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10586"; a="659192851" X-IronPort-AV: E=Sophos;i="5.96,315,1665471600"; d="scan'208";a="659192851" X-Received: from mxu9-mobl1.ccr.corp.intel.com ([10.213.42.137]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jan 2023 17:24:20 -0800 From: "Min Xu" To: devel@edk2.groups.io Cc: Min M Xu , Laszlo Ersek , Erdem Aktas , James Bottomley , Jiewen Yao , Gerd Hoffmann , Tom Lendacky Subject: [edk2-devel] [PATCH V3 5/6] OvmfPkg/AcpiPlatformDxe: Refactor QemuAcpiTableNotifyProtocol Date: Wed, 11 Jan 2023 09:22:34 +0800 Message-Id: <20230111012235.189-6-min.m.xu@intel.com> In-Reply-To: <20230111012235.189-1-min.m.xu@intel.com> References: <20230111012235.189-1-min.m.xu@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,min.m.xu@intel.com X-Gm-Message-State: D9Wg6vBLyEToeUlFh7jooaeex1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1673400289; bh=/+NR/Xee6aWvcF1eKtemMZSAlIgM6Lt9wmSS0mB/bJY=; h=Cc:Date:From:Reply-To:Subject:To; b=Esp1JA2Il9mNu2BcM9pFBRJ4i/SjY5p1mW4FAdFsc6AU54VKwIm+QgJI6abcsb8SGfH RTgr+xb+nUsHo5nVIbu3SEGgX37Vud5q+5E+2JbywaITFtJ8cANsLhNFjZNR4DCUHHnJ/ 5OWSYp+Pmhk8eeU9hUspWayvRPCKrw+6/jg= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1673400291557100001 Content-Type: text/plain; charset="utf-8" From: Min M Xu BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4237 Commit 9fdc70af6ba8 install the QemuAcpiTableNotifyProtocol at a wrong positioin. It should be called before TransferS3ContextToBootScript because TransferS3ContextToBootScript is the last operation in InstallQemuFwCfgTables(). Another error is that we should check the returned value after installing the QemuAcpiTableNotifyProtocol. This patch refactors the installation and error handling of QemuAcpiTableNotifyProtocol in InstallQemuFwCfgTables (). Cc: Laszlo Ersek Cc: Erdem Aktas Cc: James Bottomley Cc: Jiewen Yao Cc: Gerd Hoffmann Cc: Tom Lendacky Reported-by: Laszlo Ersek Signed-off-by: Min Xu Reviewed-by: Laszlo Ersek --- OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c | 38 ++++++++++++++++--------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c b/OvmfPkg/AcpiPlatform= Dxe/QemuFwCfgAcpi.c index 462921466604..f0d81d6fd73d 100644 --- a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c +++ b/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c @@ -1247,6 +1247,21 @@ InstallQemuFwCfgTables ( } } =20 + // + // Install a protocol to notify that the ACPI table provided by Qemu is + // ready. + // + QemuAcpiHandle =3D NULL; + Status =3D gBS->InstallProtocolInterface ( + &QemuAcpiHandle, + &gQemuAcpiTableNotifyProtocolGuid, + EFI_NATIVE_INTERFACE, + NULL + ); + if (EFI_ERROR (Status)) { + goto UninstallAcpiTables; + } + // // Translating the condensed QEMU_LOADER_WRITE_POINTER commands to ACPI = S3 // Boot Script opcodes has to be the last operation in this function, be= cause @@ -1255,7 +1270,7 @@ InstallQemuFwCfgTables ( if (S3Context !=3D NULL) { Status =3D TransferS3ContextToBootScript (S3Context); if (EFI_ERROR (Status)) { - goto UninstallAcpiTables; + goto UninstallQemuAcpiTableNotifyProtocol; } =20 // @@ -1266,6 +1281,15 @@ InstallQemuFwCfgTables ( =20 DEBUG ((DEBUG_INFO, "%a: installed %d tables\n", __FUNCTION__, Installed= )); =20 +UninstallQemuAcpiTableNotifyProtocol: + if (EFI_ERROR (Status)) { + gBS->UninstallProtocolInterface ( + QemuAcpiHandle, + &gQemuAcpiTableNotifyProtocolGuid, + NULL + ); + } + UninstallAcpiTables: if (EFI_ERROR (Status)) { // @@ -1275,18 +1299,6 @@ UninstallAcpiTables: --Installed; AcpiProtocol->UninstallAcpiTable (AcpiProtocol, InstalledKey[Install= ed]); } - } else { - // - // Install a protocol to notify that the ACPI table provided by Qemu is - // ready. - // - QemuAcpiHandle =3D NULL; - gBS->InstallProtocolInterface ( - &QemuAcpiHandle, - &gQemuAcpiTableNotifyProtocolGuid, - EFI_NATIVE_INTERFACE, - NULL - ); } =20 for (SeenPointerEntry =3D OrderedCollectionMin (SeenPointers); --=20 2.29.2.windows.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#98263): https://edk2.groups.io/g/devel/message/98263 Mute This Topic: https://groups.io/mt/96191601/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sun May 19 01:43:14 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+98264+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+98264+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1673400292; cv=none; d=zohomail.com; s=zohoarc; b=AG5k+AbY6i/EQW4qtTLsxm+tJwdVE7POU87SrJAHs0zsovexQXJbNPlAb4Q+3TDDJ/+91digJ0NJHSWhSIuWjL1cJHZ/Q5TvSpQWyo+J4rKm6+QPVrvFb36we/TXNh+9LWF7XEbKMdKENRDC/nS7mENHXxsn81yLr954/LgrXws= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673400292; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=mmlf3SYI4QA4bcnYlfFYNLySNvh0RKOietzUwePB/YM=; b=i6osUt4EDA7AZiGO/tfnuhoe2gn9xr96/+SyKxwGpYlifPRr4MBAL7uggyvqQituftcqMNN1u/gqin5NHwN5I8OSC0sBYQb+R3QHDiAFIJAQEKIbiM+zBcuuEdLFo/OAD8z5h3k5Hm/+h9uDoz2lYYv8OGzc+457A1MvBi5F9N8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+98264+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1673400292260569.7924056099746; Tue, 10 Jan 2023 17:24:52 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id 0XKYYY1788612xZHUMy7nkz3; Tue, 10 Jan 2023 17:24:51 -0800 X-Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web10.12263.1673400289090483968 for ; Tue, 10 Jan 2023 17:24:51 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10586"; a="387764545" X-IronPort-AV: E=Sophos;i="5.96,315,1665471600"; d="scan'208";a="387764545" X-Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jan 2023 17:24:38 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10586"; a="659192889" X-IronPort-AV: E=Sophos;i="5.96,315,1665471600"; d="scan'208";a="659192889" X-Received: from mxu9-mobl1.ccr.corp.intel.com ([10.213.42.137]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jan 2023 17:24:28 -0800 From: "Min Xu" To: devel@edk2.groups.io Cc: Min M Xu , Erdem Aktas , James Bottomley , Jiewen Yao , Gerd Hoffmann , Tom Lendacky , Sebastien Boeuf Subject: [edk2-devel] [PATCH V3 6/6] OvmfPkg/AcpiPlatformDxe: Return error if installing NotifyProtocol failed Date: Wed, 11 Jan 2023 09:22:35 +0800 Message-Id: <20230111012235.189-7-min.m.xu@intel.com> In-Reply-To: <20230111012235.189-1-min.m.xu@intel.com> References: <20230111012235.189-1-min.m.xu@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,min.m.xu@intel.com X-Gm-Message-State: EnAgB89m9CX10hg80zYL8UhCx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1673400291; bh=uvw+7QlU2AvpaHq5G/4iveYNGC2AMQVZ94ckT3Omquk=; h=Cc:Date:From:Reply-To:Subject:To; b=g0684blj2aRVpm2vReqBTbgiiJVbjRvioEGRcWDJA9u4/CSEnAbWhOmKnMY6f9ZrrWf i1haRwfOcFpdCzJ0hlgXv7cARKFsb/97fyDY/Ko8N09CkJpDOxWZu1yarIJaTB+MLTNTH cbuG17CXvP7WzgNhvwKAjN/C+aBBt5jPp88= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1673400293544100005 Content-Type: text/plain; charset="utf-8" From: Min M Xu BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4237 Installation of gQemuAcpiTableNotifyProtocol may fail. The error code should be returned so that the caller can handle it. Cc: Erdem Aktas Cc: James Bottomley Cc: Jiewen Yao Cc: Gerd Hoffmann Cc: Tom Lendacky Cc: Sebastien Boeuf Signed-off-by: Min Xu Reported-by: Laszlo Ersek Reviewed-by: Sebastien Boeuf --- OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c b/OvmfPkg/AcpiPlatformDx= e/CloudHvAcpi.c index 8f90ea23996d..d56eb074a987 100644 --- a/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c +++ b/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c @@ -89,12 +89,16 @@ InstallCloudHvTablesTdx ( // ready. // ChAcpiHandle =3D NULL; - gBS->InstallProtocolInterface ( - &ChAcpiHandle, - &gQemuAcpiTableNotifyProtocolGuid, - EFI_NATIVE_INTERFACE, - NULL - ); + Status =3D gBS->InstallProtocolInterface ( + &ChAcpiHandle, + &gQemuAcpiTableNotifyProtocolGuid, + EFI_NATIVE_INTERFACE, + NULL + ); + if (EFI_ERROR (Status)) { + ASSERT_EFI_ERROR (Status); + return Status; + } =20 return EFI_SUCCESS; } --=20 2.29.2.windows.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#98264): https://edk2.groups.io/g/devel/message/98264 Mute This Topic: https://groups.io/mt/96191603/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-