From nobody Sat Feb 7 03:45:18 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=1619100246; cv=none; d=zohomail.com; s=zohoarc; b=XY502Geyf9D5ebxp4AJsMkFsdhthuS0Hmx3iY/XhlVZ9+VB9kZVNe9jmHsuLv80lbmDYJCWqgMaqyhwSDL4X6GZ+SdicZLTDk7eKtikZsMdL4AluYm6eJ2FUcrrBmRJJRogz+hewCoz1mckqJ6sI/CDStOGCJqXsBWpgW6NyxeY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619100246; 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=GsK+ACJGs/Ugcx0dfxXfO3PtTcybUP67agVL7RKo6pY=; b=PMPoN1qn1KWnOFSHHmzB8ljp5fXpB8f08BF2OpNmiSSsuH2ztc5wjeUbchSMEf9FaGMsg7QB0mXeJm79w0zfV5VMlzGJGPw68mw2WKiMUfx1ovvX7sY6xPUN7ksCnYjdmesvUIoc6XqJ7AwfJmPKHWHUr1pk7NHz/WvEXU20/sc= 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 1619100246105489.22726905743525; Thu, 22 Apr 2021 07:04:06 -0700 (PDT) Received: from localhost ([::1]:52772 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lZZw3-0006jD-Fw for importer@patchew.org; Thu, 22 Apr 2021 10:04:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46534) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lZZqv-0004n7-9M; Thu, 22 Apr 2021 09:58:45 -0400 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:55059) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lZZqs-0007Wx-HY; Thu, 22 Apr 2021 09:58:45 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 792F31362; Thu, 22 Apr 2021 09:58:39 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 22 Apr 2021 09:58:40 -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 F11151080063; Thu, 22 Apr 2021 09:58:37 -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=GsK+ACJGs/Ugc x0dfxXfO3PtTcybUP67agVL7RKo6pY=; b=F//74d5dY0cwCzXOt3b/jn88UdrJL yPofROEGz6aJzeU1Is3N8ds6YirVX1bq6EDV3i2DrTiWmYsKDtPfudXeBLA7canr eykB+UIh3KIcGYcLvS32DJhEPctGPYUrvo7dMU1YRubw+Exe1dwIotVgj6mswrFP Dk4qd5AOphpI+bsbJmaRTH6q1srUVmp6Pt2w1Za5X26IwOYheuECTDGNT0AJAce8 3RrRHK3PZU/iiCGhShdQc1LKqstkXiyE9L8VH+OfCcD7e6wrx6um0jbHL62Uk3Wb zXKP41QRONhfOh5RQWGt+Jnl8bGPpvHAxEAAFVerlAX/PhyJa3aWW8azA== 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=GsK+ACJGs/Ugcx0dfxXfO3PtTcybUP67agVL7RKo6pY=; b=aKB8Jd1E 8T607Ql20DJm2TE9keo3kBaNPGvj30OLAEzdUTaEuAK9AfLWTghEnKCG3ST3wOyB xB2hvjV7WyCWMkAgLv/VQ0FVobDPHj6GMkB81KYToxdbb+arCsEOj8369D6QwAT/ 6GmCALk/uIqMwUedVAoCRX4pySdNFSgH/KtnL+MUrtwY6WTCD94575YDQtTDbHgO 7FJbUnlqNQecYEy7qZX8T3wxN7lqwckwH462XpeSkjjTijC+xpzbZJcqNj+nipUy 5U/HbhUuiSu8qKW2LxBEwkd3tlNRF6L7IFX9U0QZa2UNx1KB4SGAsgwhOXAMl8fH VUgoyBxDfkaT7g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvddutddgjeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefmlhgruhhs ucflvghnshgvnhcuoehithhssehirhhrvghlvghvrghnthdrughkqeenucggtffrrghtth gvrhhnpeeuleetgeeiuefhgfekfefgveejiefgteekiedtgfdtieefhfdthfefueffvefg keenucfkphepkedtrdduieejrdelkedrudeltdenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehithhssehirhhrvghlvghvrghnthdrughk X-ME-Proxy: From: Klaus Jensen To: qemu-devel@nongnu.org, Peter Maydell Subject: [PATCH for-6.0? 1/1] hw/block/nvme: fix invalid msix exclusive uninit Date: Thu, 22 Apr 2021 15:58:34 +0200 Message-Id: <20210422135834.406688-2-its@irrelevant.dk> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210422135834.406688-1-its@irrelevant.dk> References: <20210422135834.406688-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.19; envelope-from=its@irrelevant.dk; helo=wout3-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 Commit 1901b4967c3f changed the nvme device from using a bar exclusive for MSI-x to sharing it on bar0. Unfortunately, the msix_uninit_exclusive_bar() call remains in nvme_exit() which causes havoc when the device is removed with, say, device_del. Fix this. Fixes: 1901b4967c3f ("hw/block/nvme: move msix table and pba to BAR 0") Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 624a1431d072..31a1a59d88c9 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -6235,7 +6235,7 @@ static void nvme_exit(PCIDevice *pci_dev) if (n->pmr.dev) { host_memory_backend_set_mapped(n->pmr.dev, false); } - msix_uninit_exclusive_bar(pci_dev); + msix_uninit(pci_dev, &n->bar0, &n->bar0); } =20 static Property nvme_props[] =3D { --=20 2.31.1