On Tue, Jun 23, 2020 at 4:51 AM Jason Wang <jasowang@xxxxxxxxxx> wrote:
I think that the kmalloc_array returns ZERO_SIZE_PTR for all of them
On 2020/6/23 äå12:00, Michael S. Tsirkin wrote:
On Wed, Jun 17, 2020 at 11:19:26AM +0800, Jason Wang wrote:
On 2020/6/11 äå7:34, Michael S. Tsirkin wrote:It doesn't need iovecs at all, right?
static void vhost_vq_free_iovecs(struct vhost_virtqueue *vq)This check breaks vdpa which set iov_limit to zero. Consider iov_limit is
{
kfree(vq->descs);
@@ -394,6 +400,9 @@ static long vhost_dev_alloc_iovecs(struct vhost_dev *dev)
for (i = 0; i < dev->nvqs; ++i) {
vq = dev->vqs[i];
vq->max_descs = dev->iov_limit;
+ if (vhost_vq_num_batch_descs(vq) < 0) {
+ return -EINVAL;
+ }
meaningless to vDPA, I wonder we can skip the test when device doesn't use
worker.
Thanks
-- MST
Yes, so we may choose to bypass the iovecs as well.
Thanks
in that case, so I didn't bother to skip the kmalloc_array parts.
Would you prefer to skip them all and let them NULL? Or have I
misunderstood what you mean?
Thanks!