From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N8Foy-00082Z-Cf for qemu-devel@nongnu.org; Wed, 11 Nov 2009 11:13:24 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N8Fot-00081l-Qo for qemu-devel@nongnu.org; Wed, 11 Nov 2009 11:13:24 -0500 Received: from [199.232.76.173] (port=41814 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N8Fot-00081a-IC for qemu-devel@nongnu.org; Wed, 11 Nov 2009 11:13:19 -0500 Received: from mx20.gnu.org ([199.232.41.8]:39936) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N8Fot-0005Sb-AO for qemu-devel@nongnu.org; Wed, 11 Nov 2009 11:13:19 -0500 Received: from mail.codesourcery.com ([38.113.113.100]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N8Fos-00016V-1S for qemu-devel@nongnu.org; Wed, 11 Nov 2009 11:13:18 -0500 From: Paul Brook Subject: Re: [Qemu-devel] Re: [PATCH] qemu/virtio: make wmb compiler barrier + comments Date: Wed, 11 Nov 2009 16:13:14 +0000 References: <20091026131715.GA25271@redhat.com> <200911111416.00355.paul@codesourcery.com> <20091111143449.GA30065@redhat.com> In-Reply-To: <20091111143449.GA30065@redhat.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200911111613.14226.paul@codesourcery.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" On Wednesday 11 November 2009, Michael S. Tsirkin wrote: > On Wed, Nov 11, 2009 at 02:16:00PM +0000, Paul Brook wrote: > > On Wednesday 11 November 2009, Michael S. Tsirkin wrote: > > > On Wed, Nov 11, 2009 at 01:45:35PM +0000, Paul Brook wrote: > > > > If you don't need real barriers, then why does the kvm code have > > > > them? > > > > > > We need real barriers but AFAIK kvm does not have them :( > > > IOW: virtio is currently broken with kvm, and my patch did > > > not fix this. The comment that I added says as much. > > > > So your code just makes the bug harder to reproduce? Doesn't sound like a > > good thing to me. > > > > Paul > > There are multiple bugs, I can't fix all of them, > for all architectures, in one patch. Maybe not, but the associated comment now appears to be bogus. Either we execute everything in lockstep (as the comment says, in which case no barriers are required), or we need proper SMP barriers. Having a half-harted barrier that maybe works some of the time on some hosts, and is completely unnecessary in most cases, and doesn't match the comment is IMO significantly worse than what we had before. Paul