The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=8bdc312dac550c292c58a6a3243b08bc8c944b74
commit 8bdc312dac550c292c58a6a3243b08bc8c944b74 Author: Faraz Vahedi <[email protected]> AuthorDate: 2026-07-09 20:01:44 +0000 Commit: Enji Cooper <[email protected]> CommitDate: 2026-07-15 06:57:40 +0000 virtio: Accept VIRTIO_F_RING_RESET in the modern PCI transport Accept per-virtqueue reset when the device offers it, alongside the V1 flag. Negotiating the feature merely permits the use of per-virtqueue reset and imposes no obligation on a driver that never uses it, while refusing capability-only transport features can make strict devices reject the feature set altogether. No functional change on hosts that do not offer RING_RESET. Signed-off-by: Faraz Vahedi <[email protected]> Reviewed-by: ngie Pull-Request: https://github.com/freebsd/freebsd-src/pull/2319 --- sys/dev/virtio/pci/virtio_pci_modern.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/dev/virtio/pci/virtio_pci_modern.c b/sys/dev/virtio/pci/virtio_pci_modern.c index 4a4fedeb194d..6732f9ee610f 100644 --- a/sys/dev/virtio/pci/virtio_pci_modern.c +++ b/sys/dev/virtio/pci/virtio_pci_modern.c @@ -441,6 +441,14 @@ vtpci_modern_negotiate_features(device_t dev, uint64_t child_features) */ child_features |= VIRTIO_F_VERSION_1; + /* + * Accept per-virtqueue reset if the device offers it: negotiating + * the feature carries no obligation for a driver that never uses + * it, while declining capability-only transport features can make + * strict devices refuse the entire feature set. + */ + child_features |= host_features & VIRTIO_F_RING_RESET; + features = vtpci_negotiate_features(&sc->vtpci_common, child_features, host_features); vtpci_modern_write_features(sc, features);
