From patchwork Fri Sep 18 20:36:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Klaus Jensen X-Patchwork-Id: 11786307 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 16CFC112E for ; Fri, 18 Sep 2020 20:46:51 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 787D921734 for ; Fri, 18 Sep 2020 20:46:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 787D921734 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=irrelevant.dk Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:51668 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kJNHN-0002H5-07 for patchwork-qemu-devel@patchwork.kernel.org; Fri, 18 Sep 2020 16:46:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46292) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJN7R-0004jb-4E; Fri, 18 Sep 2020 16:36:33 -0400 Received: from new1-smtp.messagingengine.com ([66.111.4.221]:52351) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJN7N-0004wO-ES; Fri, 18 Sep 2020 16:36:32 -0400 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailnew.nyi.internal (Postfix) with ESMTP id F04665801ED; Fri, 18 Sep 2020 16:36:26 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Fri, 18 Sep 2020 16:36:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=irrelevant.dk; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=fm1; bh=mqhEPj63bscuS/IshS3/d9+R1S bjeugFll2BFQi7Qkc=; b=C7sBks+JqUAAozEiZM71oqHAIBPehbHaJraOylwkWa 1QAAfSXU2B12wp3QskXJd5ehMYAnHZXp9xbqLgke/tVSdd9H3CmmWQ+O7qEspEYo 27FuElv48mKtuNMvumbnLB+RRrtfsWIVGlhiyVoEXGSZh16/QuYKaxuE2FOAGN/X XlI3qjlESMpDq75J6lkpY6MyzG2//DieEcf1l6TAL7jJkuRJyCoXfcZikVkygjQh LGEaqLa4QjI22gmlyy+8sSca4wVbGINXF5U7BrcqiWh4sJc0w3Xqww3kDVCKZoVR uS4e2M+9dpbe5BJ4kX3C5yDZPOvZH4jZJHgZsfNttl9w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=mqhEPj 63bscuS/IshS3/d9+R1SbjeugFll2BFQi7Qkc=; b=jZvFtzmqg9fiyedsBvvt/6 7h3vbDluIOpOy1CqfrzF0zRWNeUhOzqbnjARSnI/F6ZjdZzXtWAXK73rGkNC6lM8 IlXjdqlpPwvOAbxZpAM8pW5XtLjfi67N1MMkpg1+kFRBFKqv5bSj/zJU7EaFxIEP bM03+6N7mLD6LG3QODn2zJwTr2NF553gRyJJcxZlbAxwYn9tWjHPwji8+f5LCIwQ ZJji2FXtSonB4quJXs2ZFvsz9FsBotmbfLR5dzwtXHmsUqh0SCeLAnGcxYG40USL kRyQJ74p1Lgu7vL6NTRUU0HpfC8Y9JWzYnj39k8Tsmjf6XV/duv2wC0xTMaO9GAQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrtdeigdduhedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffogggtgfesthhqredtredtjeenucfhrhhomhepmfhlrghushcu lfgvnhhsvghnuceoihhtshesihhrrhgvlhgvvhgrnhhtrdgukheqnecuggftrfgrthhtvg hrnhepfeduheefudfghfdutdetffefleeutddttefgudeludduudfguefhleeuueeugffg necukfhppeektddrudeijedrleekrdduledtnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepihhtshesihhrrhgvlhgvvhgrnhhtrdgukh X-ME-Proxy: Received: from apples.local (80-167-98-190-cable.dk.customer.tdc.net [80.167.98.190]) by mail.messagingengine.com (Postfix) with ESMTPA id 299ED3064674; Fri, 18 Sep 2020 16:36:23 -0400 (EDT) From: Klaus Jensen To: qemu-devel@nongnu.org Subject: [PATCH v2 00/17] hw/block/nvme: multiple namespaces support Date: Fri, 18 Sep 2020 22:36:04 +0200 Message-Id: <20200918203621.602915-1-its@irrelevant.dk> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Received-SPF: pass client-ip=66.111.4.221; envelope-from=its@irrelevant.dk; helo=new1-smtp.messagingengine.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/18 16:36:27 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Eduardo Habkost , qemu-block@nongnu.org, "Michael S. Tsirkin" , Klaus Jensen , Max Reitz , Klaus Jensen , Keith Busch Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Klaus Jensen This is the next round of my patches for the nvme device. This includes a bit of cleanup and two new features: * support for scatter/gather lists * multiple namespaces support through a new nvme-ns device Finally, the series wraps up with changing the PCI vendor and device ID to get rid of the internal Intel id and as a side-effect get rid of some Linux kernel quirks that no longer applies. "pci: pass along the return value of dma_memory_rw" has already been posted by Philippe in another series, but since it is not applied yet, I am including it here. Changes for v2 ~~~~~~~~~~~~~~ * Added a new patch ("hw/block/nvme: fix typo in trace event") that does what it says on the tin. * Dropped the "hw/block/nvme: support multiple parallel aios per request" patch (Keith). * hw/block/nvme: add symbolic command name to trace events Changed to single quote (Philippe) * hw/block/nvme: default request status to success Commit message typo fixed (Philippe) * hw/block/nvme: change controller pci id Do NOT bump the device id for the legacy Intel id (David) Gollu Appalanaidu (1): hw/block/nvme: add support for sgl bit bucket descriptor Klaus Jensen (16): hw/block/nvme: fix typo in trace event pci: pass along the return value of dma_memory_rw hw/block/nvme: handle dma errors hw/block/nvme: commonize nvme_rw error handling hw/block/nvme: alignment style fixes hw/block/nvme: add a lba to bytes helper hw/block/nvme: fix endian conversion hw/block/nvme: add symbolic command name to trace events hw/block/nvme: refactor aio submission hw/block/nvme: default request status to success hw/block/nvme: harden cmb access hw/block/nvme: add support for scatter gather lists hw/block/nvme: refactor identify active namespace id list hw/block/nvme: support multiple namespaces pci: allocate pci id for nvme hw/block/nvme: change controller pci id docs/specs/nvme.txt | 23 ++ docs/specs/pci-ids.txt | 1 + hw/block/nvme-ns.h | 74 ++++ hw/block/nvme.h | 94 ++++- include/block/nvme.h | 6 +- include/hw/pci/pci.h | 4 +- hw/block/nvme-ns.c | 167 ++++++++ hw/block/nvme.c | 846 ++++++++++++++++++++++++++++++----------- hw/core/machine.c | 1 + MAINTAINERS | 1 + hw/block/meson.build | 2 +- hw/block/trace-events | 22 +- 12 files changed, 986 insertions(+), 255 deletions(-) create mode 100644 docs/specs/nvme.txt create mode 100644 hw/block/nvme-ns.h create mode 100644 hw/block/nvme-ns.c Reviewed-by: Keith Busch