From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6457338887C for ; Tue, 23 Jun 2026 17:06:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782234373; cv=none; b=ZR2q+IUvlv51VGg0lBRiMkkLAiOQA3UdCbtMOXTWF65lpfmrNk491iQOCBu+mFVVQwl4hY2V3amB4fyJ+hE64CntHzh4+ZNON6IWRra9UayrgSyTebDarWP4Uu31Z7dL2yZXGfjtABnX09DHs3mMbct4yep37BiMEvoT6KZJIqA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782234373; c=relaxed/simple; bh=+OWC+hm04vkx07o8SXbdOwqEuj7KIn2R19JW3xoiy38=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=D95HwifoRJwi2tB9PCJ2tpEwh80Eup/T5IPEX6Y98L6lOX3K25rSgZD8d01C26x6bzRb3bWnpmuzRba5MXxLtab0Lo3ltWxz9giK1CW06xgxtvaGS106m6V7O7hfnQG7oxur/S+GD5Pf4XHkmUrMzalqGYG+fSv+IYECc4ma4ds= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=gRq6DtVT; arc=none smtp.client-ip=209.85.214.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="gRq6DtVT" Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-2c6b7bd4e8dso1315ad.0 for ; Tue, 23 Jun 2026 10:06:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1782234372; x=1782839172; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=Tu79wS1tW2o86htP+jh+vF6ThoZY7vyXOnOxpMqA3sM=; b=gRq6DtVT31Nj2zwIg7GQruXY5LrNSEKXtkAOq1WhG3iNJKf6xraesx6wDZm61LnWMG RZldWXjPjJ5HjZuqsbArJdIoi7/WCiAGwbQt+OVC7FVtVMUpqS3R0Gk9NGRIwrTeB5pj 0qrzc+iNKn+z8ZC7GFnSFRRIPlfs6kH/gUV53UGFaAcOupZ4SaSiduHdxVGXjwwbDyPB Fip4TLfCXHkNksgpX8Jfb5+P37oXJBD9p69b0OLWPoLZ8GV63ZE6u01ZY7vQY/MHyBol DUAeq0U4mqJ6noVn0BV9G2STtMNqLyjZnZ6FxV/XkN0j1J/Qj3cmxJf2j5iS1X6gqUXC IntQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782234372; x=1782839172; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Tu79wS1tW2o86htP+jh+vF6ThoZY7vyXOnOxpMqA3sM=; b=PRBlCuIhzZ/YoXTu4nWVArao11BeWxkwSz06gypRpHmchw9vWDElJAA7AAfrE0gLJG HJBxVH8Z+AUMDwQP+inoHRxe15pkfD0jIei/I+0cCVp9xAxk1zapuY7zmXicaxAOqR/3 l8qnnF4KLfeSO5QZpehpDGoQyXldun4EGYid1Znb74Qq5uc33A+EoB3nihDr2afyeIkH NwISFi458zjcBRRRNGZzcNC64TSBNPJ4pp9UkpZGxOSXnYmMPveEktFZPvzpcwp3JDTx oL2qM/cE8eY7MzR8fT7wS3mll1XdNAWrq4tkaZ9+WJurV7n8PkMArlcCyslZdDA79O9y C3EA== X-Forwarded-Encrypted: i=1; AHgh+RpvK/qFonDhuqW1Vu2RR7kmztnCFqLv+qWldfyKfMxgxP0Q65gOyvIHwslZLh/7KKixIt9Wq7JeCHXK/2U=@vger.kernel.org X-Gm-Message-State: AOJu0YynaS1g9mUNTLTuFU+XX4haS4H0UUteNmrFSAz8oRb9XNQ4Wkh4 yKRngSZVNLzq8IRsjku7PHkMK30X6QMoXAWK57y7c0jDeGa4WEMqYlC1WMt797wXBA== X-Gm-Gg: AfdE7cku0tSAvx1xBjArkQNGCKMeOytKrZUKNQj5CZLLRsF0etQ1bLEiSmAoMWTP3P1 KXJ9XxQEzipRC8ur/5MPNh9IyjlljYiBZWAAigGDshhStxDlSsfMBvrvtujbOcJhO/fgdB4mezL aveECXVMnP3HNO50UZ743LTnO6DPJxtkfnpM2JcgRkOVp5ac2kx8r8wFgYqg+/JNMfjVOHq/xrr g6qdQ41Rr3Pcpz4W9zISTOc2bhBC5X8jgfolGBwATert4Uw5Dm8mW6KdGiVrCnwXiFusJ/Nf+qr vojfre/Inu8l50i44K+rESwWYAJXJoNEVIq7AzMg2FgyW0dnm25O3qPE8/GwpuD4H/oBahMZW7g AIcnXosk8eTDNnzU+0xo3PWYuKIIuZWTywyN3G21+80Mrj/Mqt1vAfvaUPZD6YerH16L9XMcKUT s4albxWjGADYkFgK8TjpswkRglkcV7tBE0+yZNCtUuJb/l33UWLbH0ALb0yb7wVykwZpYb9lLYs sASpmOA X-Received: by 2002:a17:902:c404:b0:2bf:749:55c with SMTP id d9443c01a7336-2c7c711c2f1mr2378745ad.21.1782234370647; Tue, 23 Jun 2026 10:06:10 -0700 (PDT) Received: from google.com (25.75.145.34.bc.googleusercontent.com. [34.145.75.25]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2c7436af54dsm113990285ad.11.2026.06.23.10.06.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jun 2026 10:06:10 -0700 (PDT) Date: Tue, 23 Jun 2026 17:06:07 +0000 From: Samiullah Khawaja To: David Matlack Cc: kexec@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-pci@vger.kernel.org, Adithya Jayachandran , Alexander Graf , Alex Williamson , Bjorn Helgaas , Chris Li , David Rientjes , Jacob Pan , Jason Gunthorpe , Jonathan Corbet , Josh Hilke , Leon Romanovsky , Lukas Wunner , Mike Rapoport , Parav Pandit , Pasha Tatashin , Pranjal Shrivastava , Pratyush Yadav , Saeed Mahameed , Shuah Khan , Vipin Sharma , William Tu , Yi Liu Subject: Re: [PATCH v6 05/12] PCI: liveupdate: Keep bus numbers constant during Live Update Message-ID: References: <20260522202410.3104264-1-dmatlack@google.com> <20260522202410.3104264-6-dmatlack@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20260522202410.3104264-6-dmatlack@google.com> On Fri, May 22, 2026 at 08:24:03PM +0000, David Matlack wrote: >During a Live Update, preserved devices must be allowed to continue >performing memory transactions so the kernel cannot change the fabric >topology, including bus numbers, since that would require disabling >and flushing any memory transactions first. > >To keep bus numbers constant, always inherit the secondary and >subordinate bus numbers assigned to bridges during scanning, instead of >assigning new ones, if any PCI devices are being preserved. Note that >the kernel inherits bus numbers even on bridges without any downstream >endpoints that were preserved. This avoids accidentally assigning a >bridge a new window that overlaps with a preserved device that is >downstream of a different bridge. > >If a bridge is scanned with a broken topology or has no bus numbers >set during a Live Update, refuse to assign it new bus numbers and refuse >to enumerate devices below it until the Live Update is finished. This is >a safety measure to prevent topology conflicts. > >Require that CONFIG_CARDBUS is not enabled to enable >CONFIG_PCI_LIVEUPDATE since inheriting bus numbers on PCI-to-CardBus >bridges requires additional work but is not a priority at the moment. > >Signed-off-by: David Matlack >--- > .../admin-guide/kernel-parameters.txt | 6 +- > drivers/pci/Kconfig | 2 +- > drivers/pci/liveupdate.c | 83 ++++++++++++++++++- > drivers/pci/liveupdate.h | 14 ++++ > drivers/pci/probe.c | 17 +++- > include/linux/pci_liveupdate.h | 4 + > 6 files changed, 119 insertions(+), 7 deletions(-) > Reviewed-by: Samiullah Khawaja