From: Leon Romanovsky <leon@kernel.org>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Keith Busch <kbusch@kernel.org>, Christoph Hellwig <hch@lst.de>,
Qinyun Tan <qinyuntan@linux.alibaba.com>,
Jens Axboe <axboe@kernel.dk>, Sagi Grimberg <sagi@grimberg.me>,
linux-nvme@lists.infradead.org,
Xunlei Pang <xlpang@linux.alibaba.com>,
Guixin Liu <kanie@linux.alibaba.com>,
oliver.yang@linux.alibaba.com,
Guanghui Feng <guanghuifeng@linux.alibaba.com>,
Bjorn Helgaas <bhelgaas@google.com>,
linux-pci@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>
Subject: Re: [PATCH V1] nvme-pci: disable SR-IOV VFs on driver unbind
Date: Wed, 28 Jan 2026 10:44:32 +0200 [thread overview]
Message-ID: <20260128084432.GA12149@unreal> (raw)
In-Reply-To: <20260127230912.GA385193@bhelgaas>
On Tue, Jan 27, 2026 at 05:09:12PM -0600, Bjorn Helgaas wrote:
> [+cc Jakub, author of 38972375ef7b ("PCI/IOV: Reset total_VFs limit
> after detaching PF driver"), which added the message]
>
> On Tue, Jan 27, 2026 at 08:00:42PM +0200, Leon Romanovsky wrote:
> > On Tue, Jan 27, 2026, at 18:06, Keith Busch wrote:
> > > 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?
> >
> > It is not important, no one complained about it. People who unbind
> > PF, simply ignore this warning.
> >
> > BTW, the use case which I presented is for SR-IOV handled by
> > drivers. Maybe VFs created by NVMe are different here and they must
> > be destroyed.
>
> If it's to be expected, I do think 'info' would be more appropriate,
> if nothing else as an indication to code readers that nothing is
> wrong. Or maybe even no message at all.
The issue is that not all devices are created equal. Some devices from major
vendor rely on messages sent from the VF to the PF, and expect the PF driver
to perform certain configuration steps in response. These devices must disable
SR-IOV when the PF is unbound.
From one side, for users of such hardware, this message is important.
From another, for many other devices, this message is not important.
Like Jakub, I don't have any preference here.
Thanks
next prev parent reply other threads:[~2026-01-28 8:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-27 7:33 [PATCH V1] nvme-pci: disable SR-IOV VFs on driver unbind Qinyun Tan
2026-01-27 8:48 ` Christoph Hellwig
2026-01-27 14:31 ` Leon Romanovsky
2026-01-27 16:06 ` Keith Busch
2026-01-27 18:00 ` Leon Romanovsky
2026-01-27 23:09 ` Bjorn Helgaas
2026-01-27 23:43 ` Jakub Kicinski
2026-01-28 8:44 ` Leon Romanovsky [this message]
2026-01-30 4:53 ` qinyuntan
2026-02-06 22:28 ` Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260128084432.GA12149@unreal \
--to=leon@kernel.org \
--cc=axboe@kernel.dk \
--cc=bhelgaas@google.com \
--cc=guanghuifeng@linux.alibaba.com \
--cc=hch@lst.de \
--cc=helgaas@kernel.org \
--cc=kanie@linux.alibaba.com \
--cc=kbusch@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=oliver.yang@linux.alibaba.com \
--cc=qinyuntan@linux.alibaba.com \
--cc=sagi@grimberg.me \
--cc=xlpang@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox