From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:41235) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0s7U-0003pj-OE for qemu-devel@nongnu.org; Tue, 06 Sep 2011 05:39:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R0s7T-0004y7-Sh for qemu-devel@nongnu.org; Tue, 06 Sep 2011 05:39:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:31539) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0s7T-0004xf-HN for qemu-devel@nongnu.org; Tue, 06 Sep 2011 05:39:03 -0400 Message-ID: <4E65EA33.30807@redhat.com> Date: Tue, 06 Sep 2011 11:38:59 +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> <4E65C3EE.1090407@redhat.com> <4E65E7C8.4080602@redhat.com> In-Reply-To: <4E65E7C8.4080602@redhat.com> 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: Avi Kivity Cc: aliguori@us.ibm.com, "Michael S. Tsirkin" , aik@ozlabs.ru, rusty@rustcorp.com.au, agraf@suse.de, qemu-devel@nongnu.org On 09/06/2011 11:28 AM, Avi Kivity wrote: >> >> 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(). > > Are we sure? Nothing prevents the guest from using weakly-ordered > writes, is there? For example, using MOVNTDQ. > > Although in that case the guest is probably required to issue an SFENCE. Yes, that's the guest problem. You cannot do an SFENCE on the guest's behalf anyway. Paolo