Re: [PATCH 3/3] vfio: Report PASID capability via VFIO_DEVICE_FEATURE ioctl

Yi Liu
2024-01-15T08:18:09Z

On 2023/12/12 23:27, Jason Gunthorpe wrote:
> On Mon, Dec 11, 2023 at 08:39:46PM -0700, Alex Williamson wrote:
>
>> So how do we keep up with PCIe spec updates relative to the PASID
>> capability with this proposal? Would it make more sense to report the
>> raw capability register and capability version rather that a translated
>> copy thereof? Perhaps just masking the fields we're currently prepared
>> to expose.
>
> I think the VMM must always create a cap based on the PCIe version it
> understands. We don't know what future specs will put there so it
> seems risky to forward it if we don't know that any possible
> hypervisor support is present.

This series parses the capability register and reports the known caps
to user. While this does not include the version number, userspace should
decide the proper version number. Seems like what you suggests here.

>
> We have this problem on and off where stuff in PCI config space needs
> explicit hypervisor support or it doesn't work in the VM and things
> get confusing.
>
> Jason

--
Regards,
Yi Liu