From nobody Sat Feb 7 08:28:24 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1617774630; cv=none; d=zohomail.com; s=zohoarc; b=T5poTOgfz+EbQ1ko1Jh/s48tZfAjMZQvD3xYz8lhAGfwxD3M5I3FOUhgKyopOgm3tSQT8+g1LBlB/46VJ2QyF7y+wkh0RDAEQsH5mSBhwsSQmYHIL59xkQtjeQ+9vbXklglab6BKgWxUH6fMyj8WGJiFiDHrGx+vIIfj/vKPKgw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1617774630; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Nyr1FKlzBIy1/c0H4YJtakyzWIQGvyvtqYXrdVAUKHo=; b=OCAtrR40yeVpViCMlIu0KMf8E94NwmNPqS9nDjy4QEfZl/7RoCuFJeYdc825h2J/JIMLBUmHmJvTxdNBvnRrPFK3XvddexmbHQ97QGpXAOSG6MRpNdXDh9iGAPb8qCHd+NGWsXmt0XSUQRYmHaUB5p+KSkiqQ020Dro6wJPbNZE= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1617774630227768.0790866720656; Tue, 6 Apr 2021 22:50:30 -0700 (PDT) Received: from localhost ([::1]:43398 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lU15A-0003lh-MQ for importer@patchew.org; Wed, 07 Apr 2021 01:50:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44932) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lU11Z-00028L-EW; Wed, 07 Apr 2021 01:46:45 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:48097) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lU11W-0004zL-7q; Wed, 07 Apr 2021 01:46:45 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 8C4C75C00E1; Wed, 7 Apr 2021 01:46:40 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 07 Apr 2021 01:46:40 -0400 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 28B89108005F; Wed, 7 Apr 2021 01:46:39 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=irrelevant.dk; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=Nyr1FKlzBIy1/ c0H4YJtakyzWIQGvyvtqYXrdVAUKHo=; b=haRFr4zjsdEqlWJFYyeBUciLkK7T8 CqsCjldiMSphmgmTrZA0PYiITzApiYC/jIrK7TjF0cDY+9qLsIG9KXoP8yCp/go8 CiozIuqAfIiD7MAus1kOWmdEb3EEH/jrtaOSFIJX4GQCrAqroq8o359TZBPjfwny oBQ58eaIkSxoyNFt5xc7bVTeWx2TP+mEoOn4DNW0eGwX7z0PVv3jDozPQKwHsLiW Gnw+MWTZ3mUwArB8mP3EPhlB4lqsV2aRDB0jVC46aEbKErIVhb4cGo9nHqZIcU+L WoJT14nA6T0eMT0FdWo3TQ8mm5h/B/EF/Tdz5T86usfB0TI80LRBZ4rjw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=Nyr1FKlzBIy1/c0H4YJtakyzWIQGvyvtqYXrdVAUKHo=; b=i75+q2eM v/7/BxUphnOeLEvUQO/IUkGIgiotht8WKSI/gIvVCg+uOGchku6L7PKkP+/mNuPs PIkCpgAX6A/TjKltUMdQkpW0qkW7mIWTkVlxVPUmRZSYHoe3r2TvMtPRVclenq1l s/JWng/Dy6wifYsj2doldf9fW1EAJAXFZjMIFYEYkw4d9sQcXdSFrgHYqRMDHo6T o2mP2gHpXjcV6jp5GVZJyefKwAqDKo5xs8BMp57ypeYJbQxvokSAQK/vVR74WVl1 8iwAndv0IC+MqNRaiOBUHLrdN1oXmvHGYmZmhz7JBnfeAOORWPTQXcQ+fQOig8n+ KrewWuqBu28zbQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudejiedguddttdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepmfhlrghu shculfgvnhhsvghnuceoihhtshesihhrrhgvlhgvvhgrnhhtrdgukheqnecuggftrfgrth htvghrnhepueelteegieeuhffgkeefgfevjeeigfetkeeitdfgtdeifefhtdfhfeeuffev gfeknecukfhppeektddrudeijedrleekrdduledtnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepihhtshesihhrrhgvlhgvvhgrnhhtrdgukh X-ME-Proxy: From: Klaus Jensen To: qemu-devel@nongnu.org Subject: [PULL for-6.0 v2 01/10] hw/block/nvme: fix pi constraint check Date: Wed, 7 Apr 2021 07:46:26 +0200 Message-Id: <20210407054635.189440-2-its@irrelevant.dk> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210407054635.189440-1-its@irrelevant.dk> References: <20210407054635.189440-1-its@irrelevant.dk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=66.111.4.29; envelope-from=its@irrelevant.dk; helo=out5-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, 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Klaus Jensen Protection Information can only be enabled if there is at least 8 bytes of metadata. Signed-off-by: Klaus Jensen Reviewed-by: Gollu Appalanaidu Reviewed-by: Keith Busch --- hw/block/nvme-ns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/nvme-ns.c b/hw/block/nvme-ns.c index 7f8d139a8663..ca04ee1bacfb 100644 --- a/hw/block/nvme-ns.c +++ b/hw/block/nvme-ns.c @@ -394,7 +394,7 @@ static int nvme_ns_check_constraints(NvmeNamespace *ns,= Error **errp) return -1; } =20 - if (ns->params.pi && !ns->params.ms) { + if (ns->params.pi && ns->params.ms < 8) { error_setg(errp, "at least 8 bytes of metadata required to enable " "protection information"); return -1; --=20 2.31.1