From patchwork Thu Nov 12 19:59:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Klaus Jensen X-Patchwork-Id: 1399320 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=irrelevant.dk Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=irrelevant.dk header.i=@irrelevant.dk header.a=rsa-sha256 header.s=fm1 header.b=mDeR/WuG; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm1 header.b=ebjsiWeE; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4CXCTX4WD6z9sSn for ; Fri, 13 Nov 2020 07:13:18 +1100 (AEDT) Received: from localhost ([::1]:34530 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kdIy4-00005H-0L for incoming@patchwork.ozlabs.org; Thu, 12 Nov 2020 15:13:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38900) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdIl8-0003EA-MN; Thu, 12 Nov 2020 14:59:54 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:60117) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdIl5-00078C-3g; Thu, 12 Nov 2020 14:59:54 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 1402A5C00EB; Thu, 12 Nov 2020 14:59:49 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 12 Nov 2020 14:59:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=irrelevant.dk; h=from:to:cc:subject:date:message-id:content-type:mime-version :content-transfer-encoding; s=fm1; bh=bof7A6J68W2INydadEV1lU8TGc bclxJ3NQbDHq0U3UM=; b=mDeR/WuGm+zby+lxbWRQyK6Vdy0SuyyjqrPK6kxCtb dmuPEbjTQAY4mlLJANnXvDjxuUrdFsRXVYJbeJ/FkDbRzUUO7uXcX9lA5uY93NY/ +m5E/LtkvQysTwXo3mwdrsAU9IaZQk2WWH4Sk9w/t4FfLm+tuveRDz4JXdlvR8RF sb9qJirs6mLDgznDdF/phQg1JQJND5VpSdtXiMUtZjyNwKaA5LjWt+hbJxQRLyyw /+9WCg2KcixCdCwrJY0uesGoB12WY+T4Q1fqog9I6Q4BRdily8Xj/vmnhg9XxS7X b4m8jYnHSB73kmDYn5fDNkRoQmBADjk5kQ0m1wBr0daQ== 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=fm1; bh=bof7A6 J68W2INydadEV1lU8TGcbclxJ3NQbDHq0U3UM=; b=ebjsiWeElzsy+AY1IUU7e3 Ou40OZOu4Tr53vI/Mb0c/hCR6M3YHZrN5gmC3ZrrWbHazvdsOG23wE2QLuO0sxqf 0i7EtEm82pw+2iemprdYH8wi2wmPNPHMO9vL28OP+B+qogFd6NiGUFR8aSWronMh WY3Y1bgjQokMSmmas3HHBcA23RlNnfDCSuGVnAfnLF8n/pCbx30uGW1hPQ1+kXEv O21HkIor6sAGxZlnC09MbFu1tUN1eO+2HoPCN/P93lGKL1Uf95uWa2Djq24jLgDf ZrXR3vG+JmKv5UNxqCQVWx58FHFoRD1oBip4AyK7671jCNsG4COZnks36iJJ+s+g == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedruddvfedguddtjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkofgtggfgsehtqhertdertdejnecuhfhrohhmpefmlhgruhhs ucflvghnshgvnhcuoehithhssehirhhrvghlvghvrghnthdrughkqeenucggtffrrghtth gvrhhnpefhgeevkeeigfekvedvteejjeekkedugfdvheeijeffgfekffdvveelffetvdeg hfenucfkphepkedtrdduieejrdelkedrudeltdenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehithhssehirhhrvghlvghvrghnthdrughk 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 4679530689E1; Thu, 12 Nov 2020 14:59:46 -0500 (EST) From: Klaus Jensen To: qemu-devel@nongnu.org Subject: [PATCH v8 0/5] hw/block/nvme: dulbe and dsm support Date: Thu, 12 Nov 2020 20:59:40 +0100 Message-Id: <20201112195945.819915-1-its@irrelevant.dk> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Received-SPF: pass client-ip=66.111.4.27; envelope-from=its@irrelevant.dk; helo=out3-smtp.messagingengine.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/12 14:59:49 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 , qemu-block@nongnu.org, Klaus Jensen , Max Reitz , Keith Busch , Klaus Jensen , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Klaus Jensen This adds support for the Deallocated or Unwritten Logical Block error recovery feature as well as the Dataset Management command. v8: - Move req->opaque clearing to nvme_req_clear. - Add two preparation/cleanup patches. v7: - Handle negative return value from bdrv_block_status. - bdrv_get_info may not be supported on all block drivers, so do not consider it a fatal error. v6: - Skip the allocation of the discards integer and just use the opaque value directly (Philippe) - Split changes to include/block/nvme.h into a separate patch (Philippe) - Clean up some convoluted checks on the discards value (Philippe) - Use unambiguous units in the commit messages (Philippe) - Stack allocate the range array (Keith) v5: - Restore status code from callback (Keith) v4: - Removed mixed declaration and code (Keith) - Set NPDG and NPDA and account for the blockdev cluster size. Klaus Jensen (5): hw/block/nvme: remove superfluous NvmeCtrl parameter hw/block/nvme: pull aio error handling hw/block/nvme: add dulbe support nvme: add namespace I/O optimization fields to shared header hw/block/nvme: add the dataset management command hw/block/nvme-ns.h | 4 + hw/block/nvme.h | 2 + include/block/nvme.h | 12 +- hw/block/nvme-ns.c | 34 +++++- hw/block/nvme.c | 258 ++++++++++++++++++++++++++++++++++++------ hw/block/trace-events | 4 + 6 files changed, 276 insertions(+), 38 deletions(-)