[PATCH V1] nvme-pci: disable SR-IOV VFs on driver unbind
Keith Busch
kbusch at kernel.org
Tue Jan 27 08:06:55 PST 2026
On Tue, Jan 27, 2026 at 04:31:43PM +0200, Leon Romanovsky wrote:
> On Tue, Jan 27, 2026 at 09:48:07AM +0100, Christoph Hellwig wrote:
> > On Tue, Jan 27, 2026 at 03:33:44PM +0800, Qinyun Tan wrote:
> > > The NVMe PCI driver exports the sriov_configure callback via
> > > pci_sriov_configure_simple(), which allows userspace to enable SR-IOV
> > > VFs through sysfs. However, when the PF driver is unbound, the driver
> > > does not disable SR-IOV, leaving VFs orphaned in the system.
> >
> > That sounds dangerous.
>
> It is not. In a real SR-IOV device, VFs are created by the hardware and
> are independent of their PF. There are several use cases where an
> operator unbinds the PF and reuses it to improve overall device
> utilization.
If this is expected, should the warn message "driver left SR-IOV enabled
after remove" be downgraded to 'info' level?
More information about the Linux-nvme
mailing list