OSDN Git Service

virtio_vdpa: setup correct vq size with callbacks get_vq_num_{max,min}
authorWu Zongyong <wuzongyong@linux.alibaba.com>
Fri, 29 Oct 2021 09:14:47 +0000 (17:14 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 1 Nov 2021 08:30:35 +0000 (04:30 -0400)
commit30a03dfcbbdac22ade72a38b953e0709fbf35baa
tree1f9d689927cefa85ac5cd508052ad52ae9404363
parentc53e5d1b5ea46cfd6acb4a51c324b2ec03e89e76
virtio_vdpa: setup correct vq size with callbacks get_vq_num_{max,min}

For the devices which implement the get_vq_num_min callback, the driver
should not negotiate with virtqueue size with the backend vdpa device if
the value returned by get_vq_num_min equals to the value returned by
get_vq_num_max.
This is useful for vdpa devices based on legacy virtio specfication.

Signed-off-by: Wu Zongyong <wuzongyong@linux.alibaba.com>
Link: https://lore.kernel.org/r/bc0551cec6c3f3dd9424b678b7c22d882aebab3a.1635493219.git.wuzongyong@linux.alibaba.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/virtio/virtio_vdpa.c