From nobody Mon Feb 9 14:03:08 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 163246691721745.004924003462065; Fri, 24 Sep 2021 00:01:57 -0700 (PDT) Received: from localhost ([::1]:42428 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mTfDX-0002jY-UT for importer@patchew.org; Fri, 24 Sep 2021 03:01:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32968) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTezN-0006Ug-Cg; Fri, 24 Sep 2021 02:47:18 -0400 Received: from new3-smtp.messagingengine.com ([66.111.4.229]:39791) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTezH-00019b-OO; Fri, 24 Sep 2021 02:47:17 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id F0C13580E91; Fri, 24 Sep 2021 02:47:10 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Fri, 24 Sep 2021 02:47:10 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 24 Sep 2021 02:47:09 -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=fm1; bh=ptJYS5dkz2j5C iXNGgqoPvtTe+U/smq025q84NGLicc=; b=JdA2dNHxBHzcKj3eoFo/a94Gu+cCA N4BZfHsnUJZO/RrE33AFGLsRyr21JWSQQGAgOD0Oss4Kf/gJTatT5RloFPLUY/qN 6d3WpC5gMnAkWLqZW5ZX8lFatlKvwAi7nTeLvMEhWjyHXPBI5JF3CRZqL2kGEVcf arVRa/Ye3k/TmN4dy/vKIVfUmP7NILaRVc5NnzvMh4akjbBTuhxqKbeAlBlw2ztH PUnr3Ea7cORMG93Vtz1fH+cdcsM1nJFCLonvhx2UpVR0c2J724mW/e2/b8c87Ejt KxgU5DwohLTHhvbySm4SPoIAi04EkfcrLi70BGsbE2sFtJ4heYY7vw8Uw== 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= fm3; bh=ptJYS5dkz2j5CiXNGgqoPvtTe+U/smq025q84NGLicc=; b=RjEMaPc6 6VnctlhF7F+/+SNsLFdElPMg4ocSjeWZknT3Ye3ruJk45I3czrhzRHdVu/5IomQK N9d8QzTv1UyRBOCURIzEHIEHs9l5ny/qT/yCn/ZHFo+8e1UtnQZYNQ/nqwUDRBrF 73Kje0NMU4BDWx9CeFVNxJFD2w+Uf8yPHfLkAzXXzTQiCM5I9uYpPUwyLgBFnKiW WGvZhKAjh4f5s/EMexQAG8AYutvTKlKEJuJYaJTrjsB+JUvH/8I1i4bne9KJNyg0 JqUJz0xaRbeelbH0M8ZL5+WcdRIkcKj99aJ5IElD/PARwzt5SMAovP+d3G+Kr5Y4 sk2a9g1s99Ex+g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudejtddguddtlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepmfhlrghu shculfgvnhhsvghnuceoihhtshesihhrrhgvlhgvvhgrnhhtrdgukheqnecuggftrfgrth htvghrnhepueelteegieeuhffgkeefgfevjeeigfetkeeitdfgtdeifefhtdfhfeeuffev gfeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepih htshesihhrrhgvlhgvvhgrnhhtrdgukh X-ME-Proxy: From: Klaus Jensen To: Peter Maydell , qemu-devel@nongnu.org Subject: [PULL 3/3] hw/nvme: Return error for fused operations Date: Fri, 24 Sep 2021 08:47:01 +0200 Message-Id: <20210924064701.283182-4-its@irrelevant.dk> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210924064701.283182-1-its@irrelevant.dk> References: <20210924064701.283182-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.229; envelope-from=its@irrelevant.dk; helo=new3-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 , Pankaj Raghav , Klaus Jensen , Hanna Reitz , Stefan Hajnoczi , Keith Busch , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZM-MESSAGEID: 1632466918336100001 Content-Type: text/plain; charset="utf-8" From: Pankaj Raghav Currently, FUSED operations are not supported by QEMU. As per the 1.4 SPEC, controller should abort the command that requested a fused operation with an INVALID FIELD error code if they are not supported. Changes from v1: Added FUSE flag check also to the admin cmd processing as the FUSED operations are mentioned in the general SQE section in the SPEC. Signed-off-by: Pankaj Raghav Reviewed-by: Keith Busch Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c index dc0e7b00308e..2f247a9275ca 100644 --- a/hw/nvme/ctrl.c +++ b/hw/nvme/ctrl.c @@ -3893,6 +3893,10 @@ static uint16_t nvme_io_cmd(NvmeCtrl *n, NvmeRequest= *req) return ns->status; } =20 + if (NVME_CMD_FLAGS_FUSE(req->cmd.flags)) { + return NVME_INVALID_FIELD; + } + req->ns =3D ns; =20 switch (req->cmd.opcode) { @@ -5475,6 +5479,10 @@ static uint16_t nvme_admin_cmd(NvmeCtrl *n, NvmeRequ= est *req) return NVME_INVALID_FIELD | NVME_DNR; } =20 + if (NVME_CMD_FLAGS_FUSE(req->cmd.flags)) { + return NVME_INVALID_FIELD; + } + switch (req->cmd.opcode) { case NVME_ADM_CMD_DELETE_SQ: return nvme_del_sq(n, req); --=20 2.33.0