From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com ([209.132.183.28]:56110 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754628AbeFRVzG (ORCPT ); Mon, 18 Jun 2018 17:55:06 -0400 Date: Mon, 18 Jun 2018 15:55:04 -0600 From: Alex Williamson To: Logan Gunthorpe Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-doc@vger.kernel.org, Stephen Bates , Christoph Hellwig , Bjorn Helgaas , Jonathan Corbet , Ingo Molnar , Thomas Gleixner , "Paul E. McKenney" , Marc Zyngier , Kai-Heng Feng , Frederic Weisbecker , Dan Williams , =?UTF-8?B?SsOpcsO0bWU=?= Glisse , Benjamin Herrenschmidt , Christian =?UTF-8?B?S8O2bmln?= Subject: Re: [PATCH v3 2/3] PCI: Allow specifying devices using a base bus and path of devfns Message-ID: <20180618155504.68e56358@t450s.home> In-Reply-To: <20180618193636.16210-3-logang@deltatee.com> References: <20180618193636.16210-1-logang@deltatee.com> <20180618193636.16210-3-logang@deltatee.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-pci-owner@vger.kernel.org List-ID: On Mon, 18 Jun 2018 13:36:35 -0600 Logan Gunthorpe wrote: > When specifying PCI devices on the kernel command line using a > BDF, the bus numbers can change when adding or replacing a device, > changing motherboard firmware, or applying kernel parameters like > pci=assign-buses. When this happens, it is usually undesirable to > apply whatever command line tweak to the wrong device. > > Therefore, it is useful to be able to specify devices with a base > bus number and the path of devfns needed to get to it. (Similar to > the "device scope" structure in the Intel VT-d spec, Section 8.3.1.) > > Thus, we add an option to specify devices in the following format: > > [:]:.[/.][/ ...] > > The path can be any segment within the PCI hierarchy of any length and > determined through the use of 'lspci -t'. When specified this way, it is > less likely that a renumbered bus will result in a valid device specification > and the tweak won't be applied to the wrong device. > > Signed-off-by: Logan Gunthorpe > Reviewed-by: Stephen Bates > Acked-by: Christian König > --- > Documentation/admin-guide/kernel-parameters.txt | 8 +- > drivers/pci/pci.c | 120 ++++++++++++++++++++---- > 2 files changed, 106 insertions(+), 22 deletions(-) Reviewed-by: Alex Williamson