summaryrefslogtreecommitdiff
path: root/drivers/vhost/vhost.c
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2025-07-08 17:54:54 +0200
committerPaolo Abeni <pabeni@redhat.com>2025-07-08 18:05:23 +0200
commit333c515d189657c934470c9b0b8a8fedb016ce6f (patch)
tree96c3e07a5cbbc9a0be9e105f024d5f88f271bdcc /drivers/vhost/vhost.c
parent69b9461512246599ed80cf13358e7e6aff7285f9 (diff)
downloadlinux-333c515d189657c934470c9b0b8a8fedb016ce6f.tar.gz
linux-333c515d189657c934470c9b0b8a8fedb016ce6f.tar.bz2
linux-333c515d189657c934470c9b0b8a8fedb016ce6f.zip
vhost-net: allow configuring extended features
Use the extended feature type for 'acked_features' and implement two new ioctls operation allowing the user-space to set/query an unbounded amount of features. The actual number of processed features is limited by VIRTIO_FEATURES_MAX and attempts to set features above such limit fail with EOPNOTSUPP. Note that: the legacy ioctls implicitly truncate the negotiated features to the lower 64 bits range and the 'acked_backend_features' field don't need conversion, as the only negotiated feature there is in the low 64 bit range. Acked-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers/vhost/vhost.c')
-rw-r--r--drivers/vhost/vhost.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 3a5ebb973dba..1094256a943c 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -372,7 +372,7 @@ static void vhost_vq_reset(struct vhost_dev *dev,
vq->log_used = false;
vq->log_addr = -1ull;
vq->private_data = NULL;
- vq->acked_features = 0;
+ virtio_features_zero(vq->acked_features_array);
vq->acked_backend_features = 0;
vq->log_base = NULL;
vq->error_ctx = NULL;