All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>,
	aliguori@us.ibm.com, aik@ozlabs.ru, rusty@rustcorp.com.au,
	qemu-devel@nongnu.org, agraf@suse.de
Subject: Re: [Qemu-devel] [PATCH] virtio: Make memory barriers be memory barriers
Date: Tue, 06 Sep 2011 08:55:42 +0200	[thread overview]
Message-ID: <4E65C3EE.1090407@redhat.com> (raw)
In-Reply-To: <20110906031224.GH30278@yookeroo.fritz.box>

On 09/06/2011 05:12 AM, David Gibson wrote:
> I'm not "fixing ppc".  I'm fixing a fundamental flaw in the protocol
> implementation._So far_  I've only observed the effects on ppc, but
> that doesn't mean they don't exist.

Actually Michael is right.  The implementation is correct on x86, though 
wrong anywhere else (perhaps s390?).  On those architectures you do not 
need rmb() and wmb().

So doing the __sync_synchronize() on ppc only as he proposed is wrong; 
but not doing it (and leaving only a compiler barrier) on x86 is 
correct.  See http://g.oswego.edu/dl/jmm/cookbook.html under 
"Multiprocessors".

Paolo

  reply	other threads:[~2011-09-06  6:55 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-01  6:09 [Qemu-devel] [PATCH] virtio: Make memory barriers be memory barriers David Gibson
2011-09-01  6:47 ` Paolo Bonzini
2011-09-02  0:08   ` David Gibson
2011-09-02  6:49     ` Paolo Bonzini
2011-09-03 11:53       ` Blue Swirl
2011-09-01  7:37 ` Sasha Levin
2011-09-01  7:38   ` Sasha Levin
2011-09-01  7:56   ` Paolo Bonzini
2011-09-02  0:09     ` David Gibson
2011-09-01 15:30 ` Michael S. Tsirkin
2011-09-01 16:14   ` Paolo Bonzini
2011-09-01 16:34     ` Michael S. Tsirkin
2011-09-01 20:31       ` Paolo Bonzini
2011-09-02 15:45         ` Michael S. Tsirkin
2011-09-03 14:46           ` David Gibson
2011-09-04  9:16             ` Michael S. Tsirkin
2011-09-05  4:43               ` David Gibson
2011-09-05  9:19                 ` Michael S. Tsirkin
2011-09-06  3:12                   ` David Gibson
2011-09-06  6:55                     ` Paolo Bonzini [this message]
2011-09-06  9:02                       ` David Gibson
2011-09-06  9:28                       ` Avi Kivity
2011-09-06  9:35                         ` Michael S. Tsirkin
2011-09-06  9:38                         ` Paolo Bonzini
2011-09-05  7:41               ` Paolo Bonzini
2011-09-05  8:06                 ` Michael S. Tsirkin
2011-09-05  9:42                   ` Paolo Bonzini
2011-09-03 16:19           ` Paolo Bonzini
2011-09-04  8:47             ` Michael S. Tsirkin
2011-09-02  0:11     ` David Gibson
2011-09-02  6:11       ` Paolo Bonzini
2011-09-02 15:57         ` Michael S. Tsirkin

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=4E65C3EE.1090407@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=agraf@suse.de \
    --cc=aik@ozlabs.ru \
    --cc=aliguori@us.ibm.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rusty@rustcorp.com.au \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.