Spdk/lib/virtio
Dariusz Stojaczyk face9eb258 virtio: add mb() before checking notify flag
The kernel vhost target enables notifying after processing
each interrupt in a following manner.

 * unset NO_NOTIFY flag
 * mb()
 * check avail ring for slipped requests

And we do the following after issuing each I/O.

 * update avail ring
 * check NO_NOTIFY

If NO_NOTIFY check is reordered and read first, we might read
old `true` value, and avail ring might be updated after the
kernel has already done its check. This easily leads to deadlock.

Change-Id: I6bb4490775dfed6fb2987e97c39b713054ae26ad
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/396499
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-02-06 19:27:46 -05:00
..
virtio_user util: add spdk_strerror() wrapper with TLS support 2018-01-04 15:00:09 -05:00
Makefile virtio: add new library virtio 2017-12-26 13:03:29 -05:00
virtio_pci.c virtio: move vdev->name allocation to generic virtio 2018-01-23 22:49:21 -05:00
virtio_user.c virtio: move vdev->name allocation to generic virtio 2018-01-23 22:49:21 -05:00
virtio.c virtio: add mb() before checking notify flag 2018-02-06 19:27:46 -05:00