vhost-vdpa: don't initialize backend_features
commitc33f23a419f95da16ab4faaf08be635c89b96ff0
authorJason Wang <jasowang@redhat.com>
Wed, 2 Jun 2021 03:31:26 +0000 (2 11:31 +0800)
committerJason Wang <jasowang@redhat.com>
Fri, 11 Jun 2021 02:30:13 +0000 (11 10:30 +0800)
tree291d3e4843c39af6d0916c3bcad4c9d0cbdc5afe
parentd0416d487bd561526486c2e43910ea9494855e16
vhost-vdpa: don't initialize backend_features

We used to initialize backend_features during vhost_vdpa_init()
regardless whether or not it was supported by vhost. This will lead
the unsupported features like VIRTIO_F_IN_ORDER to be included and set
to the vhost-vdpa during vhost_dev_start. Because the
VIRTIO_F_IN_ORDER is not supported by vhost-vdpa so it won't be
advertised to guest which will break the datapath.

Fix this by not initializing the backend_features, so the
acked_features could be built only from guest features via
vhost_net_ack_features().

Fixes: 108a64818e69b ("vhost-vdpa: introduce vhost-vdpa backend")
Cc: qemu-stable@nongnu.org
Cc: Gautam Dawar <gdawar@xilinx.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
hw/virtio/vhost-vdpa.c