Re: [RFC] Proposal: Add sysfs interface for PCIe TPH Steering Tag retrieval and configuration

fengchengwen
2026-04-15T01:47:52Z

On 4/14/2026 11:11 PM, Jason Gunthorpe wrote:
> On Tue, Apr 14, 2026 at 10:46:00PM +0800, fengchengwen wrote:
>> We have a real platform requirement:
>>
>> * 1. Devices in TPH Device-Specific Mode with no standard ST table
>> * 2. Steering Tags must be obtained from ACPI _DSM (kernel-only)
>> * 3. Devices are fully managed by userspace drivers (VFIO/UIO)
>> * 4. Userspace must program STs into vendor-specific registers
>
> No, this is nonsenscial too.
>
> If you want to control the steering tags for MMIO BAR memory exposed
> by VFIO then the DMABUF mechanism Keith & co has been working on is
> the correct approach.
>
> If the VFIO user needs to control steering tags for the device it is
> directly controling then it must do that through VFIO ioctls.
>
> Nobody messes around with other devices under the covers of the
> operating kernel driver. Stop proposing that.

Understood.

For VFIO-passed devices that are fully under userspace control,
we will implement the TPH Steering Tag query interface
exclusively through VFIO ioctls, not sysfs.

This will allow userspace to query per-CPU Steering Tags
from platform firmware (ACPI _DSM) for the VFIO device,
which is fully under its control.

Thanks

>
> Jason