Skip to content

RFC Enable PF-VF linking with pdev->no_vf_scan (s390)

Niklas Schnelle linux-pci lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2PCI/IOV: Introduce pci_iov_sysfs_link() functiondrivers/pci/iov.c include/linux/pci.h+32 -123 replies
2/2s390/pci: create links between PFs and VFsarch/s390/include/asm/pci.h arch/s390/include/asm/pci_clp.h arch/s390/pci/pci_bus.c +2 more+73 -61 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchBjorn Helgaas
1/2A-b
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC 0/2] Enable PF-VF linking with pdev->no_vf_scan (s390)

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(-)
Signature · 1 line
2.17.1