Re: [RFC PATCH 5/5] vfio/pci: Use pci_reset_supported() in place of reset_works
| Newsgroups | org.kernel.vger.linux-pci,org.kernel.vger.kvm |
|---|---|
| Message-ID | <[email protected]> |
> vfio-pci latches whether pci_reset_function() works at open device and > makes decisions based on this latched value at runtime. With the > introduction of the reset_method pci-sysfs attribute, this flag can > be made stale at runtime by administrative action. Further, with the > SR-IOV active VFs gating of pci_reset_function(), the flag can be made > stale via more subtle dependencies. > > Drop the latched flag and rely on pci_reset_supported() to indicate > whether reset methods exist for the device. This is no guarantee that > those reset methods work, nor has the RESET flag in struct > vfio_device_info ever been a guarantee of VFIO_DEVICE_RESET success. > It's only a guarantee that there are reset methods that are > applicable to the device at the instant it's called. > > Assisted-by: Claude:claude-opus-4-8 > Signed-off-by: Alex Williamson <[email protected]> Sashiko has reviewed this patch and found no issues. It looks great! -- Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=5