From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42303) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zz8I8-0000Cd-He for qemu-devel@nongnu.org; Wed, 18 Nov 2015 14:21:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zz8I7-0001pU-Qi for qemu-devel@nongnu.org; Wed, 18 Nov 2015 14:21:16 -0500 Date: Wed, 18 Nov 2015 20:21:09 +0100 From: Christoph Hellwig Message-ID: <20151118192109.GA11825@lst.de> References: <1447872792-8508-1-git-send-email-hch@lst.de> <1447872792-8508-2-git-send-email-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1447872792-8508-2-git-send-email-hch@lst.de> Subject: Re: [Qemu-devel] [PATCH 1/2] nvme: fix identify to be NVMe 1.1 compliant List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Keith Busch Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org Meh, this was still missing the uncommited changes for the nsid off by one vs the array index: diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 360be71..4f768d5 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -499,10 +499,10 @@ static uint16_t nvme_identify_nslist(NvmeCtrl *n, NvmeIdentify *c) list = g_malloc0(data_len); for (i = 0; i < n->num_namespaces; i++) { - if (i <= min_nsid) { + if (i < min_nsid) { continue; } - list[j++] = cpu_to_le32(i); + list[j++] = cpu_to_le32(i + 1); if (j == data_len / sizeof(uint32_t)) { break; }