From: Jason Gunthorpe <jgg@ziepe.ca>
To: Alex Williamson <alex.williamson@nvidia.com>
Cc: Samiullah Khawaja <skhawaja@google.com>,
kvm <kvm@vger.kernel.org>, Alex Williamson <alex@shazbot.org>,
Bjorn Helgaas <bhelgaas@google.com>,
Kevin Tian <kevin.tian@intel.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-pci <linux-pci@vger.kernel.org>
Subject: Re: [RFC PATCH 1/5] PCI: Refuse function reset of an SR-IOV PF with enabled VFs
Date: Mon, 17 Aug 2026 09:18:10 -0300 [thread overview]
Message-ID: <20260817121810.GC933791@ziepe.ca> (raw)
In-Reply-To: <20260814083737.66bb83fb@nvidia.com>
On Fri, Aug 14, 2026 at 08:37:37AM -0600, Alex Williamson wrote:
> Devices are only ever opened into a user owned domain, the IOMMU
> context switch happens before this and regardless of the reset. Close
> also disables bus-master regardless of reset, so there's no risk of
> ongoing DMA if the device is placed into an identity domain between
> close and re-open.
I've been told by HW people that bus-master isn't actually a strong
fence for stopping DMA on most real HW. More of a 'dma will eventually
stop' kind of thing.
It does reliably prevent DMA during the post-FLR phase only.
If the device hasn't been reset it should be kept on a blocking
domain.
> PF, I think there are arguments both that the user implicitly opted in
> to the best-effort reset, as well as a use case that allows the PF
> driver to fail and re-open the PF demands this behavior.
I really think we cannot alow a device to be returned back to the
kernel without a reset. VFIO should be keeping things attached to a
blocking domain as long as the driver is bound. It should force a
reset during unbinding as well if the device FD was ever closed
without a reset..
Jason
next prev parent reply other threads:[~2026-08-17 12:18 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-12 4:53 [RFC PATCH 0/5] PCI/vfio-pci: Guard resets against active SR-IOV VFs Alex Williamson
2026-08-12 4:53 ` [RFC PATCH 1/5] PCI: Refuse function reset of an SR-IOV PF with enabled VFs Alex Williamson
2026-08-12 5:01 ` sashiko-bot
2026-08-13 23:22 ` Samiullah Khawaja
2026-08-14 14:37 ` Alex Williamson
2026-08-14 15:54 ` Samiullah Khawaja
2026-08-17 12:18 ` Jason Gunthorpe [this message]
2026-08-12 4:53 ` [RFC PATCH 2/5] PCI: Add pci_reset_bus_cond() for a caller-gated slot or bus reset Alex Williamson
2026-08-12 5:00 ` sashiko-bot
2026-08-12 4:53 ` [RFC PATCH 3/5] vfio/pci: Refuse to reset an SR-IOV PF with enabled VFs Alex Williamson
2026-08-12 5:02 ` sashiko-bot
2026-08-12 4:53 ` [RFC PATCH 4/5] PCI: Export pci_reset_supported() Alex Williamson
2026-08-12 4:59 ` sashiko-bot
2026-08-12 4:53 ` [RFC PATCH 5/5] vfio/pci: Use pci_reset_supported() in place of reset_works Alex Williamson
2026-08-12 4:59 ` sashiko-bot
2026-08-12 21:45 ` [RFC PATCH 0/5] PCI/vfio-pci: Guard resets against active SR-IOV VFs Bjorn Helgaas
2026-08-12 22:53 ` Alex Williamson
2026-08-17 20:23 ` Tony Nguyen
2026-08-13 22:30 ` Samiullah Khawaja
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=20260817121810.GC933791@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=alex.williamson@nvidia.com \
--cc=alex@shazbot.org \
--cc=bhelgaas@google.com \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=skhawaja@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.