diff options
| author | Faraz Vahedi <kfv@kfv.io> | 2026-07-09 20:01:44 +0000 |
|---|---|---|
| committer | Enji Cooper <ngie@FreeBSD.org> | 2026-07-15 06:57:40 +0000 |
| commit | 8bdc312dac550c292c58a6a3243b08bc8c944b74 (patch) | |
| tree | 01ecf27771d2c59ef515bbbcc37a91fd66833a94 | |
| parent | 5d0488b29dc5b3e8201d04cf7a015dce9e774d5d (diff) | |
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 <kfv@kfv.io>
Reviewed-by: ngie
Pull-Request: https://github.com/freebsd/freebsd-src/pull/2319
| -rw-r--r-- | sys/dev/virtio/pci/virtio_pci_modern.c | 8 |
1 files changed, 8 insertions, 0 deletions
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); |
