aboutsummaryrefslogtreecommitdiffstats
path: root/src/virtio-ring.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2010-05-20 16:24:48 +0300
committerKevin O'Connor <kevin@koconnor.net>2010-05-26 20:51:44 -0400
commitbfe4d6044c579e4b66566d10b4e25f3297f6c4ab (patch)
treeb783159cf1b04002b43ea0641f2a81d83e2f7d8b /src/virtio-ring.c
parentbb68591e7169f9acdfb9625073ceab5f367613f0 (diff)
downloadseabios-bfe4d6044c579e4b66566d10b4e25f3297f6c4ab.tar.gz
virtio: remove NO_NOTIFY optimization
NO_NOTIFY is an optimization to reduce the number of exits, but using it requires careful synchronization with host, forcing read/write ordering for the CPU. Otherwise we risk not kicking a host when it is waiting for more buffers, resulting in a deadlock. Let's just always kick, it's way simpler. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Cc: Gleb Natapov <gleb@redhat.com>
Diffstat (limited to 'src/virtio-ring.c')
-rw-r--r--src/virtio-ring.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/virtio-ring.c b/src/virtio-ring.c
index 75656889..493d8b5e 100644
--- a/src/virtio-ring.c
+++ b/src/virtio-ring.c
@@ -143,12 +143,10 @@ void vring_kick(unsigned int ioaddr, struct vring_virtqueue *vq, int num_added)
{
struct vring *vr = &vq->vring;
struct vring_avail *avail = GET_FLATPTR(vr->avail);
- struct vring_used *used = GET_FLATPTR(vq->vring.used);
wmb();
SET_FLATPTR(avail->idx, GET_FLATPTR(avail->idx) + num_added);
mb();
- if (!(GET_FLATPTR(used->flags) & VRING_USED_F_NO_NOTIFY))
- vp_notify(ioaddr, GET_FLATPTR(vq->queue_index));
+ vp_notify(ioaddr, GET_FLATPTR(vq->queue_index));
}