From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 8CF87740039 for ; Tue, 31 Oct 2023 11:45:02 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=RauDPvF8pUXO/Nwrbv0KjgWSSGxsDp6y1J/9C6159FM=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1698752701; v=1; b=AtdxxDikbovCt9Eq1fnAyYfTdRV5PGFkvH0/27KdZIu8GvfFNcqeB2Wiiy95Qpu4cf7s8kEn Gw7iPUqPnhTlPE5/6xRzhAJPszhEQsQerlWID6ITH9/mh6VH4XnMoeaFOd1q08y79nXbfY55eNa Bh32Y842noXZm/3W56+sM3xw= X-Received: by 127.0.0.2 with SMTP id J5l0YY7687511x7OFIFg88pY; Tue, 31 Oct 2023 04:45:01 -0700 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web10.183911.1698752700394406762 for ; Tue, 31 Oct 2023 04:45:00 -0700 X-Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-249-YVGGFVO8MkqHhXcxKfHSGA-1; Tue, 31 Oct 2023 07:44:56 -0400 X-MC-Unique: YVGGFVO8MkqHhXcxKfHSGA-1 X-Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 292161C294A1; Tue, 31 Oct 2023 11:44:56 +0000 (UTC) X-Received: from [10.39.195.34] (unknown [10.39.195.34]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E89A2492BE0; Tue, 31 Oct 2023 11:44:54 +0000 (UTC) Message-ID: <97764dcd-b054-b91d-1a67-dffa6c05c4f5@redhat.com> Date: Tue, 31 Oct 2023 12:44:53 +0100 MIME-Version: 1.0 Subject: Re: [edk2-devel] [PATCH v2] UefiCpuPkg/MmSaveStateLib: Remove checking Smm Rev ID in AMD MmSaveStateLib To: "Attar, AbdulLateef (Abdul Lateef)" , "Lin, Jacque" , "devel@edk2.groups.io" , Gerd Hoffmann , Paolo Bonzini Cc: "Chang, Abner" References: <20231031053711.1416-1-hsienchieh.lin@amd.com> From: "Laszlo Ersek" In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk 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,lersek@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: XYeMs6dOBeJJWAdNXauJXR8Vx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=AtdxxDik; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Hi, On 10/31/23 10:15, Attar, AbdulLateef (Abdul Lateef) wrote: > [Public] >=20 > +Laszlo, +Gerd, +Paolo > PR: https://github.com/tianocore/edk2/pull/4982 ... My opinion, stated elsewhere in this thread in detail, is that this patch is wrong, and should not be merged. Laszlo >=20 > -----Original Message----- > From: Lin, Jacque > Sent: Tuesday, October 31, 2023 11:07 AM > To: devel@edk2.groups.io > Cc: Lin, Jacque ; Attar, AbdulLateef (Abdul Latee= f) ; Chang, Abner > Subject: [PATCH v2] UefiCpuPkg/MmSaveStateLib: Remove checking Smm Rev ID= in AMD MmSaveStateLib >=20 > Remove checking SMM Rev ID in AMD Save State lib when reading Save State = Register EFI_MM_SAVE_STATE_REGISTER_IO. > For AMD, it is not necessary to check SmmRevId when reading Save State Re= gister EFI_MM_SAVE_STATE_REGISTER_IO. >=20 > Cc: Abdul Lateef Attar > Cc: Abner Chang > Signed-off-by: Jacque Lin > --- > UefiCpuPkg/Library/MmSaveStateLib/AmdMmSaveState.c | 13 ------------- > 1 file changed, 13 deletions(-) >=20 > diff --git a/UefiCpuPkg/Library/MmSaveStateLib/AmdMmSaveState.c b/UefiCpu= Pkg/Library/MmSaveStateLib/AmdMmSaveState.c > index 3315a6cc44..c4bf6ad4bb 100644 > --- a/UefiCpuPkg/Library/MmSaveStateLib/AmdMmSaveState.c > +++ b/UefiCpuPkg/Library/MmSaveStateLib/AmdMmSaveState.c > @@ -102,7 +102,6 @@ MmSaveStateReadRegister ( > OUT VOID *Buffer ) {- UINT32 = SmmRevId; EFI_MM_SAVE_STATE_IO_INFO *IoInfo; AMD_SMRAM_SAVE_STATE= _MAP *CpuSaveState; UINT8 DataWidth;@@ -124,18 +12= 3,6 @@ MmSaveStateReadRegister ( > // Check for special EFI_MM_SAVE_STATE_REGISTER_IO if (Register =3D= =3D EFI_MM_SAVE_STATE_REGISTER_IO) {- //- // Get SMM Revision ID- = //- MmSaveStateReadRegisterByIndex (CpuIndex, AMD_MM_SAVE_STATE_REGISTER= _SMMREVID_INDEX, sizeof (SmmRevId), &SmmRevId);-- //- // See if the C= PU supports the IOMisc register in the save state- //- if (SmmRevId <= AMD_SMM_MIN_REV_ID_X64) {- return EFI_NOT_FOUND;- }- // Check = if IO Restart Dword [IO Trap] is valid or not using bit 1. if (!(CpuSav= eState->x64.IO_DWord & 0x02u)) { return EFI_NOT_FOUND;-- > 2.36.1.windows.1 >=20 -=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 (#110401): https://edk2.groups.io/g/devel/message/110401 Mute This Topic: https://groups.io/mt/102292190/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/19134562= 12/xyzzy [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-