From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: x86-64 tools fix question Date: Tue, 01 Mar 2005 15:23:32 -0600 Message-ID: <4224DD54.3000501@us.ibm.com> References: <1109707006.13010.15.camel@thinkpad> <1b8fe72b3f68af920c3ff9bba691daff@cl.cam.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit In-Reply-To: <1b8fe72b3f68af920c3ff9bba691daff@cl.cam.ac.uk> Sender: xen-devel-admin@lists.sourceforge.net Errors-To: xen-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Keir Fraser Cc: Jerone Young , xen-devel List-Id: xen-devel@lists.xenproject.org Keir Fraser wrote: > > On 1 Mar 2005, at 19:56, Jerone Young wrote: > >> I would like to discuss is this correct, dead wrong, or even >> needed at >> all? > > > x86/64 has proper barrier instructions -- see > include/asm-x86_64/system.h in Linux. It is from there that we should > pull our definitions. Barrier macros are defined in a few places in > the tools -- we ought to pull them all into one single header > incorporated by all tools that need it. I was just about to send this out myself :-) I think the consensus was to put them all in xc.h. I posted a patch recently that made everything include asm/system.h. All it should take is replacing asm/system.h with xc.h in the patch and then making the necessary changes to xc.h. For reference, the proper x86-64 barriers are: #define mb() asm volatile("mfence":::"memory") #define rmb() asm volatile("lfence":::"memory") #define wmb() asm volatile("sfence":::"memory") Regards, Anthony Liguori -- Regards, Anthony Liguori ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click