diff options
| author | Alex Williamson <alex.williamson@nvidia.com> | 2026-03-31 14:24:41 -0600 |
|---|---|---|
| committer | Alex Williamson <alex@shazbot.org> | 2026-04-02 16:35:25 -0600 |
| commit | 7487d8db3336839567aabae24618a4f2f2f2adad (patch) | |
| tree | 5d2391ec57979cec4014500f4bce8e7c0dc71a07 /samples/workqueue/stall_detector/git@git.tavy.me:linux.git | |
| parent | ad6ed97f8c0ffefd9383a62d19a564e8e0a2c814 (diff) | |
vfio/pci: Require vfio_device_ops.name
vfio-pci-core code makes use of the vfio_device_ops.name field in order
to set a default driver_override for VFs created on a user-owned PF.
This avoids default driver matching, which might otherwise bind those
VFs to native drivers.
The mechanism for this currently uses kasprintf(), which will set
driver_override to the literal "(null)" if name is NULL. This is
effective in sequestering the device, but presents a challenging debug
situation to differentiate driver_override being set to "(null)" versus
being NULL and interpreted as "(null)" via the sysfs show attribute.
There's also a tree-wide effort to convert to generic driver_override
support, where passing NULL will generate an error, resulting in a
WARN_ON without setting any driver_override.
All drivers making use of vfio-pci-core already set a driver name,
therefore by requiring this behavior, all of these corner cases are
rendered moot. This is expected to have no impact on current
in-kernel drivers.
Suggested-by: Danilo Krummrich <dakr@kernel.org>
Signed-off-by: Alex Williamson <alex.williamson@nvidia.com>
Reviewed-by: Danilo Krummrich <dakr@kernel.org>
Link: https://lore.kernel.org/r/20260331202443.2598404-1-alex.williamson@nvidia.com
Signed-off-by: Alex Williamson <alex@shazbot.org>
Diffstat (limited to 'samples/workqueue/stall_detector/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
