From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web11.9176.1681203662523362275 for ; Tue, 11 Apr 2023 02:01:03 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=P1+yI/Zx; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: ray.ni@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681203662; x=1712739662; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=SPBdfds9PkIRMcVx3qEFhF65Qhma1t3yI3oU9ybGDxY=; b=P1+yI/ZxFtaKGTvSLSfwS/sm3AAEqEvv8Rm/SA+R+mOpQ/gPID7pHtC9 UsZT5U/y0d79ztAb725iPYSvGKm4XnYlWykACgttBQ6IVbX3eZ/lIyDM3 jEHKDTpffVRruNJ3fXwjUohquX7KQGW77NXROzAbQAEHlq75G+MQ5H6kh KxCo2XEVVukANutH74C0Ul70oLYjrpYnsrU7RJ5c+JsRvsZqUQnjeotsc SanbgeG1bqksOas6LaeqiRzy6wrCGp+uac4cb7ALZWdtOiE3lYGbEGNS+ rhx+bsZe93uoQrk6T4ZMZtwysoJRAwER2SGghFhPTgKDi2lkJipKSW3Q+ Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10676"; a="406387896" X-IronPort-AV: E=Sophos;i="5.98,336,1673942400"; d="scan'208";a="406387896" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Apr 2023 02:01:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10676"; a="721121861" X-IronPort-AV: E=Sophos;i="5.98,336,1673942400"; d="scan'208";a="721121861" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga001.jf.intel.com with ESMTP; 11 Apr 2023 02:01:01 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Tue, 11 Apr 2023 02:01:01 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23 via Frontend Transport; Tue, 11 Apr 2023 02:01:01 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.176) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.23; Tue, 11 Apr 2023 02:01:00 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A1gSUxkcFJaQDkGrMj4IHgAoSgnQ+avkl3W/6NrKhAfKuYarykvbkuLQZVmnTrS5wQewgNy696cG8+5oFqaj5GV8nWu4Qw0jvVRc23lPOfobSim0Iqoct+oiuBlSZofLppGTnAT8CKRvzwRstYSn6fSEriyyhYnMMIYC6Xv6PXrYUAF6Z0SOLDCUkKTKObW/j3iEMSJ/ytH3EjbRz3BN+2juYkFfqwaU+zTFaPGkwXXTDG9BxIAykxeVeoaepSDpdk2frVB8rcUAT/oe1vxNdarJumvin5+7MNiFVmsr/ZqXw5M8xZ9qjfilNVfijfO5M1TX5qn+0Myb712ar3PN1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=IdBGFfyBEngbfB+ijVGHThRDwFx1IuMsdh6YftMhEeQ=; b=gRtaoSmCroALXhM1fws+ZrSvqonIYwipb5TsLdsMED7VDKeFFlmPFuE+TksMeL1m3GNxaRlXzRsjDI+sc2Z2JqwUeI94jli0SvZ9cA9yZmjAYcZTyTQqUtQgtb231jMOkNJI+cy6dkz8CUBpfZDoTFLSz0R11rhneRCSLY8Ny5OPA3FQjgEOTr5Xt9fILbb71zJFsn0nnM2n3/Ypw3n5n6k36xAPe/gtwo4G3zzdL1UMgZMXFKGt4dmYfuKAB+xkXqnO8+wwrGnUhntXqLCuURzaPlB47qz/ij4u7t3TFq85b9x9ZetfQ/YHY21CPVMvBF186WCwpUgR0rcRNdI6Tg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from MN6PR11MB8244.namprd11.prod.outlook.com (2603:10b6:208:470::14) by DS0PR11MB8069.namprd11.prod.outlook.com (2603:10b6:8:12c::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.36; Tue, 11 Apr 2023 09:00:54 +0000 Received: from MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::ae07:e96a:4a24:8a69]) by MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::ae07:e96a:4a24:8a69%7]) with mapi id 15.20.6277.034; Tue, 11 Apr 2023 09:00:54 +0000 From: "Ni, Ray" To: Abdul Lateef Attar , "devel@edk2.groups.io" CC: Paul Grimes , Garrett Kirkendall , Abner Chang , "Dong, Eric" , "Kumar, Rahul R" , "Gerd Hoffmann" , Ard Biesheuvel , "Yao, Jiewen" , "Justen, Jordan L" Subject: Re: [PATCH v8 8/9] UefiCpuPkg: Uses SmmSmramSaveStateLib library Thread-Topic: [PATCH v8 8/9] UefiCpuPkg: Uses SmmSmramSaveStateLib library Thread-Index: AQHZa50r3+2l9Gn7nkG8kiJ4C8LUqa8lz6zQ Date: Tue, 11 Apr 2023 09:00:53 +0000 Message-ID: References: <0bc7e47da753c14dd68fcc1b564e66a44c272aaa.1681121324.git.abdattar@amd.com> In-Reply-To: <0bc7e47da753c14dd68fcc1b564e66a44c272aaa.1681121324.git.abdattar@amd.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN6PR11MB8244:EE_|DS0PR11MB8069:EE_ x-ms-office365-filtering-correlation-id: 08f47484-e571-421a-46e6-08db3a6b4195 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: FLCWBv56D/iNE4dlRLobkjAAILB/NI4A1E3mgT3ZF9aDVkSCFFbOZ/3lEJUSsIcVmm9PeiRxfUrzcOfZ8JMRUgIB1+8McYYFw1sAiiEiIo9t9K8/AwczounXzlln20ZTzCMpzLfQiEJmkfoGclDXqs8oCa+Md2AQg+AOXNoyh2TrBif0bKiVpTqLVC7JiWTbo4Kh2hVT2Dew3ycCotOiXYHCSi6hm7HNX7Ef/Zf0L92btKFf+zxdPnJ0iNun2HtgwbZ1xOIzGsK1a2CZMKoONIhT5MumXqDneaSADd2VFnhB4AZTi1ssil2Y7QQWQ8gae40Ml7G/peIut0oeX+LUoQ9zVhwsTW3YtWGzQvdF/rpK1XqcMfII44qxx8UXVZvs+pwvmo4Oh5xOPDJlSx8+sE/5q7LvUHdjek6B1J94PZkbSmOlPRtjXcpkCE91HXm6M/sYCrSqKorV+Sdyb6kLFBt73zHjOoQHyR3ECfqJWOz9cjft66aWCio7P819AKZixAkatlPJVh0l5UG9ON8Cs7F53q6D/ga6AinKAt0Vrgu3wYngPqHPJzfH8doNGlf6xnVev6sV90E9Hoi/JbejH636/1FylSb46x5a6rZgyHfKVt/gNtGKU/kakiHCvdKi/DS38IXTjd7eVn6hYkQ2Pg== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN6PR11MB8244.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(396003)(376002)(346002)(366004)(39860400002)(136003)(451199021)(71200400001)(7696005)(478600001)(316002)(110136005)(9686003)(26005)(6506007)(186003)(54906003)(4744005)(2906002)(5660300002)(4326008)(66946007)(76116006)(107886003)(66446008)(41300700001)(8676002)(66476007)(64756008)(52536014)(8936002)(66556008)(38100700002)(122000001)(86362001)(83380400001)(55016003)(33656002)(82960400001)(38070700005)(213903007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?dA292W8/KkMsBjG5VjRn114U2xm4t8nVITAMtqCoCvtooeW9UdGWMnQBqwXY?= =?us-ascii?Q?GE8QREY5kUy4kDx9IoiuIc+H2U9bVc4x5FkvTKFd9N+h1SABzfTZ+nkHRFXW?= =?us-ascii?Q?a7dg9K6R3ZtW2VEatpROP+a67LeuxsNx4JFav65FYeogJaC5qvQNpsG45Rb4?= =?us-ascii?Q?GXznEg+bcosBEAIaGc2HB/I4cwTM11yeO6JRi7LmRT67B+Xmb5+G6FRgRD1+?= =?us-ascii?Q?Y/LByHcJANLIrDK8DPQVYM66YaclQGFVlh0dkWZXlAT3SYCy1H6Qk2vww+Hk?= =?us-ascii?Q?41JJ1xsunY1HGbYV8nKdMdcf56oCaCn5ssIa6uPg7XBL1EqD64VSlsN1UX0m?= =?us-ascii?Q?ASlq7reqf7a6OV0AscanUsBNZKDUApyT27yKykC7r4MUeqoxmPpAMbcLBa1b?= =?us-ascii?Q?GHIU/yZJ/JZEgf19qBJGPKaHkqxcMeOzD8UxSXZH38GW5q6jb5MAQy5Ox7A/?= =?us-ascii?Q?wQc3tZ88yQnjXblxszNAzZyFT+wcqqp5Cabv1V/MhT7EKPD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Dz92NMM3/SDfq/bX7oUJj27eD8v44m+obkgCdAaRK?= =?us-ascii?Q?jltQwRlasby6kG8pMnA+CSWKDNn7dMZPV+HFzZovg/2t9DnVeWO9b6qpFigS?= =?us-ascii?Q?3b30/1q9joPcmLRa9N2wQ8JjjfxL2W4l82BIxqh/xLXxQaJxDOmjFNDqQk0N?= =?us-ascii?Q?Dqp2HJLmzdGkRSIbBxs=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN6PR11MB8244.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 08f47484-e571-421a-46e6-08db3a6b4195 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Apr 2023 09:00:53.9085 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Oh6vW2IATv5pQE79a6yYSE/RpTRVl1skt1yI/3D89CTJVmmrmOBV0wY7h3iDCA0Bs5UB3EcqRKC+dkfD1sBvwQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR11MB8069 Return-Path: ray.ni@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > Status =3D SmmCpuFeaturesReadSaveStateRegister (CpuIndex, Register, > Width, Buffer); > if (Status =3D=3D EFI_UNSUPPORTED) { > - Status =3D ReadSaveStateRegister (CpuIndex, Register, Width, Buffer)= ; > + Status =3D SmramSaveStateReadRegister (CpuIndex, Register, Width, > Buffer); > } >=20 I would expect that above code unconditionally calls SmramSaveStateReadRegi= ster() instead of having the Smram Save state access logic in either SmmCpuFeature= sLib or in SmramSaveStateLib. In open source project, you could directly call SmramSaveStateReadRegister(= ) because SmmCpuFeaturesReadSaveStateRegister() in edk2 repo returns EFI_UNSUPPORTED. I agree that close-source project which does something in SmmCpuFeaturesRea= dSaveStateRegister() should update the implementation to move the logic from SmmCpuFeaturesReadSaveStateRegister() to the new close-= source MmSaveStateLib instance. We should explicitly mention the impact to these projects in commit message= s. Thanks, Ray