From nobody Mon Feb 9 23:03:25 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 1650371033561936.8648000560358; Tue, 19 Apr 2022 05:23:53 -0700 (PDT) Received: from localhost ([::1]:35560 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ngmtc-0006xR-KG for importer@patchew.org; Tue, 19 Apr 2022 08:23:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48132) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ngmhA-0006fy-Bn; Tue, 19 Apr 2022 08:11:00 -0400 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:41303) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ngmh8-0003lT-Oz; Tue, 19 Apr 2022 08:11:00 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 1CD52320005D; Tue, 19 Apr 2022 08:10:53 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Tue, 19 Apr 2022 08:10:53 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 19 Apr 2022 08:10:51 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=irrelevant.dk; h=cc:cc:content-transfer-encoding:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1650370252; x= 1650456652; bh=HN05d9HDpl5t8OWO7jNOVIrK3UhhLHfIhSdOnZWKGwA=; b=n VgRJDqCYZabYvhbgHc5lRitsq9US5LaWviDtkJpnwkHoPLhNdJfodE3ep3sf4kCF MlPgj2DiECTyE+CYoSZj1xI7n6oa+AVfz9PIVDViLEz+Y/Oq/cESxhjwUOAtBT33 ohT8/L2zjfCp5+5XLYvMG9Fx1PIoVYI+y8ZVMcl1wq8x4I+73UwLpYhYOWZqXBlg eiFc3qGMh/d7xaD4a+VkGmJpBEDoAmij1WtbIdsdZQhqKUB9oX47CzpVc0rcubkk QPKkCFIWhGyz/etaH+lpX3p5NTiIJ5a2QsfLZ9BNHaakVRCNpNhihmZoTUAVA+6q js0VvkF/HB0wyfpI4JQog== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1650370252; x=1650456652; bh=HN05d9HDpl5t8OWO7jNOVIrK3UhhLHfIhSd OnZWKGwA=; b=Sg1a6aw0nqPMzZiSG0nZmzoqBB/1HDR79Brp4uUhJRNF3Yb1Moh 0SE5ITwXdLRtfrc7N3k+JdzsA1rfl5nXX6CmT0wKQRbFPJElINBlvc3ir4sqcPRG i3EFSPP3SV36/3x+l8Jug1G1VR35Wndi0wFMEyyNxsbPPW/ynBKCKMCH24wSl74S +oi3BwBD8rdCAqpM59sIHEsOs8P/gfvh0PAbrKNRgW2drozqRcS8ppGW155c8ApJ i7yiLdsdesidb49N8f48pr02FgW7en+q9KJvlFIqQnPeP53IxRwNVeBcdFq4wUAF Ck/u+72Rus2Fg0B0l/gpiV9I4hy3EK2vdyA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrvddtfedggeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefmlhgruhhs ucflvghnshgvnhcuoehithhssehirhhrvghlvghvrghnthdrughkqeenucggtffrrghtth gvrhhnpeeiudehfeejteegueeffeekhfelgfekheetfffgteejgeekuefgtddujeeuudeg ieenucffohhmrghinhepuhhuihgurdgurghtrgenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehithhssehirhhrvghlvghvrghnthdrughk X-ME-Proxy: From: Klaus Jensen To: qemu-devel@nongnu.org Subject: [PATCH 3/5] hw/nvme: do not report null uuid Date: Tue, 19 Apr 2022 14:10:37 +0200 Message-Id: <20220419121039.1259477-4-its@irrelevant.dk> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220419121039.1259477-1-its@irrelevant.dk> References: <20220419121039.1259477-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=64.147.123.25; envelope-from=its@irrelevant.dk; helo=wout2-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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-block@nongnu.org, Klaus Jensen , Klaus Jensen , Luis Chamberlain , Keith Busch , Christoph Hellwig Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZM-MESSAGEID: 1650371034235100001 Content-Type: text/plain; charset="utf-8" From: Klaus Jensen Do not report the "null uuid" (all zeros) in the namespace identification descriptors. Reported-by: Luis Chamberlain Reported-by: Christoph Hellwig Signed-off-by: Klaus Jensen Reviewed-by: Christoph Hellwig --- hw/nvme/ctrl.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c index 17cf9862ab89..2b7828ac6952 100644 --- a/hw/nvme/ctrl.c +++ b/hw/nvme/ctrl.c @@ -4950,16 +4950,13 @@ static uint16_t nvme_identify_ns_descr_list(NvmeCtr= l *n, NvmeRequest *req) return NVME_INVALID_FIELD | NVME_DNR; } =20 - /* - * If the EUI-64 field is 0 and the NGUID field is 0, the namespace mu= st - * provide a valid Namespace UUID in the Namespace Identification Desc= riptor - * data structure. QEMU does not yet support setting NGUID. - */ - uuid.hdr.nidt =3D NVME_NIDT_UUID; - uuid.hdr.nidl =3D NVME_NIDL_UUID; - memcpy(uuid.v, ns->params.uuid.data, NVME_NIDL_UUID); - memcpy(pos, &uuid, sizeof(uuid)); - pos +=3D sizeof(uuid); + if (!qemu_uuid_is_null(&ns->params.uuid)) { + uuid.hdr.nidt =3D NVME_NIDT_UUID; + uuid.hdr.nidl =3D NVME_NIDL_UUID; + memcpy(uuid.v, ns->params.uuid.data, NVME_NIDL_UUID); + memcpy(pos, &uuid, sizeof(uuid)); + pos +=3D sizeof(uuid); + } =20 if (ns->params.eui64) { eui64.hdr.nidt =3D NVME_NIDT_EUI64; --=20 2.35.1