Skip to content

Commit c33f23a

Browse files
committed
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: 108a648 ("vhost-vdpa: introduce vhost-vdpa backend") Cc: [email protected] Cc: Gautam Dawar <[email protected]> Signed-off-by: Jason Wang <[email protected]>
1 parent d0416d4 commit c33f23a

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

hw/virtio/vhost-vdpa.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,15 +268,12 @@ static void vhost_vdpa_add_status(struct vhost_dev *dev, uint8_t status)
268268
static int vhost_vdpa_init(struct vhost_dev *dev, void *opaque)
269269
{
270270
struct vhost_vdpa *v;
271-
uint64_t features;
272271
assert(dev->vhost_ops->backend_type == VHOST_BACKEND_TYPE_VDPA);
273272
trace_vhost_vdpa_init(dev, opaque);
274273

275274
v = opaque;
276275
v->dev = dev;
277276
dev->opaque = opaque ;
278-
vhost_vdpa_call(dev, VHOST_GET_FEATURES, &features);
279-
dev->backend_features = features;
280277
v->listener = vhost_vdpa_memory_listener;
281278
v->msg_type = VHOST_IOTLB_MSG_V2;
282279

0 commit comments

Comments
 (0)