[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

Arjan van de Ven wrote:
On Wed, 25 Jun 2008 14:08:57 -0700
Jeremy Fitzhardinge <jeremy@xxxxxxxx> wrote:

Arjan van de Ven wrote:
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

I suppose, though I would be inclined to put the barriers in the
wrmsr macro itself to act as documentation.

yeah I meant like this:

static inline void native_write_msr(unsigned int msr,
                                    unsigned low, unsigned high)
        asm volatile("wrmsr" : : "c" (msr), "a"(low), "d" (high));

or in the same in the thing that calls this.

OK, we're in vehement agreement then.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.