From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (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 AFA1B21CF25C1 for ; Wed, 9 Aug 2017 00:59:30 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP; 09 Aug 2017 01:01:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,346,1498546800"; d="scan'208";a="121573318" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga002.jf.intel.com with ESMTP; 09 Aug 2017 01:01:47 -0700 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 9 Aug 2017 01:01:47 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 9 Aug 2017 01:01:46 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.114]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.128]) with mapi id 14.03.0319.002; Wed, 9 Aug 2017 16:01:45 +0800 From: "Wu, Hao A" To: "Ni, Ruiyu" , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [PATCH 0/2] Notify NVME HW when system reset happens Thread-Index: AQHTDy27opoXH982gESL6QvIakhveaJ4b2ZwgAK2L4CAAIcbwA== Date: Wed, 9 Aug 2017 08:01:44 +0000 Message-ID: References: <20170807033142.177248-1-ruiyu.ni@intel.com> <734D49CCEBEEF84792F5B80ED585239D5B9E30A7@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <734D49CCEBEEF84792F5B80ED585239D5B9E30A7@SHSMSX104.ccr.corp.intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH 0/2] Notify NVME HW when system reset happens X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Aug 2017 07:59:30 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: Ni, Ruiyu > Sent: Wednesday, August 09, 2017 3:57 PM > To: Wu, Hao A; edk2-devel@lists.01.org > Subject: RE: [edk2] [PATCH 0/2] Notify NVME HW when system reset happens >=20 > The NVME controller requires notification for shutdown as part of its > management of internal structures. Even with FUA, failing to notify the = NVME > controller to shutdown power off causes the NVME controller to take quite > some time to organize its tables on the next power on. This time exceeds= the > normal timeout, so we would fail to boot the NVME disk. Got it, thanks for the clarification. >=20 > I will put above explanation into the commit message as well. The series is good to me. Reviewed-by: Hao Wu Best Regards, Hao Wu >=20 > Thanks/Ray >=20 > > -----Original Message----- > > From: Wu, Hao A > > Sent: Monday, August 7, 2017 3:14 PM > > To: Ni, Ruiyu ; edk2-devel@lists.01.org > > Subject: RE: [edk2] [PATCH 0/2] Notify NVME HW when system reset > > happens > > > > Hi Ray, > > > > Just for curiosity, I checked the NVME spec for the purpose of a shutdo= wn > > notification to the controller when there is a power-off for the device= . And > > found the following: > > > > 1. Will increase the field 'Unsafe Shutdowns' in the SMART/Health > > Information data (Section 5.10.1.2). > > > > 2. Subsequent reads for locations written to the volatile write cache t= hat > > were not written to non-volatile storage may return older data. (Sectio= n > > 6.4.2.1) > > > > For 2, the implementation of the NVME driver always sets the Force Unit > > Access (FUA) bit for write operations. Hence, the read operation will r= eflect > > the latest data on device. > > > > So missing the shutdown notification will increase the number of 'Unsaf= e > > Shutdowns' tracked by the controller. Is there any other issue being > > introduced by missing the notification? > > > > Besides, the change is good for me. > > > > > > Best Regards, > > Hao Wu > > > > > -----Original Message----- > > > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf O= f > > > Ruiyu Ni > > > Sent: Monday, August 07, 2017 11:32 AM > > > To: edk2-devel@lists.01.org > > > Subject: [edk2] [PATCH 0/2] Notify NVME HW when system reset happens > > > > > > Per NVM Express Spec, software should notify NVME HW when shutdown > > > occurs. > > > > > > The host should set the Shutdown Notification (CC.SHN) field to 01b t= o > > > indicate a normal shutdown operation. The controller indicates when > > > shutdown processing is completed by updating the Shutdown Status > > > (CSTS.SHST) field to 10b. > > > > > > Ruiyu Ni (2): > > > MdePkg/Nvme: Add NVME shutdown notification related macros > > > MdeModulePkg/NvmExpressDxe: Notify NVME HW when system reset > > happens > > > > > > MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c | 7 +- > > > MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.h | 23 ++- > > > .../Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf | 3 +- > > > MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c | 181 > > > ++++++++++++++++++++- > > > MdePkg/Include/IndustryStandard/Nvme.h | 6 +- > > > 5 files changed, 215 insertions(+), 5 deletions(-) > > > > > > -- > > > 2.12.2.windows.2 > > > > > > _______________________________________________ > > > edk2-devel mailing list > > > edk2-devel@lists.01.org > > > https://lists.01.org/mailman/listinfo/edk2-devel