]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
drm/virtio: fix vq wait_event condition
authorGerd Hoffmann <kraxel@redhat.com>
Tue, 3 Apr 2018 09:59:04 +0000 (11:59 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 14 Aug 2018 10:23:49 +0000 (12:23 +0200)
commitd000661b03ea2b137ae166c674d1ce9e286b42a1
tree607dc98272cb856c73f9c3cb3525d3997b25e6dd
parent408136ab73179d76d4b3f3ca0c0ac426420fb7b1
drm/virtio: fix vq wait_event condition

BugLink: http://bugs.launchpad.net/bugs/1778265
commit d02d270014f70dcab0117776b81a37b6fca745ae upstream.

Wait until we have enough space in the virt queue to actually queue up
our request.  Avoids the guest spinning in case we have a non-zero
amount of free entries but not enough for the request.

Cc: stable@vger.kernel.org
Reported-by: Alain Magloire <amagloire@blackberry.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20180403095904.11152-1-kraxel@redhat.com
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/gpu/drm/virtio/virtgpu_vq.c