Re: [PATCH] drm/virtio: fix ring free check

2020-02-06 Thread Gerd Hoffmann
Hi, > > + indirect = virtio_has_feature(vgdev->vdev, > > VIRTIO_RING_F_INDIRECT_DESC); > > + vqcnt = indirect ? 1 : elemcnt; > Is the feature dynamic and require the lock held? If not, the result > can be cached and the fixup can happen before grabbing the lock Not dynamic, so yes

Re: [PATCH] drm/virtio: fix ring free check

2020-02-06 Thread Chia-I Wu
On Thu, Feb 6, 2020 at 3:14 AM Gerd Hoffmann wrote: > > If the virtio device supports indirect ring descriptors we need only one > ring entry for the whole command. Take that into account when checking > whenever the virtqueue has enough free entries for our command. > > Signed-off-by: Gerd Hoffm