From nobody Mon Feb 9 12:15:14 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 1657874806607105.87944958359503; Fri, 15 Jul 2022 01:46:46 -0700 (PDT) Received: from localhost ([::1]:45306 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oCGyD-0003VS-Cf for importer@patchew.org; Fri, 15 Jul 2022 04:46:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42274) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oCGvT-0000g3-M9; Fri, 15 Jul 2022 04:43:55 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:40559) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oCGvS-0004Kf-0p; Fri, 15 Jul 2022 04:43:55 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 3BE325C01BF; Fri, 15 Jul 2022 04:43:53 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Fri, 15 Jul 2022 04:43:53 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 15 Jul 2022 04:43: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=fm2; t=1657874633; x= 1657961033; bh=kUIEkaBBrqE/qW5qX9ZQKrTwadB8yAa9wWEe/C/OJFk=; b=u 4+a0R2PALT+x42kmsePuNb5LAtT8umqOe/HQsbcniNX6JGPUvLR7mM7WDb52faYC wHUAYldxxsCdG3GUp29Ogg6mgUeCxZjpGzZI3DKz63pgLDwCMr2p9ZIbWaC9ZTgG lgNct7CWb0cnhO7KoKPlhyZKIQ9n8bJx4tEhsCf6msvsrpK3pdhR/qUyxKWucaE5 m8tkhuenZw+poQVcTBUjmn6myc8xjM5jV0lPeUreOSxsQw8lglfA7cp18GfiIumM MRjd+rM94WaZkPmgg0dHaQHSlmPCoqF1UTfS3XVv5R5hSpE+i+vcFl+Duxcwn/S9 dPU8+/Fd9RVRwhZJHOe3g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id: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=fm3; t=1657874633; x=1657961033; bh=kUIEkaBBrqE/q W5qX9ZQKrTwadB8yAa9wWEe/C/OJFk=; b=Gu9jiu/lK0DqpIn7FJPaOBm8Bw+vX AMluOErGeOrJIYtlFT/XleqSnVPfTNhJXtQzyHG9q1omQH1qjaNm7FPkPndqLCjD 3WJRDgebkafvAuJGBK6/o7H0hIncCLDYm+S0Y+uk6prjkU/eU+2iC3uupEOAciQE 9AC9CO8u3WJNjHHS+pJiz/+SIH2l62CCuyEPufuse6a0jIYFNJK4g/gkJ9k2/Y28 Vtrmnm22VNvyDM6ExU+xQk71rBSUFDGvDG+CveXppLEqX/H01aFFnlu/uisMdsFd 7vs+l+WH0/eBojyjqplms3tI9mJwyH34lJ5gTwFDN6QPkbWJUuA9/iZEw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudekuddgtdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepmfhlrghu shculfgvnhhsvghnuceoihhtshesihhrrhgvlhgvvhgrnhhtrdgukheqnecuggftrfgrth htvghrnhepjefgieelgfeiveehkeeuveehheekfeevgeeigfehfefgjeejhefffeegudej udegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepih htshesihhrrhgvlhgvvhgrnhhtrdgukh X-ME-Proxy: Feedback-ID: idc91472f:Fastmail From: Klaus Jensen To: Peter Maydell , qemu-devel@nongnu.org Cc: Hanna Reitz , Fam Zheng , Klaus Jensen , Kevin Wolf , Keith Busch , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-block@nongnu.org, Stefan Hajnoczi , Niklas Cassel , Klaus Jensen Subject: [PULL 4/6] hw/nvme: force nvme-ns param 'shared' to false if no nvme-subsys node Date: Fri, 15 Jul 2022 10:43:38 +0200 Message-Id: <20220715084340.1128455-5-its@irrelevant.dk> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220715084340.1128455-1-its@irrelevant.dk> References: <20220715084340.1128455-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.26; envelope-from=its@irrelevant.dk; helo=out2-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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZM-MESSAGEID: 1657874809739100001 Content-Type: text/plain; charset="utf-8" From: Niklas Cassel Since commit 916b0f0b5264 ("hw/nvme: change nvme-ns 'shared' default") the default value of nvme-ns param 'shared' is set to true, regardless if there is a nvme-subsys node or not. On a system without a nvme-subsys node, a namespace will never be able to be attached to more than one controller, so for this configuration, it is counterintuitive for this parameter to be set by default. Force the nvme-ns param 'shared' to false for configurations where there is no nvme-subsys node, as the namespace will never be able to attach to more than one controller anyway. Signed-off-by: Niklas Cassel Reviewed-by: Klaus Jensen Signed-off-by: Klaus Jensen --- hw/nvme/ns.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/nvme/ns.c b/hw/nvme/ns.c index 870c3ca1a2f0..62a1f97be010 100644 --- a/hw/nvme/ns.c +++ b/hw/nvme/ns.c @@ -546,6 +546,8 @@ static void nvme_ns_realize(DeviceState *dev, Error **e= rrp) int i; =20 if (!n->subsys) { + /* If no subsys, the ns cannot be attached to more than one ctrl. = */ + ns->params.shared =3D false; if (ns->params.detached) { error_setg(errp, "detached requires that the nvme device is " "linked to an nvme-subsys device"); --=20 2.36.1