vhost-vdpa: check vhost_vdpa_set_vring_ready() return value
authorStefano Garzarella <sgarzare@redhat.com>
Fri, 22 Mar 2024 09:23:15 +0000 (10:23 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 1 Jul 2024 18:56:23 +0000 (14:56 -0400)
commit9d5a807c4cb56837f11be9a9250f854fab951290
tree248f79332876a4919d57bc5c382727a2a4fa5354
parentc5cd7e5f230afb56891e3826fbb60f9e2b6c086a
vhost-vdpa: check vhost_vdpa_set_vring_ready() return value

vhost_vdpa_set_vring_ready() could already fail, but if Linux's
patch [1] will be merged, it may fail with more chance if
userspace does not activate virtqueues before DRIVER_OK when
VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK is not negotiated.

So better check its return value anyway.

[1] https://lore.kernel.org/virtualization/20240206145154.118044-1-sgarzare@redhat.com/T/#u

Acked-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Message-Id: <20240322092315.31885-1-sgarzare@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
net/vhost-vdpa.c