WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [PATCH 03 of 36] x86: add memory barriers to wrmsr

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: [Xen-devel] Re: [PATCH 03 of 36] x86: add memory barriers to wrmsr
From: Arjan van de Ven <arjan@xxxxxxxxxxxxx>
Date: Tue, 24 Jun 2008 21:44:41 -0700
Cc: Mark McLoughlin <markmc@xxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Eduardo Habkost <ehabkost@xxxxxxxxxx>, Stephen Tweedie <sct@xxxxxxxxxx>, x86@xxxxxxxxxx, LKML <linux-kernel@xxxxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxx>
Delivery-date: Wed, 25 Jun 2008 10:02:46 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <93c7057b1f4acae501b2.1214367539@localhost>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Intel
References: <patchbomb.1214367536@localhost> <93c7057b1f4acae501b2.1214367539@localhost>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Wed, 25 Jun 2008 00:18:59 -0400
Jeremy Fitzhardinge <jeremy@xxxxxxxx> wrote:

> wrmsr is a special instruction which can have arbitrary system-wide
> effects.  We don't want the compiler to reorder it with respect to
> memory operations, so make it a memory barrier.

it's more readable for several of these cases to stick a barrier(); in
front and after it to be honest; that makes it more explicit that
these are deliberate compiler barriers rather than "actual" memory
access...


-- 
If you want to reach me at my work email, use arjan@xxxxxxxxxxxxxxx
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel