From: fengchengwen <fengchengwen@huawei.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: <alex@shazbot.org>, <jgg@ziepe.ca>, <wathsala.vithanage@arm.com>,
<helgaas@kernel.org>, <wangzhou1@hisilicon.com>,
<wangyushan12@huawei.com>, <liuyonglong@huawei.com>,
<kvm@vger.kernel.org>, <linux-pci@vger.kernel.org>
Subject: Re: [PATCH v3 0/5] vfio/pci: Add PCIe TPH support
Date: Fri, 24 Apr 2026 09:25:54 +0800 [thread overview]
Message-ID: <486a8633-437d-42d1-85f9-690a9df311eb@huawei.com> (raw)
In-Reply-To: <20260423145915.GG172828@unreal>
On 4/23/2026 10:59 PM, Leon Romanovsky wrote:
> On Thu, Apr 23, 2026 at 09:08:46AM +0800, Chengwen Feng wrote:
>> 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. Also add module parameter enable_unsafe_tph_ds to
>> guard unsafe usage of TPH Device-Specific mode with no ST table.
>> - Patch 3: Add TPH enable/disable with mode selection. Restrict
>> unsafe Device-Specific mode without ST table to be allowed only
>> when the module parameter is enabled.
>> - Patch 4: Add interface to batch get per-CPU steering tags for
>> device-specific mode without standard ST table. This interface
>> is only available when the unsafe module parameter is enabled.
>> - 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.
>>
>> To avoid potential security risks in virtualization environments,
>> TPH Device-Specific mode without a standard ST table is blocked
>> by default. It can only be enabled by administrators via the
>> enable_unsafe_tph_ds module parameter for trusted bare-metal
>> userspace.
>>
>> This series addresses the TPH management requirements discussed
>> in the RFC "Proposal: Add sysfs interface for PCIe TPH Steering
>> Tag retrieval and configuration".
>
> As in the RFC, this patch series still lacks an explanation of *why* it is
> needed. Please describe the scenario that cannot be handled without these
> changes.
Thanks for your review. To clarify the necessity in two clear layers:
1. Why userspace needs the capability to control steering tags:
When PCIe devices are fully taken over by userspace workloads like DPDK
and SPDK, only userspace understands core binding policies and traffic
distribution. Without this series, userspace cannot enable TPH or
configure steering tags, leaving built-in PCIe performance optimizations
unused for high-throughput polling I/O scenarios.
2. Why the interface must be implemented inside VFIO:
VFIO is the only mainstream and secure community solution for passing
complete PCIe device ownership to userspace. Existing kernel TPH
interfaces are designed exclusively for in-kernel drivers, so VFIO
provides the only correct, isolated path to expose per-device TPH
management for user-owned devices.
Thanks
>
> Thanks
next prev parent reply other threads:[~2026-04-24 1:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-23 1:08 [PATCH v3 0/5] vfio/pci: Add PCIe TPH support Chengwen Feng
2026-04-23 1:08 ` [PATCH v3 1/5] PCI/TPH: Export pcie_tph_get_st_modes() for external use Chengwen Feng
2026-04-23 1:08 ` [PATCH v3 2/5] vfio/pci: Add PCIe TPH interface with capability query Chengwen Feng
2026-04-23 1:08 ` [PATCH v3 3/5] vfio/pci: Add PCIe TPH enable/disable support Chengwen Feng
2026-04-23 1:08 ` [PATCH v3 4/5] vfio/pci: Add PCIe TPH GET_ST interface Chengwen Feng
2026-04-23 1:08 ` [PATCH v3 5/5] vfio/pci: Add PCIe TPH SET_ST interface Chengwen Feng
2026-04-23 14:59 ` [PATCH v3 0/5] vfio/pci: Add PCIe TPH support Leon Romanovsky
2026-04-24 1:25 ` fengchengwen [this message]
2026-04-24 22:30 ` Jason Gunthorpe
2026-04-30 3:56 ` fengchengwen
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=486a8633-437d-42d1-85f9-690a9df311eb@huawei.com \
--to=fengchengwen@huawei.com \
--cc=alex@shazbot.org \
--cc=helgaas@kernel.org \
--cc=jgg@ziepe.ca \
--cc=kvm@vger.kernel.org \
--cc=leon@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=liuyonglong@huawei.com \
--cc=wangyushan12@huawei.com \
--cc=wangzhou1@hisilicon.com \
--cc=wathsala.vithanage@arm.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