From patchwork Sun Feb 7 21:49:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Klaus Jensen X-Patchwork-Id: 1437277 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; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=irrelevant.dk header.i=@irrelevant.dk header.a=rsa-sha256 header.s=fm2 header.b=WP2f5dxT; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm2 header.b=VfpsRgRv; 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 4DYjjQ4YzTz9sBJ for ; Mon, 8 Feb 2021 08:59:06 +1100 (AEDT) Received: from localhost ([::1]:33118 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l8s5A-0004y3-El for incoming@patchwork.ozlabs.org; Sun, 07 Feb 2021 16:59:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36110) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l8rwH-0000av-T3; Sun, 07 Feb 2021 16:49:53 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:52137) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l8rwD-0004NS-NA; Sun, 07 Feb 2021 16:49:53 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id E86685C009F; Sun, 7 Feb 2021 16:49:44 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sun, 07 Feb 2021 16:49:44 -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=fm2; bh=UYBfnaj6PSBb8WyWF37yHq3cp2 CkZSP/YMgnJIf+pBQ=; b=WP2f5dxT9zAw2Zpzsu0+0epj5QFWQh5F4pQbDsAPS5 yQsVdEmuMqkrRVFU2rZjzwuC1vYg90iklv4+es6aQWDDyYgrae+VGb6NW1mq9cEG n9kqrObFACUbTdWKuWO6zDGMI2g4SJhvCNAXGMAQajbxLZh7oN0bIRn+QDP7qplD sFfO0bjFHTc0Dh6Q8qrVlEVbkBhxK+mOcQipx09bHik2i6C40wbzmewEX99793Xm wqcVm/UK6rZxytxfHYG1PrKGAvkk8gSeAntrWcRVwNzBjLjrQznyzxBubNm7x2KY PLGd/ALElBNTiBlU9sfJRxbOSGQym1hPVL9dUwhs/yDw== 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=fm2; bh=UYBfna j6PSBb8WyWF37yHq3cp2CkZSP/YMgnJIf+pBQ=; b=VfpsRgRvhjmuYt4DIdTPU6 upRPu1yaiWltgH8gI4tzpLpdUgvuiZoY4LmG64u7/T3XB1L3t8HlzbQhEdQWdDjq m86rFIRHeLoXILtlXfaCfA6ErAIf/ubwB1lpkLegof+LOb/uVe9QiAggOyvjiYce rCeqkf1W0H++S+IZO1kUgelCa5ON9H477ZLDOoEcEFLXJliUBEX5vDg9anUh8HPN n7sydjjJOTenCG09rSswZa1MbdNE59hI1dqwkArO2smkWLarSFsVa/shBAQdhhwY IzZIY+d1Sat5BrAl3SodON0GBKPULa6J403EzJZSkFN8YtYDrqnDbiFypqCAdHgQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrhedugdduheegucetufdoteggodetrfdotf 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 5FA9F1080057; Sun, 7 Feb 2021 16:49:42 -0500 (EST) From: Klaus Jensen To: qemu-devel@nongnu.org Subject: [PATCH RFC v2 0/8] hw/block/nvme: metadata and end-to-end data protection support Date: Sun, 7 Feb 2021 22:49:32 +0100 Message-Id: <20210207214940.281889-1-its@irrelevant.dk> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 Received-SPF: pass client-ip=66.111.4.28; envelope-from=its@irrelevant.dk; helo=out4-smtp.messagingengine.com 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.01, RCVD_IN_MSPIKE_WL=-0.01, 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 , Fam Zheng , qemu-block@nongnu.org, Klaus Jensen , Gollu Appalanaidu , Max Reitz , Klaus Jensen , Stefan Hajnoczi , Keith Busch Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Klaus Jensen This is RFC v2 of a series that adds support for metadata and end-to-end data protection. First, on the subject of metadata, in v1, support was restricted to extended logical blocks, which was pretty trivial to implement, but required special initialization and broke DULBE. In v2, metadata is always stored continuously at the end of the underlying block device. This has the advantage of not breaking DULBE since the data blocks remains aligned and allows bdrv_block_status to be used to determinate allocation status. It comes at the expense of complicating the extended LBA emulation, but on the other hand it also gains support for metadata transfered as a separate buffer. The end-to-end data protection support blew up in terms of required changes. This is due to the fact that a bunch of new commands has been added to the device since v1 (zone append, compare, copy), and they all require various special handling for protection information. If potential reviewers would like it split up into multiple patches, each adding pi support to one command, shout out. The core of the series (metadata and eedp) is preceeded by a set of patches that refactors mapping (yes, again) and tries to deal with the qsg/iov duality mess (maybe also again?). Support fro metadata and end-to-end data protection is all joint work with Gollu Appalanaidu. Klaus Jensen (8): hw/block/nvme: remove redundant len member in compare context hw/block/nvme: remove block accounting for write zeroes hw/block/nvme: fix strerror printing hw/block/nvme: try to deal with the iov/qsg duality hw/block/nvme: remove the req dependency in map functions hw/block/nvme: refactor nvme_dma hw/block/nvme: add metadata support hw/block/nvme: end-to-end data protection hw/block/nvme-ns.h | 41 +- hw/block/nvme.h | 44 +- include/block/nvme.h | 26 +- hw/block/nvme-ns.c | 29 +- hw/block/nvme.c | 1687 +++++++++++++++++++++++++++++++++++------ hw/block/trace-events | 19 +- 6 files changed, 1574 insertions(+), 272 deletions(-)