qemu-e2k/net
Stefano Garzarella 562a7d23bf vhost: mask VIRTIO_F_RING_RESET for vhost and vhost-user devices
Commit 69e1c14aa2 ("virtio: core: vq reset feature negotation support")
enabled VIRTIO_F_RING_RESET by default for all virtio devices.

This feature is not currently emulated by QEMU, so for vhost and
vhost-user devices we need to make sure it is supported by the offloaded
device emulation (in-kernel or in another process).
To do this we need to add VIRTIO_F_RING_RESET to the features bitmap
passed to vhost_get_features(). This way it will be masked if the device
does not support it.

This issue was initially discovered with vhost-vsock and vhost-user-vsock,
and then also tested with vhost-user-rng which confirmed the same issue.
They fail when sending features through VHOST_SET_FEATURES ioctl or
VHOST_USER_SET_FEATURES message, since VIRTIO_F_RING_RESET is negotiated
by the guest (Linux >= v6.0), but not supported by the device.

Fixes: 69e1c14aa2 ("virtio: core: vq reset feature negotation support")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1318
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Message-Id: <20221121101101.29400-1-sgarzare@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Acked-by: Jason Wang <jasowang@redhat.com>
2022-11-22 05:19:00 -05:00
..
can util/log: Remove qemu_log_flush 2022-04-20 10:51:11 -07:00
announce.c include: move C/util-related declarations to cutils.h 2022-04-06 14:31:43 +02:00
checksum.c net/checksum: Remove unused variable in net_checksum_add_iov 2021-07-26 07:06:58 -10:00
clients.h qapi: net: add stream and dgram netdevs 2022-10-28 13:28:52 +08:00
colo-compare.c net/colo: Fix a "double free" crash to clear the conn_list 2022-07-20 16:58:08 +08:00
colo-compare.h Add the function of colo_compare_cleanup 2021-06-11 10:30:13 +08:00
colo.c net/colo.c: Fix the pointer issue reported by Coverity. 2022-09-02 10:22:39 +08:00
colo.h net/colo.c: Fix the pointer issue reported by Coverity. 2022-09-02 10:22:39 +08:00
dgram.c net: dgram: add unix socket 2022-10-28 13:28:52 +08:00
dump.c rtc: Move RTC function prototypes to their own header 2022-01-28 14:29:46 +00:00
eth.c net/eth: Don't consider ESP to be an IPv6 option header 2022-02-14 11:50:44 +08:00
filter-buffer.c netfilter: Use class properties 2020-12-15 10:02:07 -05:00
filter-mirror.c net/filter: Optimize filter_send to coroutine 2022-02-14 11:50:44 +08:00
filter-replay.c hw: Do not include qemu/log.h if it is not necessary 2021-05-02 17:24:50 +02:00
filter-rewriter.c net/colo: Fix a "double free" crash to clear the conn_list 2022-07-20 16:58:08 +08:00
filter.c netfilter: Use class properties 2020-12-15 10:02:07 -05:00
hub.c qapi: net: add stream and dgram netdevs 2022-10-28 13:28:52 +08:00
hub.h
l2tpv3.c net: introduce qemu_set_info_str() function 2022-10-28 13:28:52 +08:00
meson.build qapi: net: add stream and dgram netdevs 2022-10-28 13:28:52 +08:00
net.c qapi: net: add stream and dgram netdevs 2022-10-28 13:28:52 +08:00
netmap.c Do not include sysemu/sysemu.h if it's not really necessary 2021-05-02 17:24:50 +02:00
queue.c net: introduce qemu_receive_packet() 2021-03-15 16:41:22 +08:00
slirp.c net: introduce qemu_set_info_str() function 2022-10-28 13:28:52 +08:00
socket.c net: socket: Don't ignore EINVAL on netdev socket connection 2022-10-28 13:28:52 +08:00
stream.c net: stream: add QAPI events to report connection state 2022-10-28 13:28:52 +08:00
tap_int.h net: Added SetSteeringEBPF method for NetClientState. 2021-06-04 15:25:46 +08:00
tap-bsd.c Replace fcntl(O_NONBLOCK) with g_unix_set_fd_nonblocking() 2022-05-03 15:47:38 +04:00
tap-linux.c Replace fcntl(O_NONBLOCK) with g_unix_set_fd_nonblocking() 2022-05-03 15:47:38 +04:00
tap-linux.h net: Replace TAB indentations with spaces 2022-11-11 09:39:03 +01:00
tap-solaris.c Replace fcntl(O_NONBLOCK) with g_unix_set_fd_nonblocking() 2022-05-03 15:47:38 +04:00
tap-stub.c net: Added SetSteeringEBPF method for NetClientState. 2021-06-04 15:25:46 +08:00
tap-win32.c net: introduce qemu_set_info_str() function 2022-10-28 13:28:52 +08:00
tap.c net: introduce qemu_set_info_str() function 2022-10-28 13:28:52 +08:00
trace-events net/colo.c: Fix the pointer issue reported by Coverity. 2022-09-02 10:22:39 +08:00
trace.h
util.c
util.h Replace config-time define HOST_WORDS_BIGENDIAN 2022-04-06 10:50:37 +02:00
vde.c net: introduce qemu_set_info_str() function 2022-10-28 13:28:52 +08:00
vhost-user-stub.c
vhost-user.c net: introduce qemu_set_info_str() function 2022-10-28 13:28:52 +08:00
vhost-vdpa-stub.c vhost-net-vdpa: add stubs for when no virtio-net device is present 2022-07-20 16:58:08 +08:00
vhost-vdpa.c vhost: mask VIRTIO_F_RING_RESET for vhost and vhost-user devices 2022-11-22 05:19:00 -05:00
vmnet_int.h net/vmnet: implement shared mode (vmnet-shared) 2022-05-17 16:48:23 +08:00
vmnet-bridged.m net/vmnet: implement bridged mode (vmnet-bridged) 2022-05-17 16:48:23 +08:00
vmnet-common.m net/vmnet: implement shared mode (vmnet-shared) 2022-05-17 16:48:23 +08:00
vmnet-host.c net/vmnet: implement host mode (vmnet-host) 2022-05-17 16:48:23 +08:00
vmnet-shared.c net/vmnet: implement shared mode (vmnet-shared) 2022-05-17 16:48:23 +08:00