RE: [RFC PATCH] vfio/pci: add PCIe TPH to device feature ioctl
From: Wathsala Wathawana Vithanage
Date: Tue Apr 01 2025 - 19:39:30 EST
> -----Original Message-----
> From: Jason Gunthorpe <jgg@xxxxxxxx>
> Sent: Tuesday, April 1, 2025 9:12 AM
> To: Tian, Kevin <kevin.tian@xxxxxxxxx>
> Cc: Wathsala Wathawana Vithanage <wathsala.vithanage@xxxxxxx>; Alex
> Williamson <alex.williamson@xxxxxxxxxx>; linux-kernel@xxxxxxxxxxxxxxx; nd
> <nd@xxxxxxx>; Philipp Stanner <pstanner@xxxxxxxxxx>; Yunxiang Li
> <Yunxiang.Li@xxxxxxx>; Dr. David Alan Gilbert <linux@xxxxxxxxxxx>; Ankit
> Agrawal <ankita@xxxxxxxxxx>; open list:VFIO DRIVER <kvm@xxxxxxxxxxxxxxx>;
> Dhruv Tripathi <Dhruv.Tripathi@xxxxxxx>; Honnappa Nagarahalli
> <Honnappa.Nagarahalli@xxxxxxx>; Jeremy Linton <Jeremy.Linton@xxxxxxx>
> Subject: Re: [RFC PATCH] vfio/pci: add PCIe TPH to device feature ioctl
>
> On Wed, Mar 12, 2025 at 07:53:17AM +0000, Tian, Kevin wrote:
>
> > Probably we should not allow device-specific mode unless the user is
> > capable of CAP_SYS_RAWIO? It allows an user to pollute caches on CPUs
> > which its processes are not affined to, hence could easily break SLAs
> > which CSPs try to achieve...
>
> I'm not sure this is within the threat model for VFIO though..
>
> qemu or the operator needs to deal with this by not permiting such HW to go into
> a VM.
>
> Really we can't block device specific mode anyhow because we can't even
> discover it on the kernel side..
>
We cannot block users from writing a steering-tag to a device specific location, but
can we use a capability to prevent users from enabling device specific mode on the device?