From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web10.12235.1673400215720530378 for ; Tue, 10 Jan 2023 17:23:35 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=Tp+0DwO8; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: min.m.xu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673400215; x=1704936215; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=On7PvW95deyhz56rFVct93iaiNKyBEEfPod2iKV8TRU=; b=Tp+0DwO8w7fK7FSZzfUp/YjXWW9fMMqedGvQlsIvdmUJ1OMRSjpJZE47 YAtW66s+L6583hSjwacI9KSaaOwWO74zPH8kKY0DZwyd/GYOhJ1e7pAMn IWG11iY1eivei3f323Ukv84SoEzDTkMwR9Yo1BQh00470gzuKjrPDQMGl GVrNr2lU0HfOFyj8dw02kwzIOQsTOjZqNAKAov5knN7ltwwzM5zeEcCKf 6lS+zxEKKMoA/habtZDJRmqt2W4KPdksdMS2tnE2PmNccMzHqkbRz2iRW sfIpygf7KS2Nlj88jt3qGgmaz62t/YgsN3M/v9WOEyoLWH3GksxCi+8Sh A==; X-IronPort-AV: E=McAfee;i="6500,9779,10586"; a="387764211" X-IronPort-AV: E=Sophos;i="5.96,315,1665471600"; d="scan'208";a="387764211" 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:35 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10586"; a="659192653" X-IronPort-AV: E=Sophos;i="5.96,315,1665471600"; d="scan'208";a="659192653" 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:24 -0800 From: "Min Xu" To: devel@edk2.groups.io Cc: Min Xu , Laszlo Ersek , Erdem Aktas , James Bottomley , Jiewen Yao , Gerd Hoffmann , Tom Lendacky , Sebastien Boeuf Subject: [PATCH V3 0/6] Refactor installation of gQemuAcpiTableNotifyProtocol Date: Wed, 11 Jan 2023 09:22:29 +0800 Message-Id: <20230111012235.189-1-min.m.xu@intel.com> X-Mailer: git-send-email 2.29.2.windows.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4237 Commit 9fdc70af6ba8 breaks log analysis and code cohesion in AcpiPlatformDxe. See the detailed information in BZ#4237. This patch-set contains below patches to fix above issues. #1: Remove QEMU_ACPI_TABLE_NOTIFY_PROTOCOL and delete QemuAcpiTableNotify.h. #2: Use local variable of ChAcpiHandle to store the handle. #3: Use local variable of QemuAcpiHandle to store the handle. #4: Add log to show how many ACPI tables installed. #5: Refactor the installation of QemuAcpiTableNotifyProtocol and its error handling. #6: Return error code if QemuAcpiTableNotifyProtocol is failed to be installed so that the caller can handle the error. Code: https://github.com/mxu9/edk2/tree/AcpiPlatformDxe.v3 v3 changes: - Set QemuAcpiHandle to NULL right before installing the gQemuAcpiTableNotifyProtocol. v2 changes: - Split v1 patch into 6 separate patches. 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 Min M Xu (6): OvmfPkg/AcpiPlatformDxe: Remove QEMU_ACPI_TABLE_NOTIFY_PROTOCOL OvmfPkg/AcpiPlatformDxe: Use local variable in CloudHvAcpi.c OvmfPkg/AcpiPlatformDxe: Use local variable in QemuFwCfgAcpi.c OvmfPkg/AcpiPlatformDxe: Add log to show the installed tables OvmfPkg/AcpiPlatformDxe: Refactor QemuAcpiTableNotifyProtocol OvmfPkg/AcpiPlatformDxe: Return error if installing NotifyProtocol failed OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c | 23 +++++----- OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c | 43 ++++++++++++------- .../Include/Protocol/QemuAcpiTableNotify.h | 27 ------------ 3 files changed, 40 insertions(+), 53 deletions(-) delete mode 100644 OvmfPkg/Include/Protocol/QemuAcpiTableNotify.h -- 2.29.2.windows.2