Skip to contentSkip to conversation

viostor driver.Add memory barrier - synch with fix for Linux guests by Michael S. Tsirkin <[email protected]>

PATCH In review Vadim Rozenfeld 2 participants 2 messages Nov 1, 2009 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 viostor driver.Add memory barrier - synch with fix for Linux guests by Michael S. Tsirkin <[email protected]>

repository: /home/vadimr/shares/kvm-guest-drivers-windows
branch: XP
commit 6906acfc2d5f58df43ebc9c190e1447ff6e63a01

Author: Vadim Rozenfeld<[email protected]>
Date:   Sun Nov 1 11:54:03 2009 +0200

[PATCH] viostor driver.Add memory read barrier - synch with fix for Linux guests by Michael S. Tsirkin<[email protected]>

viostor/virtio_ring.c +2 -0
index d099bb8..2911cef 100644
@@ -237,6 +237,8 @@ vring_get_buf(
         return NULL;
     }
 
+    rmb();
+
     i = vq->vring.used->ring[vq->last_used_idx%vq->vring.num].id;
     *len = vq->vring.used->ring[vq->last_used_idx%vq->vring.num].len;
 
viostor/virtio_ring.c +2 -0
index d099bb8..2911cef 100644
@@ -237,6 +237,8 @@ vring_get_buf(
         return NULL;
     }
 
+    rmb();
+
     i = vq->vring.used->ring[vq->last_used_idx%vq->vring.num].id;
     *len = vq->vring.used->ring[vq->last_used_idx%vq->vring.num].len;
 
#1 lore raw

Committed. Thanks.

Quoted 33 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Vadim Rozenfeld
Sent: Sunday, November 01, 2009 12:41 PM
To: [email protected]
Subject: [PATCH] viostor driver.Add memory barrier - synch with fix for Linux guests by Michael S. Tsirkin <[email protected]>

repository: /home/vadimr/shares/kvm-guest-drivers-windows
branch: XP
commit 6906acfc2d5f58df43ebc9c190e1447ff6e63a01

Author: Vadim Rozenfeld<[email protected]>
Date:   Sun Nov 1 11:54:03 2009 +0200

[PATCH] viostor driver.Add memory read barrier - synch with fix
for Linux guests by Michael S. Tsirkin<[email protected]>

viostor/virtio_ring.c index renamed from viostor/virtio_ring.c +0 -0

d099bb8..2911cef 100644

viostor/virtio_ring.c +2 -0
@@ -237,6 +237,8 @@ vring_get_buf(
          return NULL;
      }
 
+    rmb();
+
      i = vq->vring.used->ring[vq->last_used_idx%vq->vring.num].id;
      *len = vq->vring.used->ring[vq->last_used_idx%vq->vring.num].len;