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.web10.54160.1673528693455479849 for ; Thu, 12 Jan 2023 05:04:53 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=RG+FbYMP; 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=1673528692; 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=HvFiDu1InD78KxliHCsOPF6/KLoIBskd1qdAnbvRh4Q=; b=RG+FbYMPO9eLgAKQKpSTIbDsQlvPuXEo8oc6hkvU7XXWR4ZOVVX0Fyt3tuwZUXuxp8nVKa 6N6FgXJ2Oclz2hdOI0HYuYe4RjHjKlAKV0AH2QNm9lLAQ/TRv9GCqqhkWRzL0VY1b7Zctw bgoL577ePsawyHhN2fjmFZd7KRqn+B4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-6-27xQjKseMsWqZ93lBZ8-Gw-1; Thu, 12 Jan 2023 08:04:49 -0500 X-MC-Unique: 27xQjKseMsWqZ93lBZ8-Gw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D599C802C1D; Thu, 12 Jan 2023 13:04:48 +0000 (UTC) Received: from [10.39.192.93] (unknown [10.39.192.93]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7C7F71121314; Thu, 12 Jan 2023 13:04:46 +0000 (UTC) Message-ID: Date: Thu, 12 Jan 2023 14:04:45 +0100 MIME-Version: 1.0 Subject: Re: [edk2-devel] [PATCH v2 0/6] Adds AmdSmmCpuFeaturesLib To: devel@edk2.groups.io, abdattar@amd.com Cc: Paul Grimes , Garrett Kirkendall , Abner Chang , Eric Dong , Ray Ni , Rahul Kumar , Michael D Kinney , Liming Gao , Zhiguang Liu , Gerd Hoffmann References: From: "Laszlo Ersek" In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 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/11/23 07:15, Abdul Lateef Attar via groups.io wrote: > V2 series addresses review comments from V1. > Adds SmmSmramSaveStateLib library > Removes global references across modules. > drops S3 support patch. > > PR: https://github.com/tianocore/edk2/pull/3882 > > Cc: Paul Grimes > Cc: Garrett Kirkendall > Cc: Abner Chang > Cc: Eric Dong > Cc: Ray Ni > Cc: Rahul Kumar > Cc: Michael D Kinney > Cc: Liming Gao > Cc: Zhiguang Liu > > Abdul Lateef Attar (6): > UefiCpuPkg/SmmCpuFeaturesLib: Restructure arch-dependent code > MdePkg: Adds AMD SMRAM save state map > UefiCpuPkg: Adds SmmSmramSaveStateLib library class > UefiCpuPkg: Implements SmmSmramSaveStateLib library class > UefiCpuPkg: Initial implementation of AMD's SmmCpuFeaturesLib > UefiCpuPkg: Implements SmmCpuFeaturesLib for AMD Family > > UefiCpuPkg/UefiCpuPkg.dec | 4 + > UefiCpuPkg/UefiCpuPkg.dsc | 11 + > .../AmdSmmCpuFeaturesLib.inf | 39 ++ > .../AmdSmmSmramSaveStateLib.inf | 28 ++ > .../Include/Register/Amd/SmramSaveStateMap.h | 194 ++++++++ > .../Include/Library/SmmSmramSaveStateLib.h | 69 +++ > .../SmmSmramSaveStateLib/SmramSaveState.h | 102 ++++ > .../SmmCpuFeaturesLib/Amd/SmmCpuFeaturesLib.c | 445 ++++++++++++++++++ > .../IntelSmmCpuFeaturesLib.c | 128 +++++ > .../SmmCpuFeaturesLibCommon.c | 128 ----- > .../SmmSmramSaveStateLib/Amd/SmramSaveState.c | 318 +++++++++++++ > .../SmramSaveStateCommon.c | 124 +++++ > MdePkg/MdePkg.ci.yaml | 3 +- > 13 files changed, 1464 insertions(+), 129 deletions(-) > create mode 100644 UefiCpuPkg/Library/SmmCpuFeaturesLib/AmdSmmCpuFeaturesLib.inf > create mode 100644 UefiCpuPkg/Library/SmmSmramSaveStateLib/AmdSmmSmramSaveStateLib.inf > create mode 100644 MdePkg/Include/Register/Amd/SmramSaveStateMap.h > create mode 100644 UefiCpuPkg/Include/Library/SmmSmramSaveStateLib.h > create mode 100644 UefiCpuPkg/Library/SmmSmramSaveStateLib/SmramSaveState.h > create mode 100644 UefiCpuPkg/Library/SmmCpuFeaturesLib/Amd/SmmCpuFeaturesLib.c > create mode 100644 UefiCpuPkg/Library/SmmSmramSaveStateLib/Amd/SmramSaveState.c > create mode 100644 UefiCpuPkg/Library/SmmSmramSaveStateLib/SmramSaveStateCommon.c > - Is there a feature BZ for this? There should be. Explaining the goal of the patch set belongs there. Plus, if there is a feature BZ like that, it can be included in the Proposed Features list at , and then associated with the next release notes at . - OVMF's SmmCpuFeaturesLib (OvmfPkg/Library/SmmCpuFeaturesLib) matches QEMU, and QEMU uses the AMD flavor of the save state map. I don't think OVMF's library instance can be used for physical AMD processors whole-sale, so the library instances should remain separate. However, the register maps could be shared by some means, perhaps. - Please copy Gerd on UefiCpuPkg patches, per commit 0aca5901e344 ("Maintainers.txt: designate Gerd Hoffmann as UefiCpuPkg reviewer", 2023-01-06). Thanks for considering. Laszlo