public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Vadim Rozenfeld <vrozenfe@redhat.com>
To: kvm@vger.kernel.org
Subject: [PATCH] viostor driver.Add memory barrier - synch with fix for Linux guests by Michael S. Tsirkin <mst@redhat.com>
Date: Sun, 01 Nov 2009 12:41:13 +0200	[thread overview]
Message-ID: <4AED65C9.70602@redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 753 bytes --]


repository: /home/vadimr/shares/kvm-guest-drivers-windows
branch: XP
commit 6906acfc2d5f58df43ebc9c190e1447ff6e63a01
Author: Vadim Rozenfeld<vrozenfe@redhat.com>
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<mst@redhat.com>

     Signed-off-by: Vadim Rozenfeld<vrozenfe@redhat.com>

diff --git a/viostor/virtio_ring.c b/viostor/virtio_ring.c
index d099bb8..2911cef 100644
--- a/viostor/virtio_ring.c
+++ b/viostor/virtio_ring.c
@@ -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;



[-- Attachment #2: rmb.patch --]
[-- Type: text/plain, Size: 365 bytes --]

diff --git a/viostor/virtio_ring.c b/viostor/virtio_ring.c
index d099bb8..2911cef 100644
--- a/viostor/virtio_ring.c
+++ b/viostor/virtio_ring.c
@@ -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;
 

             reply	other threads:[~2009-11-01 10:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-01 10:41 Vadim Rozenfeld [this message]
2009-11-01 13:29 ` [PATCH] viostor driver.Add memory barrier - synch with fix for Linux guests by Michael S. Tsirkin <mst@redhat.com> Yan Vugenfirer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AED65C9.70602@redhat.com \
    --to=vrozenfe@redhat.com \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox