virtio: Replace one cpu_mfence() by cpu_lfence(), and one by cpu_sfence().
commitdfa408369ca6b7b1718558ba44e558dfc9053414
authorImre Vadász <imre@vdsz.com>
Mon, 13 Feb 2017 19:16:14 +0000 (13 20:16 +0100)
committerImre Vadász <imre@vdsz.com>
Sun, 2 Apr 2017 08:00:56 +0000 (2 10:00 +0200)
tree786efc66c9cc8fefff7c492b6f0fece2263c48fe
parent06ea426b3a71e8afc709c878c76a01d4b342b1f8
virtio: Replace one cpu_mfence() by cpu_lfence(), and one by cpu_sfence().

* The cpu_mfence() in virtqueue_dequeue() can be replaced by cpu_lfence(),
  since we only need to make sure that we read the vq->vq_ring.used->idx
  value before reading any other entries from the vq->vq_ring.used ring.

* The cpu_mfence() in vq_ring_update_avail() can be replaced by
  cpu_sfence(), since no one else is writing to the vq->vq_ring.avail
  struct.
sys/dev/virtual/virtio/virtio/virtqueue.c