From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [patch uq/master 2/2] kvm-all.c: define smp_wmb and use it for coalesced mmio Date: Mon, 22 Feb 2010 17:28:25 +0200 Message-ID: <4B82A299.4090608@redhat.com> References: <20100222135906.347393434@amt.cnet> <20100222140210.130087300@amt.cnet> <4B829364.7020300@redhat.com> <20100222144541.GC18992@amt.cnet> <4B829B59.3020803@redhat.com> <20100222145739.GC20580@redhat.com> <4B829DD0.4010009@redhat.com> <20100222150848.GD20580@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm@vger.kernel.org, qemu-devel@nongnu.org To: "Michael S. Tsirkin" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:16514 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753950Ab0BVP22 (ORCPT ); Mon, 22 Feb 2010 10:28:28 -0500 In-Reply-To: <20100222150848.GD20580@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 02/22/2010 05:08 PM, Michael S. Tsirkin wrote: > >> >>>> I imagine all arches need an instruction. For reads as well. >>>> >>>> Note, gcc has a __sync_synchronize() builtin that compiles to mfence on >>>> x86. We might use that as a baseline for both rmb and wmb, and let each >>>> arch override it incrementally. >>>> >>>> >>> This it what my patch did. Note it only works well for recent gcc. >>> >>> >> Do you know how recent? >> > IIRC 4.3 has broken implementation. > 4.4 seems OK as far as I can tell. > Well, so that idea's down. -- error compiling committee.c: too many arguments to function