public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 RESEND 0/5] vfio/pci: Add PCIe TPH support
@ 2026-04-16  9:30 Chengwen Feng
  2026-04-16  9:30 ` [PATCH v2 RESEND 1/5] pci/tph: Export pcie_tph_get_st_modes() for external use Chengwen Feng
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Chengwen Feng @ 2026-04-16  9:30 UTC (permalink / raw)
  To: alex, jgg
  Cc: wathsala.vithanage, wangzhou1, wangyushan12, liuyonglong, kvm,
	linux-pci

This series adds support for PCIe TLP Processing Hints (TPH) to
vfio-pci, allowing userspace to manage device steering tags for
improved performance and QoS in virtualized deployments.

The implementation follows a clean incremental structure:
- Patch 1: Export pcie_tph_get_st_modes()
- Patch 2: Introduce UAPI ABI and implement capability query to
  let userspace discover supported TPH modes, ST table presence
  and size.
- Patch 3: Add TPH enable/disable with mode selection.
- Patch 4: Add interface to batch get per-CPU steering tags for
  device-specific mode without standard ST table.
- Patch 5: Add interface to batch program steering tag table
  entries for standard TPH modes.

All user API definitions are finalized in the first patch and
remain stable across the series. The design follows existing
VFIO conventions and relies on kernel pcie-tph infrastructure.

This series addresses the TPH management requirements discussed
in the RFC "Proposal: Add sysfs interface for PCIe TPH Steering
Tag retrieval and configuration".

Instead of introducing a sysfs interface, we choose to implement
TPH management via a VFIO-specific ioctl for these reasons:
1. VFIO is the standard userspace interface for PCI devices.
2. An ioctl approach provides better type safety, batch support
   and stable ABI compared to sysfs for configuration.
3. VFIO properly isolates TPH operations to the assigned device,
   avoiding conflicts with other kernel management paths.

Based on earlier RFC work by Wathsala Vithanage.

v2:
- Export pcie_tph_get_st_modes()
- Add detailed comment for UAPI structures and operations
- Add batch entry limit VFIO_TPH_MAX_ENTRIES
- Improve robustness and error handling

Chengwen Feng (5):
  pci/tph: Export pcie_tph_get_st_modes() for external use
  vfio/pci: Add PCIe TPH interface with capability query
  vfio/pci: Add PCIe TPH enable/disable support
  vfio/pci: Add PCIe TPH GET_ST interface
  vfio/pci: Add PCIe TPH SET_ST interface

 drivers/pci/tph.c                |  13 +-
 drivers/vfio/pci/vfio_pci_core.c | 213 +++++++++++++++++++++++++++++++
 include/linux/pci-tph.h          |   7 +
 include/uapi/linux/vfio.h        | 131 +++++++++++++++++++
 4 files changed, 362 insertions(+), 2 deletions(-)

-- 
2.17.1


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

end of thread, other threads:[~2026-04-17  2:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-16  9:30 [PATCH v2 RESEND 0/5] vfio/pci: Add PCIe TPH support Chengwen Feng
2026-04-16  9:30 ` [PATCH v2 RESEND 1/5] pci/tph: Export pcie_tph_get_st_modes() for external use Chengwen Feng
2026-04-16 20:49   ` Bjorn Helgaas
2026-04-17  2:50     ` fengchengwen
2026-04-16  9:30 ` [PATCH v2 RESEND 2/5] vfio/pci: Add PCIe TPH interface with capability query Chengwen Feng
2026-04-16  9:30 ` [PATCH v2 RESEND 3/5] vfio/pci: Add PCIe TPH enable/disable support Chengwen Feng
2026-04-16  9:30 ` [PATCH v2 RESEND 4/5] vfio/pci: Add PCIe TPH GET_ST interface Chengwen Feng
2026-04-16  9:30 ` [PATCH v2 RESEND 5/5] vfio/pci: Add PCIe TPH SET_ST interface Chengwen Feng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox