From patchwork Tue Oct 27 17:57:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Klaus Jensen X-Patchwork-Id: 1388837 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=g6B6fgzW; 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=ac+nCEZs; 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 4CLKGF6TLnz9sTK for ; Wed, 28 Oct 2020 04:59:17 +1100 (AEDT) Received: from localhost ([::1]:44738 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kXTFb-0006Cp-Oy for incoming@patchwork.ozlabs.org; Tue, 27 Oct 2020 13:59:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50176) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kXTE0-0006C3-R5; Tue, 27 Oct 2020 13:57:37 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:55479) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kXTDv-00075F-D3; Tue, 27 Oct 2020 13:57:36 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 999FE5C0131; Tue, 27 Oct 2020 13:57:29 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 27 Oct 2020 13:57:29 -0400 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=RV+MSRaYvx9TQg9woFBAcow8Ke RoNCksLqM1eNRZEwI=; b=g6B6fgzWS3C46RZHN0xteMVQZQfeFi5H4OCTJeYwRS iHh59KnV0kM9721SlVzkAo/lnmUxZKZ0zA7oclBfsPr59DTjnsDxjQgpW4nKqnNy //BNl5KcuA7+afAww4dYKR1+HplA6s2RAkkbsLS/BqV3wnmiiswQIobKTqcpfFQw hsHN2KZXnhyA0OeD3KFjQEc11QG2FS5W03wTuzsIHNoEdJdJBZtNVRJK23sZpw3x qgXxDWdOBEQHNbeKeeTLv+9Tbns3rxw2eUVdq/eInGxwndagQhNTh2WhTZVZJi9I C+fuia38olqaoCyQkXZizaotn+qARhJtD4RBHS28UhPQ== 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=RV+MSR aYvx9TQg9woFBAcow8KeRoNCksLqM1eNRZEwI=; b=ac+nCEZsTjbt5uSvA0Ks1d wv/2GsSdoSZY0oqT+Q8Rwkzxsf/+aFsPQGINDvi171EnuE/2/CGMfmhMrmgBve/R qYk3VG28iSSu7qyus6pSLOkSZQRcQiu28/kXirdXOyth9a77SRXzcHKpPErHn753 LB5fbZ2jzFPgd1OUBOZ4V/aeQ2YPf1EtgMX8M0WfwaeRSPE3eYOgd92oXQcAnVI2 k/+hG+r8tU+rpG7UZ2yW4+Ec70lceBEaGrKgNrSA7vtgRp8qOsZaSpnQoUAbEyFC RwIzGx2bzEy8mTYR2CQUaApsHksiOi53XDFGvrvDl2C95sNcanZ1TGKxCwD0xAdw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrkeelgddutdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffotggggfesthhqredtredtjeenucfhrhhomhepmfhlrghushcu lfgvnhhsvghnuceoihhtshesihhrrhgvlhgvvhgrnhhtrdgukheqnecuggftrfgrthhtvg hrnhephfegveekiefgkeevvdetjeejkeekudfgvdehieejfffgkeffvdevlefftedvgefh 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 762AF3280067; Tue, 27 Oct 2020 13:57:27 -0400 (EDT) From: Klaus Jensen To: qemu-devel@nongnu.org Subject: [PATCH v7 0/3] hw/block/nvme: dulbe and dsm support Date: Tue, 27 Oct 2020 18:57:22 +0100 Message-Id: <20201027175725.586890-1-its@irrelevant.dk> X-Mailer: git-send-email 2.29.1 MIME-Version: 1.0 Received-SPF: pass client-ip=66.111.4.28; envelope-from=its@irrelevant.dk; helo=out4-smtp.messagingengine.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/27 13:57:29 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 , Klaus Jensen , Keith Busch 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. 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 (3): 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 | 193 +++++++++++++++++++++++++++++++++++++++++- hw/block/trace-events | 4 + 6 files changed, 240 insertions(+), 9 deletions(-)