public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Boeuf, Sebastien" <sebastien.boeuf@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"Xu, Min M" <min.m.xu@intel.com>
Cc: "kraxel@redhat.com" <kraxel@redhat.com>,
	"jejb@linux.ibm.com" <jejb@linux.ibm.com>,
	"Yao, Jiewen" <jiewen.yao@intel.com>,
	"thomas.lendacky@amd.com" <thomas.lendacky@amd.com>,
	"Aktas, Erdem" <erdemaktas@google.com>,
	"lersek@redhat.com" <lersek@redhat.com>
Subject: Re: [PATCH V3 2/6] OvmfPkg/AcpiPlatformDxe: Use local variable in CloudHvAcpi.c
Date: Thu, 12 Jan 2023 10:04:23 +0000	[thread overview]
Message-ID: <3b80e0c4c29763c3cc4780048aa1bab9b127b75a.camel@intel.com> (raw)
In-Reply-To: <20230111012235.189-3-min.m.xu@intel.com>

On Wed, 2023-01-11 at 09:22 +0800, Min Xu wrote:
> From: Min M Xu <min.m.xu@intel.com>
> 
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4237
> 
> 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 <lersek@redhat.com>
> Cc: Erdem Aktas <erdemaktas@google.com>
> Cc: James Bottomley <jejb@linux.ibm.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Tom Lendacky <thomas.lendacky@amd.com>
> Cc: Sebastien Boeuf <sebastien.boeuf@intel.com>
> Reported-by: Laszlo Ersek <lersek@redhat.com>
> Signed-off-by: Min Xu <min.m.xu@intel.com>
> ---
>  OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c
> b/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c
> index ad39e4253478..8f90ea23996d 100644
> --- a/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c
> +++ b/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c
> @@ -20,8 +20,6 @@
>  
>  #include "AcpiPlatform.h"
>  
> -EFI_HANDLE  mChAcpiHandle = NULL;
> -
>  EFI_STATUS
>  EFIAPI
>  InstallCloudHvTablesTdx (
> @@ -30,6 +28,7 @@ InstallCloudHvTablesTdx (
>  {
>    EFI_STATUS  Status;
>    UINTN       TableHandle;
> +  EFI_HANDLE  ChAcpiHandle;
>  
>    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 = NULL;
>    gBS->InstallProtocolInterface (
> -         &mChAcpiHandle,
> +         &ChAcpiHandle,
>           &gQemuAcpiTableNotifyProtocolGuid,
>           EFI_NATIVE_INTERFACE,
>           NULL

Looks good and I've tested Cloud Hypervisor with both CloudHvX64 and
IntelTdxX64 targets.

Reviewed-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris, 
92196 Meudon Cedex, France
Registration Number:  302 456 199 R.C.S. NANTERRE
Capital: 5 208 026.16 Euros

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

  reply	other threads:[~2023-01-12 10:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-11  1:22 [PATCH V3 0/6] Refactor installation of gQemuAcpiTableNotifyProtocol Min Xu
2023-01-11  1:22 ` [PATCH V3 1/6] OvmfPkg/AcpiPlatformDxe: Remove QEMU_ACPI_TABLE_NOTIFY_PROTOCOL Min Xu
2023-01-12 10:03   ` Boeuf, Sebastien
2023-01-11  1:22 ` [PATCH V3 2/6] OvmfPkg/AcpiPlatformDxe: Use local variable in CloudHvAcpi.c Min Xu
2023-01-12 10:04   ` Boeuf, Sebastien [this message]
2023-01-11  1:22 ` [PATCH V3 3/6] OvmfPkg/AcpiPlatformDxe: Use local variable in QemuFwCfgAcpi.c Min Xu
2023-01-11 16:49   ` [edk2-devel] " Laszlo Ersek
2023-01-11  1:22 ` [PATCH V3 4/6] OvmfPkg/AcpiPlatformDxe: Add log to show the installed tables Min Xu
2023-01-11  1:22 ` [PATCH V3 5/6] OvmfPkg/AcpiPlatformDxe: Refactor QemuAcpiTableNotifyProtocol Min Xu
2023-01-11 16:53   ` [edk2-devel] " Laszlo Ersek
2023-01-11  1:22 ` [PATCH V3 6/6] OvmfPkg/AcpiPlatformDxe: Return error if installing NotifyProtocol failed Min Xu
2023-01-12 10:04   ` Boeuf, Sebastien
2023-01-15 11:50 ` [edk2-devel] [PATCH V3 0/6] Refactor installation of gQemuAcpiTableNotifyProtocol Laszlo Ersek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3b80e0c4c29763c3cc4780048aa1bab9b127b75a.camel@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox