From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38325) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0KWd-00045V-9t for qemu-devel@nongnu.org; Wed, 03 Jun 2015 22:04:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z0KWY-0003UN-Aa for qemu-devel@nongnu.org; Wed, 03 Jun 2015 22:04:55 -0400 Received: from mga02.intel.com ([134.134.136.20]:57053) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0KWX-0003Sp-VU for qemu-devel@nongnu.org; Wed, 03 Jun 2015 22:04:50 -0400 From: "Tian, Feng" Date: Thu, 4 Jun 2015 02:04:37 +0000 Message-ID: <7F1BAD85ADEA444D97065A60D2E97EE501D6B562@SHSMSX101.ccr.corp.intel.com> References: <8530272280D33D4095B8F02BA1B57BAC3AFD753D@G9W0345.americas.hpqcorp.net> <7F1BAD85ADEA444D97065A60D2E97EE501D6A4BB@SHSMSX101.ccr.corp.intel.com> <8530272280D33D4095B8F02BA1B57BAC3AFD9AB1@G9W0345.americas.hpqcorp.net> <7F1BAD85ADEA444D97065A60D2E97EE501D6AB7C@SHSMSX101.ccr.corp.intel.com> <556D5F36.1050907@redhat.com> <7F1BAD85ADEA444D97065A60D2E97EE501D6AF86@SHSMSX101.ccr.corp.intel.com> In-Reply-To: Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [Qemu-devel] [edk2] NVMe question List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Busch, Keith" , Laszlo Ersek Cc: "Tian, Feng" , "Anbazhagan, Baraneedharan" , "edk2-devel@lists.sourceforge.net" , qemu devel list Got your point. Ok, I will roll back the change=20 Thanks Feng -----Original Message----- From: Busch, Keith=20 Sent: Wednesday, June 03, 2015 22:47 To: Tian, Feng; Laszlo Ersek Cc: edk2-devel@lists.sourceforge.net; Anbazhagan, Baraneedharan; qemu devel= list Subject: RE: [edk2] NVMe question Section 3.1.5, for IOCQES and IOSQES: "The required and maximum values for this field are specified in the Identi= fy Controller data structure in Figure 90 for each I/O Command Set. The val= ue is in bytes and is specified as a power of two (2^n)." If you're not setting these values, I assume you're leaving it as 0, which = is most definitely below the "required" value. > -----Original Message----- > From: Tian, Feng > Sent: Tuesday, June 02, 2015 6:21 PM > To: Busch, Keith; Laszlo Ersek > Cc: edk2-devel@lists.sourceforge.net; Anbazhagan, Baraneedharan; qemu dev= el list; Tian, Feng > Subject: RE: [edk2] NVMe question >=20 > Hi, Keith >=20 > I agree your explanation does make sense. >=20 > But could you let me know where speaks the host driver must initialize th= ese two fields of CC > register before any I/O operation in NVMe spec? >=20 > Thanks > Feng >=20 > -----Original Message----- > From: Busch, Keith > Sent: Wednesday, June 03, 2015 03:11 > To: Laszlo Ersek > Cc: edk2-devel@lists.sourceforge.net; Anbazhagan, Baraneedharan; Tian, Fe= ng; Busch, Keith; qemu > devel list > Subject: Re: [edk2] NVMe question >=20 > Hi, >=20 > On Tue, 2 Jun 2015, Laszlo Ersek wrote: > > removed the nonzero initialization of Cc.Iosqes (submission queue > > size?) and Cc.Iocqes (completion queue size?) in function > > NvmeEnableController(). And the removal of these field initializations > > seems to cause the early sanity check in QEMU's nvme_start_ctrl() to > > fail -- my guess at least. > > > > The question is now if QEMU is right (according to the NVMe spec) to > > require those fields, or if edk2 is right not to initialize them. >=20 > The host driver definitely needs to initialize these for the device to un= derstand the queue's > entry sizes. Without proper values, it would have no idea how much memory= a queue occupies. If you > have a real device that ignores these, it's breaking spec.