From nobody Tue Oct 14 10:40:26 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=1588828143; cv=none; d=zohomail.com; s=zohoarc; b=OMnjcozl8uxlgnklhigASXNW3gkKkD7MdddZ6D9zJC3DvnUd6ErhVL47uz+oQq+K76qUOaBfpu93KHXThdz4EAFJTni+Mors6ZqymxOnaIVDcFr4BMSY1NIf3hRDT/hbpcVcB6hBqvGk0HLhka2CFE8428bWFNzvaj56/T/wslk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588828143; 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=oJ8q4LzRdgrIhhP9wjAz96OaemG/R19VqBN1a/udxD4=; b=OstHWuSVqaQMqIouHsebzOKljg4RW1fxTWxjEVrjHtuldQxMHbj5K2akqdXR3VSMYq9qdcD8cLrwPw6i8QLRiFAQmY921kVBRcduAvkYAm6UbVu6LFIEJarourV41/G1gVlsv0NAAaAU2ERRfNPOsIiwcr0RdD1nTTCgKh3/zoE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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 1588828143283355.7038743990055; Wed, 6 May 2020 22:09:03 -0700 (PDT) Received: from localhost ([::1]:58084 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jWYmM-00088I-14 for importer@patchew.org; Thu, 07 May 2020 01:09:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33568) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jWYhx-0007eV-UQ; Thu, 07 May 2020 01:04:29 -0400 Received: from ozlabs.org ([203.11.71.1]:55927) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jWYhw-0007ep-JM; Thu, 07 May 2020 01:04:29 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 49HhFp344yz9sTD; Thu, 7 May 2020 15:04:14 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1588827854; bh=BpNRLah7EfAeUCXd8VopYmqO50hFxTiTg0i15Mff6bY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kWu7/UTIujxTPzOmMkW/aYppXBZleKCykkBBp6K7cMlwb6ng1vwJGHaJv4BL1+exG 6q0EQU/f6UU89ph8UzkHzf6mrtl1UwrceHmlRR/UEnLyXWzs0wZ9TwbJBg2HG5i69v EHoz5MKZxq7Dm010C8iQbIQzPle3IICyTUy5JJOc= From: David Gibson To: peter.maydell@linaro.org Subject: [PULL 11/18] spapr: Don't allow unplug of NVLink2 devices Date: Thu, 7 May 2020 15:02:21 +1000 Message-Id: <20200507050228.802395-12-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200507050228.802395-1-david@gibson.dropbear.id.au> References: <20200507050228.802395-1-david@gibson.dropbear.id.au> 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=203.11.71.1; envelope-from=dgibson@ozlabs.org; helo=ozlabs.org X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/07 01:04:14 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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: aik@ozlabs.ru, qemu-devel@nongnu.org, npiggin@gmail.com, groug@kaod.org, qemu-ppc@nongnu.org, clg@kaod.org, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Currently, we can't properly handle unplug of NVLink2 devices, because we don't have code to tear down their special memory resources. There's not a lot of impetus to implement that: since hardware NVLink2 devices can't be hot unplugged, the guest side drivers don't usually support unplug anyway. Therefore, simply prevent unplug of NVLink2 devices. Signed-off-by: David Gibson Reviewed-by: Alexey Kardashevskiy --- hw/ppc/spapr_pci.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index 55ca9dee1e..61b84a392d 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -1665,6 +1665,10 @@ static void spapr_pci_unplug_request(HotplugHandler = *plug_handler, error_setg(errp, "PCI: Hot unplug of PCI bridges not supported= "); return; } + if (object_property_get_uint(OBJECT(pdev), "nvlink2-tgt", NULL)) { + error_setg(errp, "PCI: Cannot unplug NVLink2 devices"); + return; + } =20 /* ensure any other present functions are pending unplug */ if (PCI_FUNC(pdev->devfn) =3D=3D 0) { --=20 2.26.2