linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 0/2] Enable PF-VF linking with pdev->no_vf_scan (s390)
@ 2020-05-06 15:41 Niklas Schnelle
  2020-05-06 15:41 ` [RFC 1/2] PCI/IOV: Introduce pci_iov_sysfs_link() function Niklas Schnelle
  2020-05-06 15:41 ` [RFC 2/2] s390/pci: create links between PFs and VFs Niklas Schnelle
  0 siblings, 2 replies; 7+ messages in thread
From: Niklas Schnelle @ 2020-05-06 15:41 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: linux-pci, linux-kernel, Pierre Morel, Peter Oberparleiter

Hello Kernel Hackers,

the following series enables PF-VF linking for architectures using the
pdev->no_vf_scan flag (currently just s390). This includes kernel internal
linking with pdev->physfn as well as creation of the relevant sysfs links.
The former are required for example by libvirt to manage VFs.

The series consists of two patches against the featuress branch of
git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git

- PCI/IOV: Introduce pci_iov_sysfs_link() function

This patch factors the sysfs link creation out of pci_iov_add_virtfn() and
into a new pci_iov_sysfs_link() function. On its own it also applies
cleanly on v5.7-rc4.
 
- s390/pci: create links between PFs and VFs

This patch makes use of the pci_iov_sysfs_link() function introduced in the
first patch to create the sysfs PF-VF links. It exploits recent work for
multi-function support on s390 that gives us the real devfnto identify the
parent PF of a given VF.
Apart from these s390 specific support contained within arch/s390/ it also
removes the fencing off of pci_iov_remove_virtfn() by the pdev->no_vf_scan
flag making use of the common code path for clean VF removal.
While this is common code s390 is currently the only case where
pdev->no_vf_scan is true I can of course split this into a separate patch
if requested but wanted to keep this together for the discussion.

Best regards and your feedback is welcome,
Niklas Schnelle

Niklas Schnelle (2):
  PCI/IOV: Introduce pci_iov_sysfs_link() function
  s390/pci: create links between PFs and VFs

 arch/s390/include/asm/pci.h     |  3 +-
 arch/s390/include/asm/pci_clp.h |  3 +-
 arch/s390/pci/pci_bus.c         | 69 ++++++++++++++++++++++++++++++++-
 arch/s390/pci/pci_clp.c         |  1 +
 drivers/pci/iov.c               | 39 ++++++++++++-------
 include/linux/pci.h             |  8 ++++
 6 files changed, 105 insertions(+), 18 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-05-07 15:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-06 15:41 [RFC 0/2] Enable PF-VF linking with pdev->no_vf_scan (s390) Niklas Schnelle
2020-05-06 15:41 ` [RFC 1/2] PCI/IOV: Introduce pci_iov_sysfs_link() function Niklas Schnelle
2020-05-06 21:10   ` Bjorn Helgaas
2020-05-07  7:48     ` Niklas Schnelle
2020-05-07 15:51       ` Bjorn Helgaas
2020-05-06 15:41 ` [RFC 2/2] s390/pci: create links between PFs and VFs Niklas Schnelle
2020-05-06 21:12   ` Bjorn Helgaas

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).