From nobody Mon Feb 9 15:29:53 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 ARC-Seal: i=1; a=rsa-sha256; t=1619155895; cv=none; d=zohomail.com; s=zohoarc; b=kAztj/CJ5BGHD87RMByAxrl3TZ6G/tlBP+tR04SIgoa/FxSy5BsbMIayCxnh42Wo9EFiyFbuA2OAzFd67t/LIPrajwB1NdiZ4fu1eOskBFKXPCzmcihvDsT6jOCswKeysIRVnxyZfgVRHv+kg/ecL+esSbX6LqG38QLIOWtM19M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619155895; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ASPNVKGhYEtw+G+01UwLLbB8XBe+KmDswiJfaREDc/k=; b=WeW/ELMiwgcpDsqiqiNX3Mk0iCf5Lo2fxCWt3CfkSoN4cpTyvx24TfkTUTYNGa+8uAbdLZkMfcJVyoZP5EDTdyuRGtVBjO2yqj66MSDjZCr1dxB1f7yegnQWT9TO8v88tK9ypSsSiuq1vyyim+aCWtTSi2jmitslYsl62Ngp4qA= ARC-Authentication-Results: i=1; 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 1619155895489669.5075269345884; Thu, 22 Apr 2021 22:31:35 -0700 (PDT) Received: from localhost ([::1]:56320 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lZoPd-0000QC-PH for importer@patchew.org; Fri, 23 Apr 2021 01:31:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54346) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lZoG3-0006Wt-Ti; Fri, 23 Apr 2021 01:21:39 -0400 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:37803) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lZoG1-0001O4-CN; Fri, 23 Apr 2021 01:21:39 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 2964514F3; Fri, 23 Apr 2021 01:21:34 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Fri, 23 Apr 2021 01:21:34 -0400 Received: from apples.local (80-167-98-190-cable.dk.customer.tdc.net [80.167.98.190]) by mail.messagingengine.com (Postfix) with ESMTPA id AFAA11080063; Fri, 23 Apr 2021 01:21:32 -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=fm2; bh=ASPNVKGhYEtw+ G+01UwLLbB8XBe+KmDswiJfaREDc/k=; b=1KAq1MqMUOS1KYUgduSiVGccMh0ZN Z8Yg6K8hjbvWrIGXP0ndZKk1fOhZBHNphZNFpaSLfi59Px/HepaJgEUHFb1yTG9z slu5qOz3FctJNH58qPaeDp8Zve8TEaytqaen8lfSezWBMaOkMmXgFHFTNwWj5Ed9 HUsZjQOGIZh3Z7hhyRR2HMgIMM8gRJ6nLmvSZ/xRH9vxJ5DBGI59y52tD1pVBfTO MXGNoMQZy9TraQCqU+384ZBSIJVGv9MLbVRsRoCXemvSUr7C4TH9z/oJdejZpLvh jUSjlnLdwm8mVgHM2bdfV2v5onR1Phr778J25p+HdNewK5rq1qLhSmCkQ== 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= fm2; bh=ASPNVKGhYEtw+G+01UwLLbB8XBe+KmDswiJfaREDc/k=; b=ux6dX8rc nKzJ9NkN/+pgAYbciZMrLDZ0xOnMnFBrLVtRydzvj4aseiXDEsYruTmcb7aQk3kF tNooXSTd0hAI3C8DWxXDbfg4DJg97f2xQggG1BGRF4Cwu6GqKBWd5VtZjRH59Yg6 ZnnbviWYd7YLSRrMH0GsT4h4pUBDXE8swsbyfvcL0yZUSHtk4aO/LD4GeOjAttxF EOTsfBqfWR3+WXF/JjVbiMqNLeRjkzPDps+ISJRAtCCnx7s24fXey9dFgxHMa5YC 5LVE02kjDkWtIgW7xoQaOexVRse0CKJonaQ25pdYg+h4okk48AKVrSS7UsBEdsIa r4UHmzLCmkiCUA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdduuddgleduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefmlhgruhhs ucflvghnshgvnhcuoehithhssehirhhrvghlvghvrghnthdrughkqeenucggtffrrghtth gvrhhnpeeuleetgeeiuefhgfekfefgveejiefgteekiedtgfdtieefhfdthfefueffvefg keenucfkphepkedtrdduieejrdelkedrudeltdenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehithhssehirhhrvghlvghvrghnthdrughk X-ME-Proxy: From: Klaus Jensen To: Peter Maydell , qemu-devel@nongnu.org Subject: [PATCH for-6.0 v2 2/2] hw/block/nvme: disable hotplugging for subsystem-linked controllers Date: Fri, 23 Apr 2021 07:21:27 +0200 Message-Id: <20210423052127.512489-3-its@irrelevant.dk> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210423052127.512489-1-its@irrelevant.dk> References: <20210423052127.512489-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 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 , qemu-block@nongnu.org, Klaus Jensen , Max Reitz , Klaus Jensen , Keith Busch Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Klaus Jensen If a controller is linked to a subsystem, do not allow it to be hotplugged since this will mess up the (possibly shared) namespaces. Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 5fe082ec34c5..7606b58a39b9 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -6140,12 +6140,16 @@ static void nvme_init_ctrl(NvmeCtrl *n, PCIDevice *= pci_dev) =20 static int nvme_init_subsys(NvmeCtrl *n, Error **errp) { + DeviceClass *dc; int cntlid; =20 if (!n->subsys) { return 0; } =20 + dc =3D DEVICE_GET_CLASS(n); + dc->hotpluggable =3D false; + cntlid =3D nvme_subsys_register_ctrl(n, errp); if (cntlid < 0) { return -1; --=20 2.31.1