linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Niklas Schnelle <schnelle@linux.ibm.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	Jan Kiszka <jan.kiszka@siemens.com>,
	Matthew Rosato <mjrosato@linux.ibm.com>,
	Pierre Morel <pmorel@linux.ibm.com>,
	linux-s390@vger.kernel.org, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 0/5] PCI: Rework pci_scan_slot() and isolated PCI functions
Date: Fri, 22 Jul 2022 16:07:33 -0500	[thread overview]
Message-ID: <20220722210733.GA1935162@bhelgaas> (raw)
In-Reply-To: <20220628143100.3228092-1-schnelle@linux.ibm.com>

On Tue, Jun 28, 2022 at 04:30:55PM +0200, Niklas Schnelle wrote:
> Hi Bjorn,
> 
> In an earlier version[0], I sought to apply the existing jailhouse special case
> for isolated PCI functions to s390. As Bjorn noted in[1] there appears to be
> some potential for cleaning things up and removing duplication.
> 
> This series attempts to do this cleanup (Patches 1 through 3) followed by enabling
> isolated PCI functions for s390 (Patches 4 and 5).
> 
> Testing:
> - On s390 with SR-IOV and a ConnectX NIC with PF 1 but not PF 0 passed throug
>   i.e. the isolated function case. Also of course with just VFs and an NVMe.
> - On x86_64 on a desktop system where ARI is disabled and with an SR-IOV NIC
>   with non-contiguous VFs as well as the usual other PCI devices.
> 
> Thanks,
> Niklas
> 
> [0] https://lore.kernel.org/linux-pci/20220404095346.2324666-1-schnelle@linux.ibm.com/
> [1] https://lore.kernel.org/linux-pci/20220408224514.GA353445@bhelgaas/
> 
> Changes v5 -> v6:
> - Added a patch (2) which separates the ARI case into its own function
> - Some whitespace changes to remove unnecesssary empty lines
> Changes v4 -> v5:
> - Remove unintended whitespace change in patch 1
> Changes v3 -> v4:
> - Use a do {} while loop in pci_scan_slot() as it is simpler (Bjorn)
> - Explicitly check "fn == 0" as it is not a pointer or bool (Bjorn)
> - Keep the "!dev" check in the ARI branch of next_fn() (Bjorn)
> - Moved the "fn == 0 && !dev" condition out of next_fn() into pci_scan_slot().
>   This allows us to keep the "!dev" case in the ARI branch and means there are
>   no new conditions in next_fn() making it easier to verify that its behavior
>   is equivalent to the existing code.
> - Guard the assignment of dev->multifunction with "fn > 0"
>   instead of "nr > 0". This matches the existing logic more closely and works
>   for the jailhouse case which unconditionally sets dev->multifunction for
>   "fn > 0". This also means fn == 0 is the single "first iteration" test.
> - Remove some unneeded whitespace in patch 2
> 
> Changes v2 -> v3:
> - Removed now unused nr_devs variable (kernel test robot)
> 
> Niklas Schnelle (5):
>   PCI: Clean up pci_scan_slot()
>   PCI: Split out next_ari_fn() from next_fn()
>   PCI: Move jailhouse's isolated function handling to pci_scan_slot()
>   PCI: Extend isolated function probing to s390
>   s390/pci: allow zPCI zbus without a function zero
> 
>  arch/s390/pci/pci_bus.c    | 82 +++++++++---------------------------
>  drivers/pci/probe.c        | 86 ++++++++++++++++++--------------------
>  include/linux/hypervisor.h |  8 ++++
>  3 files changed, 68 insertions(+), 108 deletions(-)

Applied to pci/enumeration for v5.20, thanks!

      parent reply	other threads:[~2022-07-22 21:07 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-28 14:30 [PATCH v6 0/5] PCI: Rework pci_scan_slot() and isolated PCI functions Niklas Schnelle
2022-06-28 14:30 ` [PATCH v6 1/5] PCI: Clean up pci_scan_slot() Niklas Schnelle
2022-06-30 12:40   ` Pierre Morel
2022-06-30 13:48     ` Niklas Schnelle
2022-06-30 14:50       ` Pierre Morel
2022-07-11  8:52         ` Niklas Schnelle
2022-06-28 14:30 ` [PATCH v6 2/5] PCI: Split out next_ari_fn() from next_fn() Niklas Schnelle
2022-06-30 12:44   ` Pierre Morel
2022-06-28 14:30 ` [PATCH v6 3/5] PCI: Move jailhouse's isolated function handling to pci_scan_slot() Niklas Schnelle
2022-06-30 12:47   ` Pierre Morel
2022-06-28 14:30 ` [PATCH v6 4/5] PCI: Extend isolated function probing to s390 Niklas Schnelle
2022-06-30 12:45   ` Pierre Morel
2022-07-01 14:42     ` Niklas Schnelle
2022-07-22 21:13   ` Bjorn Helgaas
2022-06-28 14:31 ` [PATCH v6 5/5] s390/pci: allow zPCI zbus without a function zero Niklas Schnelle
2022-06-30 12:53   ` Pierre Morel
2022-07-22 21:07 ` Bjorn Helgaas [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220722210733.GA1935162@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=jan.kiszka@siemens.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=mjrosato@linux.ibm.com \
    --cc=pmorel@linux.ibm.com \
    --cc=schnelle@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).