Skip to content

Fix PF/VF dependency issue

Bjorn Helgaas linux-pci lkml 1 version Applied

Status from this message: Applied to pci/virtualization for v5.5.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v8 Latest5 patches 1 replyApplied

Changes in v8 from the cover letter

* Moved PRI & PASID capability offset caching to last since they're just optimizations
* Cached offsets at first use instead of adding _init() functions
* Dropped complicated pci_prg_resp_pasid_required() #ifdefs by just searching for the capability again
* Dropped EA/VF validation since it only enforces spec language without fixing any known issues

Patches in v8 Applied

#Subject and filesSizeRepliesApplied
1/5PCI/ATS: Handle sharing of PF PRI Capability with all VFsdrivers/pci/ats.c+24 -00 replies
2/5PCI/ATS: Handle sharing of PF PASID Capability with all VFsdrivers/pci/ats.c+23 -00 replies
3/5PCI/ATS: Disable PF/VF ATS service independentlydrivers/pci/ats.c include/linux/pci.h+0 -120 replies
4/5PCI/ATS: Cache PRI Capability offsetdrivers/pci/ats.c include/linux/pci.h+27 -260 replies
5/5PCI/ATS: Cache PASID Capability offsetdrivers/pci/ats.c include/linux/pci.h+22 -220 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v8 yet.

Read the v8 thread

Cover letter [PATCH v8 0/5] Fix PF/VF dependency issue

From: Bjorn Helgaas <[email protected]>

The current implementation of ATS, PASID, and PRI does not handle VF dependencies correctly. These are essentially Kuppuswamy's patches; I reordered and tweaked them slightly.

Please treat this as a proposal, not a done deal, and post a v9 with any changes needed.

Changes since v7:
* Moved PRI & PASID capability offset caching to last since they're just optimizations
* Cached offsets at first use instead of adding _init() functions
* Dropped complicated pci_prg_resp_pasid_required() #ifdefs by just searching for the capability again
* Dropped EA/VF validation since it only enforces spec language without fixing any known issues

Changes since v6:
* Removed locking interfaces used in v6.
* Made necessary changes to PRI/PASID enable/disable calls to allow register changes only for PF.

Changes since v5:
* Created new patches for PRI/PASID capability caching.
* Removed individual locks (pri_lock, pasid_lock) and added common resource lock to synchronize PRI/PASID updates between PF/VF.
* Addressed comments from Bjorn Helgaas.

Changes since v4:
* Defined empty functions for pci_pri_init() and pci_pasid_init() for cases where CONFIG_PCI_PRI and CONFIG_PCI_PASID are not enabled.

Changes since v3:
* Fixed critical path (lock context) in pci_restore_*_state functions.

Changes since v2:
* Added locking mechanism to synchronize accessing PF registers in VF.
* Removed spec compliance checks in patches.
* Addressed comments from Bjorn Helgaas.

Changes since v1:
* Added more details about the patches in commit log.
* Removed bulk spec check patch.
* Addressed comments from Bjorn Helgaas.

Kuppuswamy Sathyanarayanan (5):
PCI/ATS: Handle sharing of PF PRI Capability with all VFs PCI/ATS: Handle sharing of PF PASID Capability with all VFs PCI/ATS: Disable PF/VF ATS service independently PCI/ATS: Cache PRI Capability offset
PCI/ATS: Cache PASID Capability offset

 drivers/pci/ats.c   | 153 +++++++++++++++++++++++++++-----------------
 include/linux/pci.h |   3 +-
 2 files changed, 96 insertions(+), 60 deletions(-)
Signature · 1 line
2.23.0.187.g17f5b7556c-goog