From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 377C8C47082 for ; Mon, 31 May 2021 20:57:02 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id E93CC610C8 for ; Mon, 31 May 2021 20:57:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E93CC610C8 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=irrelevant.dk Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:54516 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lnoy4-0001ZQ-UK for qemu-devel@archiver.kernel.org; Mon, 31 May 2021 16:57:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34062) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lnouw-0006zA-Cm; Mon, 31 May 2021 16:53:48 -0400 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:56765) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lnouu-0003aD-Nz; Mon, 31 May 2021 16:53:46 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 4DB9519BA; Mon, 31 May 2021 16:53:42 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 31 May 2021 16:53:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=irrelevant.dk; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=T8UUI5k1zWC+31XT8cTH8Dl5Dvu DIx8kC3BVvGk6ZbA=; b=X/ype5wB7W1KgMlgyN+5zOVdRa1lJjEkI1Y2/1yR3mx 4GDyhPLXq1ezJJH8Sm33JTSjFO8RjgJy5xwTgse8VO2fIL4TH8+RI1fw67jT6Waf PQz25Rrj+2AaAXSt9tIv99NynBGaskdzEXjT+UWktmFAR5HbF1XyQO009pASByHB eDke7v6wx/GsHA8cmT7mcQ8q8IxPxAV3Vtcc81y9yL/Nq0EwTdWSpwoC9sI4inmj 9fAG1jQZJcK4mobmB2W8Rkm8vAAeDjcLvhBi3/v7cBBFlGAxMBmzyJ0OtfhdalcO bSo5FCdg5uo/e1fyscAJK5qx0DSU5RSLWsCnCj5c6lg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type: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=T8UUI5 k1zWC+31XT8cTH8Dl5DvuDIx8kC3BVvGk6ZbA=; b=PSXYm3EJeGS2ymvH1iTA8Q 6Na4kYy0HDWzWgG6hOxz4HTNl1nufctOVwpz1ux7LsBsj0ObXD554dWrnLxy4U1l f1FcxVwsaqBX5q00E1wog7hTU2Ae9WtkBe8TSg/qF6z479BA1doPIirvvU6np4d/ i4shLZS6nGosz15SRq+hJ5+PxunfUlvEAq89g9T9xD43BcROAizsa05BONsOzBJp 6nb3KgNUNE+hUcLn5+XYUlXR3qWh+PdCa3l2h4jp6AABwZvPqDW/y4IBCAblj/xa b0CtpRB0oRGHKyd7tTrSWzmTLog6K8JEh/1NMJP9aV19aob6wKdA3Kx2AjTIy5nA == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdelfedgudehhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfhfgggtuggjsehgtd erredttdejnecuhfhrohhmpefmlhgruhhsucflvghnshgvnhcuoehithhssehirhhrvghl vghvrghnthdrughkqeenucggtffrrghtthgvrhhnpeejgeduffeuieetkeeileekvdeule etveejudeileduffefjeegfffhuddvudffkeenucevlhhushhtvghrufhiiigvpedunecu rfgrrhgrmhepmhgrihhlfhhrohhmpehithhssehirhhrvghlvghvrghnthdrughk X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 31 May 2021 16:53:40 -0400 (EDT) Date: Mon, 31 May 2021 22:53:39 +0200 From: Klaus Jensen To: Gollu Appalanaidu Subject: Re: [PATCH 2/3] hw/nvme/ctrl: fix endian conversion for nsid in ctrl list Message-ID: References: <20210517100736.17063-1-anaidu.gollu@samsung.com> <20210517100736.17063-3-anaidu.gollu@samsung.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="xajDCdTSxhVpSwQ8" Content-Disposition: inline In-Reply-To: <20210517100736.17063-3-anaidu.gollu@samsung.com> Received-SPF: pass client-ip=64.147.123.21; envelope-from=its@irrelevant.dk; helo=wout5-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_H4=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: fam@euphon.net, kwolf@redhat.com, qemu-block@nongnu.org, qemu-devel@nongnu.org, mreitz@redhat.com, stefanha@redhat.com, kbusch@kernel.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --xajDCdTSxhVpSwQ8 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On May 17 15:37, Gollu Appalanaidu wrote: >In Identify Ctrl List of the CNS 0x12 and 0x13 no endian conversion >for the nsid field. > >Signed-off-by: Gollu Appalanaidu >--- > hw/nvme/ctrl.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > >diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c >index d08a3350e2..813a72c655 100644 >--- a/hw/nvme/ctrl.c >+++ b/hw/nvme/ctrl.c >@@ -4255,6 +4255,7 @@ static uint16_t nvme_identify_ctrl_list(NvmeCtrl *n,= NvmeRequest *req, > bool attached) > { > NvmeIdentify *c =3D (NvmeIdentify *)&req->cmd; >+ uint32_t nsid =3D le32_to_cpu(c->nsid); > uint16_t min_id =3D le16_to_cpu(c->ctrlid); > uint16_t list[NVME_CONTROLLER_LIST_SIZE] =3D {}; > uint16_t *ids =3D &list[1]; >@@ -4265,11 +4266,11 @@ static uint16_t nvme_identify_ctrl_list(NvmeCtrl *= n, NvmeRequest *req, > trace_pci_nvme_identify_ctrl_list(c->cns, min_id); > > if (attached) { >- if (c->nsid =3D=3D NVME_NSID_BROADCAST) { >+ if (nsid =3D=3D NVME_NSID_BROADCAST) { > return NVME_INVALID_FIELD | NVME_DNR; > } > >- ns =3D nvme_subsys_ns(n->subsys, c->nsid); >+ ns =3D nvme_subsys_ns(n->subsys, nsid); > if (!ns) { > return NVME_INVALID_FIELD | NVME_DNR; > } >@@ -4281,7 +4282,7 @@ static uint16_t nvme_identify_ctrl_list(NvmeCtrl *n,= NvmeRequest *req, > continue; > } > >- if (attached && !nvme_ns(ctrl, c->nsid)) { >+ if (attached && !nvme_ns(ctrl, nsid)) { > continue; > } > >--=20 >2.17.1 > I know that the endianness conversion was missing before your patch, but=20 please squash this up into patch 1. --xajDCdTSxhVpSwQ8 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUigzqnXi3OaiR2bATeGvMW1PDekFAmC1TNEACgkQTeGvMW1P DemobQgAw5gkjbiJxkaTlnRrCcKeelbh3ZJFfJ/JtU9czVRoUaHt5oBO6QsBkhvo Yo+9i5XhOJBNFMac7ivHA/+pWDDkBEfkE2Gm58Mi3pp1dqLLPrIrJO7oc0C3D8ng zLUeOJUE5dzZzWYf0+3fpE/+hM+w30EYC2KoeGxzXSgZyakaxVijAZNn6lauY3cM Y2h0jsnJmZP0Denxa2+WusepnbCSQetHfA1JH+yEpSBjPnJOALN/xKwJiJjuRE+C Cu7ucqa6PepaGwG6qJIkri9ri8IoIqGY79KWLUne/jc4ckrepCE0K5YMFlspD0b/ MjGFDG0id8FA904kG5Xa9buEx6qFqA== =Cki1 -----END PGP SIGNATURE----- --xajDCdTSxhVpSwQ8--