virtio: introduce extended features
authorPaolo Abeni <pabeni@redhat.com>
Tue, 8 Jul 2025 15:54:49 +0000 (17:54 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 8 Jul 2025 16:04:58 +0000 (18:04 +0200)
commite7d4c1c5a54648fd5b787a4a0f81521ec7260bcd
treeb6b1fe91f50795c996ae6716a519a6015206a298
parenteade9f57ca7245cc59072706f0f1fdbc446fda61
virtio: introduce extended features

The virtio specifications allows for up to 128 bits for the
device features. Soon we are going to use some of the 'extended'
bits features (above 64) for the virtio_net driver.

Introduce extended features as a fixed size array of u64. To minimize
the diffstat allows legacy driver to access the low 64 bits via a
transparent union.

Introduce an extended get_extended_features configuration callback
that devices supporting the extended features range must implement in
place of the traditional one.

Note that legacy and transport features don't need any change, as
they are always in the low 64 bit range.

Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/virtio/virtio.c
drivers/virtio/virtio_debug.c
include/linux/virtio.h
include/linux/virtio_config.h
include/linux/virtio_features.h [new file with mode: 0644]