vhost-net: allow configuring extended features
authorPaolo Abeni <pabeni@redhat.com>
Tue, 8 Jul 2025 15:54:54 +0000 (17:54 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 8 Jul 2025 16:05:23 +0000 (18:05 +0200)
commit333c515d189657c934470c9b0b8a8fedb016ce6f
tree96c3e07a5cbbc9a0be9e105f024d5f88f271bdcc
parent69b9461512246599ed80cf13358e7e6aff7285f9
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>
drivers/vhost/net.c
drivers/vhost/vhost.c
drivers/vhost/vhost.h
include/uapi/linux/vhost.h
include/uapi/linux/vhost_types.h