From nobody Sat May 4 20:54:54 2024 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 1650370824546836.67787648917; Tue, 19 Apr 2022 05:20:24 -0700 (PDT) Received: from localhost ([::1]:42718 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ngmqE-0001Kw-CU for importer@patchew.org; Tue, 19 Apr 2022 08:20:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48042) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ngmh1-0006bg-A1; Tue, 19 Apr 2022 08:10:51 -0400 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:45623) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ngmgz-0003dS-B3; Tue, 19 Apr 2022 08:10:50 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 282753202005; Tue, 19 Apr 2022 08:10:47 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Tue, 19 Apr 2022 08:10:47 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 19 Apr 2022 08:10:45 -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=1650370246; x= 1650456646; bh=q01/cVRPT0x6aob+KmSCWwgCWxOKa//IJaewPcOdEDE=; b=m 2M5/C8NlB4I5Z7UP8Zh372uWmRO7bIgu43SuDXh/fOqNnr3Yowj9dwOgDEPRh3fp ZimYm0LcWEuUq4k+YKXcz+OrDYuub7jmM4TdgjgniuuKXZYFBNx3nwRhUSGI3VV3 +OE5ccNjnZuxvps7ekU7Q90037nYw+uBSIoMkHgElLMXnxPuCmBk/tQHYEpIfBzu aWd7Hai1PItsBeaPPh7WC6bV9IOu7qg1EHxA6FjPiVbL/VBh9jI85KX/lo0uLVpr CqE8hcnd1mygDU/gEU3ko/tm4P3URKwnNVjYJjnP+1eLL0EBavA3IWbJNBKLBu8s qS7PTmzdwhxWJd06bliiA== 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= 1650370246; x=1650456646; bh=q01/cVRPT0x6aob+KmSCWwgCWxOKa//IJae wPcOdEDE=; b=SalpCrK21jL8haa1k+MN92jOz970Wdsq2Ui3q0P6nD2TcLBPoMs C0pBH+AEoejE5RVBzW95xiBccN9qApTc/jMuGC/SiBoRumMFrSLNPvzjrzte07rc GpGFKAPTvcll73dQkVLfJlsV0YGLbTzjZC57cmqM7FXXrzwL5/iS18pO8LPL2lLg 4kAE7oRaD/ffQ2JkfaJEoc1hLQEkkYqDwF+HRTe1aPxaQhsYhLYHMAZ10JUqfyjH OeR0Ff9WSE1ZVCDfJ+YA0Q4s82geP1NgOXZOwpYVF7T0yyGiI0MDX13dzsLzzsOb GCqc7AjwupogkvDjbvuCohIpO/szL7eJ6PQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrvddtfedggeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefmlhgruhhs ucflvghnshgvnhcuoehithhssehirhhrvghlvghvrghnthdrughkqeenucggtffrrghtth gvrhhnpeeuleetgeeiuefhgfekfefgveejiefgteekiedtgfdtieefhfdthfefueffvefg keenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehith hssehirhhrvghlvghvrghnthdrughk X-ME-Proxy: From: Klaus Jensen To: qemu-devel@nongnu.org Subject: [PATCH 1/5] hw/nvme: enforce common serial per subsystem Date: Tue, 19 Apr 2022 14:10:35 +0200 Message-Id: <20220419121039.1259477-2-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: 1650370827852100001 Content-Type: text/plain; charset="utf-8" From: Klaus Jensen The Identify Controller Serial Number (SN) is the serial number for the NVM subsystem and must be the same across all controller in the NVM subsystem. Enforce this. Signed-off-by: Klaus Jensen Reviewed-by: Christoph Hellwig Reviewed-by: Keith Busch --- hw/nvme/nvme.h | 1 + hw/nvme/subsys.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/hw/nvme/nvme.h b/hw/nvme/nvme.h index 739c8b8f7962..7f2e8f1b6491 100644 --- a/hw/nvme/nvme.h +++ b/hw/nvme/nvme.h @@ -48,6 +48,7 @@ typedef struct NvmeSubsystem { DeviceState parent_obj; NvmeBus bus; uint8_t subnqn[256]; + char *serial; =20 NvmeCtrl *ctrls[NVME_MAX_CONTROLLERS]; NvmeNamespace *namespaces[NVME_MAX_NAMESPACES + 1]; diff --git a/hw/nvme/subsys.c b/hw/nvme/subsys.c index fb58d639504e..691a90d20947 100644 --- a/hw/nvme/subsys.c +++ b/hw/nvme/subsys.c @@ -27,6 +27,13 @@ int nvme_subsys_register_ctrl(NvmeCtrl *n, Error **errp) return -1; } =20 + if (!subsys->serial) { + subsys->serial =3D g_strdup(n->params.serial); + } else if (strcmp(subsys->serial, n->params.serial)) { + error_setg(errp, "invalid controller serial"); + return -1; + } + subsys->ctrls[cntlid] =3D n; =20 for (nsid =3D 1; nsid < ARRAY_SIZE(subsys->namespaces); nsid++) { --=20 2.35.1 From nobody Sat May 4 20:54:54 2024 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 1650370843668704.426658341604; Tue, 19 Apr 2022 05:20:43 -0700 (PDT) Received: from localhost ([::1]:44772 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ngmqY-0001oN-23 for importer@patchew.org; Tue, 19 Apr 2022 08:20:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48086) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ngmh4-0006d5-6Y; Tue, 19 Apr 2022 08:10:54 -0400 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:42035) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ngmh2-0003kf-Bf; Tue, 19 Apr 2022 08:10:53 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 2E78D320204A; Tue, 19 Apr 2022 08:10:50 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Tue, 19 Apr 2022 08:10:50 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 19 Apr 2022 08:10:48 -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=1650370249; x= 1650456649; bh=ndOGC+6Q8QGSKmlsXLSQEeN/1XRg0L/izpaGqnVVhhs=; b=Y gFLjlNd88LR5GbPR9JAoesy1EIjFNMnJizdQSg7GpE2ShBQNoC/yM3YkhRq+YaoL oEtx5YSJFwbv7BKVJAc9tLXz/+g7mr1aUdxU3j8zJ8giJ2qloOek+6IFRYydeZzT dukxo1fXgWAc9GgRTOvBZSL57WjoeFygT/SrEiPAyTL5MhpNmvFV/RvofRltfSnK y9UVxHvY4v7n1hvAFbhDe6STu/5xiByCLZ4LGnP3/kk7XNPY6y8LoVqi4IrzrAxD qrdWJl/yKvGSUNh+mJv8tQCjZghhLQHT+c64ZW79e6sCFSDqG4IXV+aL6tu1j78u YAPH7oy295J04tBW34+fg== 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= 1650370249; x=1650456649; bh=ndOGC+6Q8QGSKmlsXLSQEeN/1XRg0L/izpa GqnVVhhs=; b=haUOqNDwWNi5AL17St51cEvRmM0wztHGxXhB3bi9HdVQj8FBYMH GoIk+TkMBFz+C3VXa2wnv9iUWK3hY/5IrPpfGV/4+h61+1hyuTlnzQzR9ycfRnJT IvK+UALIku5jiiQmykSonKYlEAVfe5V4M2biMz2LD+f4ecybgP2jjYb4cCKbCala Sy/jOaKB3YMOE/9fEZCaQyNKGpRLZh3lwV2wJmmxBzO0/pDy6O0Ytq3Zxdala+KF zRSbYbqhRg/S4wg07JNhP8RbaVGRX73EgPAZS1L5o4KnUL9OhiosR3s7eJ7clAOF 7Nh4iGWY4Vvp+OelZtSbjRP4e3vDkwuWWRQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrvddtfedggeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefmlhgruhhs ucflvghnshgvnhcuoehithhssehirhhrvghlvghvrghnthdrughkqeenucggtffrrghtth gvrhhnpeeuleetgeeiuefhgfekfefgveejiefgteekiedtgfdtieefhfdthfefueffvefg keenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehith hssehirhhrvghlvghvrghnthdrughk X-ME-Proxy: From: Klaus Jensen To: qemu-devel@nongnu.org Subject: [PATCH 2/5] hw/nvme: always set eui64 Date: Tue, 19 Apr 2022 14:10:36 +0200 Message-Id: <20220419121039.1259477-3-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: 1650370845441100003 Content-Type: text/plain; charset="utf-8" From: Klaus Jensen Unconditionally set an EUI64 for namespaces. The nvme-ns device defaults to auto-generating a persistent EUI64 if not specified, but for single namespace setups (-device nvme,drive=3D...), this does not happen. Since the EUI64 has previously been zeroed it is not considered valid, so it should be safe to add this now. The generated EUI64 is of the form 52:54:00:. Note, this is NOT the namespace identifier since that is not unique across subsystems; it is a global namespace counter. This has the effect that the value of this auto-generated EUI64 is dependent on the order with which the namespaces are created. If a more flexible setup is required, the eui64 namespace parameter should be explicitly set. Update the documentation to make this clear. Signed-off-by: Klaus Jensen Reviewed-by: Keith Busch --- docs/system/devices/nvme.rst | 6 ++++-- hw/nvme/ctrl.c | 2 ++ hw/nvme/ns.c | 12 ++++++++---- hw/nvme/nvme.h | 3 +++ 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/docs/system/devices/nvme.rst b/docs/system/devices/nvme.rst index b5acb2a9c19d..f9b8c7f3eeb4 100644 --- a/docs/system/devices/nvme.rst +++ b/docs/system/devices/nvme.rst @@ -84,8 +84,10 @@ There are a number of parameters available: ``eui64`` Set the EUI-64 of the namespace. This will be reported as a "IEEE Extend= ed Unique Identifier" descriptor in the Namespace Identification Descriptor= List. - Since machine type 6.1 a non-zero default value is used if the parameter - is not provided. For earlier machine types the field defaults to 0. + Since machine type 6.1, an EUI-64 is auto-generated. However, note that = this + auto-generated value is dependent on the order with which the namespaces= are + created. If you intend on adding/removing namespaces on your VM, set this + parameter explicitly. For earlier machine types the field defaults to 0. =20 ``bus`` If there are more ``nvme`` devices defined, this parameter may be used to diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c index 03760ddeae8c..17cf9862ab89 100644 --- a/hw/nvme/ctrl.c +++ b/hw/nvme/ctrl.c @@ -6862,6 +6862,8 @@ static void nvme_realize(PCIDevice *pci_dev, Error **= errp) ns =3D &n->namespace; ns->params.nsid =3D 1; =20 + nvme_ns_set_eui64(ns); + if (nvme_ns_setup(ns, errp)) { return; } diff --git a/hw/nvme/ns.c b/hw/nvme/ns.c index 324f53ea0cd1..5685221f47c6 100644 --- a/hw/nvme/ns.c +++ b/hw/nvme/ns.c @@ -25,6 +25,8 @@ #define MIN_DISCARD_GRANULARITY (4 * KiB) #define NVME_DEFAULT_ZONE_SIZE (128 * MiB) =20 +uint64_t nvme_ns_count; + void nvme_ns_init_format(NvmeNamespace *ns) { NvmeIdNs *id_ns =3D &ns->id_ns; @@ -54,9 +56,13 @@ void nvme_ns_init_format(NvmeNamespace *ns) id_ns->npda =3D id_ns->npdg =3D npdg - 1; } =20 +void nvme_ns_set_eui64(NvmeNamespace *ns) +{ + ns->params.eui64 =3D NVME_EUI64_DEFAULT | ++nvme_ns_count; +} + static int nvme_ns_init(NvmeNamespace *ns, Error **errp) { - static uint64_t ns_count; NvmeIdNs *id_ns =3D &ns->id_ns; NvmeIdNsNvm *id_ns_nvm =3D &ns->id_ns_nvm; uint8_t ds; @@ -75,10 +81,8 @@ static int nvme_ns_init(NvmeNamespace *ns, Error **errp) id_ns->nmic |=3D NVME_NMIC_NS_SHARED; } =20 - /* Substitute a missing EUI-64 by an autogenerated one */ - ++ns_count; if (!ns->params.eui64 && ns->params.eui64_default) { - ns->params.eui64 =3D ns_count + NVME_EUI64_DEFAULT; + nvme_ns_set_eui64(ns); } =20 /* simple copy */ diff --git a/hw/nvme/nvme.h b/hw/nvme/nvme.h index 7f2e8f1b6491..3922cf531f6d 100644 --- a/hw/nvme/nvme.h +++ b/hw/nvme/nvme.h @@ -33,6 +33,8 @@ QEMU_BUILD_BUG_ON(NVME_MAX_NAMESPACES > NVME_NSID_BROADCA= ST - 1); typedef struct NvmeCtrl NvmeCtrl; typedef struct NvmeNamespace NvmeNamespace; =20 +extern uint64_t nvme_ns_count; + #define TYPE_NVME_BUS "nvme-bus" OBJECT_DECLARE_SIMPLE_TYPE(NvmeBus, NVME_BUS) =20 @@ -511,6 +513,7 @@ static inline uint16_t nvme_cid(NvmeRequest *req) return le16_to_cpu(req->cqe.cid); } =20 +void nvme_ns_set_eui64(NvmeNamespace *ns); void nvme_attach_ns(NvmeCtrl *n, NvmeNamespace *ns); uint16_t nvme_bounce_data(NvmeCtrl *n, void *ptr, uint32_t len, NvmeTxDirection dir, NvmeRequest *req); --=20 2.35.1 From nobody Sat May 4 20:54:54 2024 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 Reviewed-by: Keith Busch --- 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 From nobody Sat May 4 20:54:54 2024 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 1650371027917151.22714396743186; Tue, 19 Apr 2022 05:23:47 -0700 (PDT) Received: from localhost ([::1]:35186 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ngmtW-0006r5-Qt for importer@patchew.org; Tue, 19 Apr 2022 08:23:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48140) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ngmhB-0006gj-FT; Tue, 19 Apr 2022 08:11:01 -0400 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:38795) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ngmh8-0003li-QR; Tue, 19 Apr 2022 08:11:01 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 1643232003C0; Tue, 19 Apr 2022 08:10:55 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Tue, 19 Apr 2022 08:10:56 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 19 Apr 2022 08:10:54 -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=1650370255; x= 1650456655; bh=FOaMJuv3F8/hy+3iREwbz/wapBJ6ORziEewjsiYJ3fc=; b=P r+awG38Thy8zRmHsGHmEgh3/GpdkOH1yxD96G1yHA4E2LGoyVHOud3mRQCoHcvJd GMlhcNp4Q4h6Ap1o6kWtkt/Tode/UusQrR3h/9XgMWjT6WA+Fe3xK9XJbQKkCtvt MH2tGNh0Xxd0QM4AhQQm8uVE+htTwwKsRSGYd0JYF0FDUFDqddO2azCRxi33mryy OMe40A9ouwtsy2qmYadQwlPmkjPszR3i7T7UzFcBd3cs9V5oshKH6uCBds5yixJl NeQL/Z2jHcRusr9+SS3sCahr0RWCfDOOZMbxWVGn2RbNy++FbUk6koIZehf2B9W6 vK3sA1KbApkgZujnVGpxA== 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= 1650370255; x=1650456655; bh=FOaMJuv3F8/hy+3iREwbz/wapBJ6ORziEew jsiYJ3fc=; b=JQGHAHcR8/IVKk+hUKExja3Cfkh9WyXVELkJfwXccD2QMDt264D VPdjcyu7uERQVLMRo/VdCmzZei2dgjX/nkxD6D746vgW0qwR0zveMeC7bzbTx1EZ wDJ2NxWb/85/kZfXu+9Ns7Y0Yw9xuFDTjvkldeYjTgzfS9Qr8BbWu3Xa14uVu9Mw 5EHJq/veaLMfBXY3tlkDs5rPr0EtwihakafGQRGGZXi9hJwQGiMrtBqwlwaOwDSC 6qy6z6LrQ7GVOUl/w5dIlHh5uYoQlIPitUr5tu9TsenUUjSNnoLFThSDRMz6Fo5z kQiWovWh0pyk4lVlGXWDP2pfSkMnydutfEg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrvddtfedggeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefmlhgruhhs ucflvghnshgvnhcuoehithhssehirhhrvghlvghvrghnthdrughkqeenucggtffrrghtth gvrhhnpeeuleetgeeiuefhgfekfefgveejiefgteekiedtgfdtieefhfdthfefueffvefg keenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpehith hssehirhhrvghlvghvrghnthdrughk X-ME-Proxy: From: Klaus Jensen To: qemu-devel@nongnu.org Subject: [PATCH 4/5] hw/nvme: do not auto-generate uuid Date: Tue, 19 Apr 2022 14:10:38 +0200 Message-Id: <20220419121039.1259477-5-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: 1650371028166100001 Content-Type: text/plain; charset="utf-8" From: Klaus Jensen Do not default to generate an UUID for namespaces if it is not explicitly specified. This is a technically a breaking change in behavior. However, since the UUID changes on every VM launch, it is not spec compliant and is of little use since the UUID cannot be used reliably anyway and the behavior prior to this patch must be considered buggy. Signed-off-by: Klaus Jensen Reviewed-by: Keith Busch --- hw/nvme/ns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/nvme/ns.c b/hw/nvme/ns.c index 5685221f47c6..960c5124b811 100644 --- a/hw/nvme/ns.c +++ b/hw/nvme/ns.c @@ -617,7 +617,7 @@ static Property nvme_ns_props[] =3D { DEFINE_PROP_BOOL("detached", NvmeNamespace, params.detached, false), DEFINE_PROP_BOOL("shared", NvmeNamespace, params.shared, true), DEFINE_PROP_UINT32("nsid", NvmeNamespace, params.nsid, 0), - DEFINE_PROP_UUID("uuid", NvmeNamespace, params.uuid), + DEFINE_PROP_UUID_NODEFAULT("uuid", NvmeNamespace, params.uuid), DEFINE_PROP_UINT64("eui64", NvmeNamespace, params.eui64, 0), DEFINE_PROP_UINT16("ms", NvmeNamespace, params.ms, 0), DEFINE_PROP_UINT8("mset", NvmeNamespace, params.mset, 0), --=20 2.35.1 From nobody Sat May 4 20:54:54 2024 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 165037127261869.55480947570152; Tue, 19 Apr 2022 05:27:52 -0700 (PDT) Received: from localhost ([::1]:49094 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ngmxT-0003SE-JX for importer@patchew.org; Tue, 19 Apr 2022 08:27:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48160) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ngmhD-0006iD-03; Tue, 19 Apr 2022 08:11:03 -0400 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:48455) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ngmhB-0003m5-Ac; Tue, 19 Apr 2022 08:11:02 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 1713532007F9; Tue, 19 Apr 2022 08:10:58 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Tue, 19 Apr 2022 08:10:59 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 19 Apr 2022 08:10:57 -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=1650370258; x= 1650456658; bh=g1G66PylZz2tISXVyUlZvrgNwEikTnLhJ8j6MaJ97r0=; b=j oIdSjbpKx+2ylopg3muM/8xw0mBbjMUSnNm/WWVxyBgpYue58MR7nf3M/F4AhisR jjHjMu+h8z42OrgFttn57576BTTY9QWG2oYmsQ12X7wdVGL9RjWbschUlOSj00BX 0/ScAKqixA6GLSCVlQpJB66LXdTHl8JQQE8h8LlieEAXt2IxmQSTcbEOBhDeeFKU kUvm0s0ccORSjCSt6TYijgt6EfFGMUCBtUhdbYO4pTwZQ5siUoR+P2Hg2PEx+le2 v/CWEAYwuA7y8BRbUzyacJP0MtYfapSEd4l0fqIfaMWIv4gnY1b48uSMgsLSPF/S z9urUZNWYJ5ZmJPwAuuGg== 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= 1650370258; x=1650456658; bh=g1G66PylZz2tISXVyUlZvrgNwEikTnLhJ8j 6MaJ97r0=; b=dzZ/HbjVkVBXqhio9twkqIAXYbWi6h/FJm6YMRP5pb0dglM1ahv GsBSH9v1/3nq0ut0Eg636znnuUz8Kom785Vw4LUYhho2N0oBbKN/bV+CKMXfS2wS yBMS0YG3eSc6ryIwsm3ipqb0EeEfe+NNR6UWza+vAS0KrRKIO9xp9jIitvBC6ARW FHuhmycKBJY9NvHxkr2gMloHafpBVTVHQg9exi2/7mV47zBOO2EkuAeXN2BAx+zy 79VQdIl3VpEFRePrLCU+qUxgyj88RDmsVjnEDsB5vPX964pX5aQp1qABCvOUEdu+ ngSyA5QsDn2xq6qpHovIhL2p9pf4Wx0ltTA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrvddtfedggeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefmlhgruhhs ucflvghnshgvnhcuoehithhssehirhhrvghlvghvrghnthdrughkqeenucggtffrrghtth gvrhhnpeeuleetgeeiuefhgfekfefgveejiefgteekiedtgfdtieefhfdthfefueffvefg keenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpehith hssehirhhrvghlvghvrghnthdrughk X-ME-Proxy: From: Klaus Jensen To: qemu-devel@nongnu.org Subject: [PATCH 5/5] hw/nvme: bump firmware revision Date: Tue, 19 Apr 2022 14:10:39 +0200 Message-Id: <20220419121039.1259477-6-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: 1650371274020100001 Content-Type: text/plain; charset="utf-8" From: Klaus Jensen The Linux kernel quirks the QEMU NVMe controller pretty heavily because of the namespace identifier mess. Since this is now fixed, bump the firmware revision number to allow the quirk to be disabled for this revision. As of now, bump the firmware revision number to be equal to the QEMU release version number. Signed-off-by: Klaus Jensen Reviewed-by: Keith Busch --- hw/nvme/ctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c index 2b7828ac6952..dc298aacc422 100644 --- a/hw/nvme/ctrl.c +++ b/hw/nvme/ctrl.c @@ -6708,7 +6708,7 @@ static void nvme_init_ctrl(NvmeCtrl *n, PCIDevice *pc= i_dev) id->vid =3D cpu_to_le16(pci_get_word(pci_conf + PCI_VENDOR_ID)); id->ssvid =3D cpu_to_le16(pci_get_word(pci_conf + PCI_SUBSYSTEM_VENDOR= _ID)); strpadcpy((char *)id->mn, sizeof(id->mn), "QEMU NVMe Ctrl", ' '); - strpadcpy((char *)id->fr, sizeof(id->fr), "1.0", ' '); + strpadcpy((char *)id->fr, sizeof(id->fr), QEMU_VERSION, ' '); strpadcpy((char *)id->sn, sizeof(id->sn), n->params.serial, ' '); =20 id->cntlid =3D cpu_to_le16(n->cntlid); --=20 2.35.1