Jason Wang
2021-Jan-04 06:55 UTC
[PATCH V3 18/19] virtio_vdpa: don't warn when fail to disable vq
There's no guarantee that the device can disable a specific virtqueue through set_vq_ready(). One example is the modern virtio-pci device. So this patch removes the warning. Signed-off-by: Jason Wang <jasowang at redhat.com> --- drivers/virtio/virtio_vdpa.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/virtio/virtio_vdpa.c b/drivers/virtio/virtio_vdpa.c index 4a9ddb44b2a7..e28acf482e0c 100644 --- a/drivers/virtio/virtio_vdpa.c +++ b/drivers/virtio/virtio_vdpa.c @@ -225,9 +225,8 @@ static void virtio_vdpa_del_vq(struct virtqueue *vq) list_del(&info->node); spin_unlock_irqrestore(&vd_dev->lock, flags); - /* Select and deactivate the queue */ + /* Select and deactivate the queue (best effort) */ ops->set_vq_ready(vdpa, index, 0); - WARN_ON(ops->get_vq_ready(vdpa, index)); vring_del_virtqueue(vq); -- 2.25.1
Michael S. Tsirkin
2021-Feb-05 15:24 UTC
[PATCH V3 18/19] virtio_vdpa: don't warn when fail to disable vq
On Mon, Jan 04, 2021 at 02:55:02PM +0800, Jason Wang wrote:> There's no guarantee that the device can disable a specific virtqueue > through set_vq_ready(). One example is the modern virtio-pci > device. So this patch removes the warning. > > Signed-off-by: Jason Wang <jasowang at redhat.com>Do we need the read as a kind of flush though?> --- > drivers/virtio/virtio_vdpa.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/virtio/virtio_vdpa.c b/drivers/virtio/virtio_vdpa.c > index 4a9ddb44b2a7..e28acf482e0c 100644 > --- a/drivers/virtio/virtio_vdpa.c > +++ b/drivers/virtio/virtio_vdpa.c > @@ -225,9 +225,8 @@ static void virtio_vdpa_del_vq(struct virtqueue *vq) > list_del(&info->node); > spin_unlock_irqrestore(&vd_dev->lock, flags); > > - /* Select and deactivate the queue */ > + /* Select and deactivate the queue (best effort) */ > ops->set_vq_ready(vdpa, index, 0); > - WARN_ON(ops->get_vq_ready(vdpa, index)); > > vring_del_virtqueue(vq); > > -- > 2.25.1