From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:35325) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0pZW-00057Y-Bx for qemu-devel@nongnu.org; Tue, 06 Sep 2011 02:55:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R0pZU-0005eJ-D1 for qemu-devel@nongnu.org; Tue, 06 Sep 2011 02:55:50 -0400 Received: from mail-wy0-f173.google.com ([74.125.82.173]:39679) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0pZU-0005eD-66 for qemu-devel@nongnu.org; Tue, 06 Sep 2011 02:55:48 -0400 Received: by wyf22 with SMTP id 22so4824496wyf.4 for ; Mon, 05 Sep 2011 23:55:46 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4E65C3EE.1090407@redhat.com> Date: Tue, 06 Sep 2011 08:55:42 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <20110901163359.GB11620@redhat.com> <786649703.1049386.1314909069542.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com> <20110902154549.GA18368@redhat.com> <20110903144635.GD12965@yookeroo.fritz.box> <20110904091643.GA20795@redhat.com> <20110905044316.GD30278@yookeroo.fritz.box> <20110905091945.GC16038@redhat.com> <20110906031224.GH30278@yookeroo.fritz.box> In-Reply-To: <20110906031224.GH30278@yookeroo.fritz.box> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] virtio: Make memory barriers be memory barriers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" , aliguori@us.ibm.com, aik@ozlabs.ru, rusty@rustcorp.com.au, qemu-devel@nongnu.org, agraf@suse.de 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