From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.132.183.28; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 9872C2116326D for ; Thu, 18 Oct 2018 10:59:01 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 80ADD30B8F99; Thu, 18 Oct 2018 17:59:00 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-121-50.rdu2.redhat.com [10.10.121.50]) by smtp.corp.redhat.com (Postfix) with ESMTP id AC1C6105704B; Thu, 18 Oct 2018 17:58:59 +0000 (UTC) To: Eric Dong , edk2-devel@lists.01.org Cc: Ruiyu Ni References: <20181018073448.11496-1-eric.dong@intel.com> <20181018073448.11496-5-eric.dong@intel.com> From: Laszlo Ersek Message-ID: <1c5ee4d6-8642-4a34-05cf-d1fece1f1fb6@redhat.com> Date: Thu, 18 Oct 2018 19:58:53 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20181018073448.11496-5-eric.dong@intel.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Thu, 18 Oct 2018 17:59:00 +0000 (UTC) Subject: Re: [Patch v3 4/6] UefiCpuPkg/PiSmmCpuDxeSmm: Add logic to support semaphore type. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Oct 2018 17:59:01 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Hi Eric, On 10/18/18 09:34, Eric Dong wrote: > V3 changes: > 1. Use global variable instead of internal function to return string for register type > and dependence type. > 2. Add comments for some complicated logic. > > V1 changes: > Because this driver needs to set MSRs saved in normal boot phase, sync > semaphore logic from RegisterCpuFeaturesLib code which used for normal boot phase. > > Detail see below change for RegisterCpuFeaturesLib: > UefiCpuPkg/RegisterCpuFeaturesLib: Add logic to support semaphore type. > > Cc: Ruiyu Ni > Cc: Laszlo Ersek > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Eric Dong > --- > UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c | 385 ++++++++++++++++++----------- > UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c | 3 - > UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h | 3 +- > 3 files changed, 248 insertions(+), 143 deletions(-) I've checked my comments for v1 against this version (v3). They have all been addressed, except (13) and (14). Regarding those, I elaborated under patch v3 5/6 already. Basically, PiSmmCpuDxeSmm should continue to work without problems if a platform takes the "empty RegisterTable and PreSmmInitRegisterTable" branch in CpuS3DataDxe. With those comments addressed, I'd be ready to regression-test the next version of the series. Thanks! Laszlo