Re: [PATCH] KVM: Avoid using vmx instruction directly

Jeremy Fitzhardinge
2006-11-10T19:38:32Z

Martin Schwidefsky wrote:
> On 11/10/06, Jeremy Fitzhardinge <jeremy-TSDbQ3PG+2Y@public.gmane.org> wrote:
>> >> Or gcc
>> >> might move the assignment of phys_addr to after the inline assembly.
>> >>
>> > "asm volatile" prevents that (and I'm not 100% sure it's necessary).
>>
>> No, it won't necessarily. "asm volatile" simply forces gcc to emit the
>> assembler, even if it thinks its output doesn't get used. It makes no
>> ordering guarantees with respect to other code (or even other "asm
>> volatiles"). The "memory" clobbers should fix the ordering of the asms
>> though.
>
> The "memory" clobber just tells the compiler that any memory object
> might get access by the inline.

I just meant that two asms with a "memory" clobber will be generated
with a fixed ordering, which "asm volatile" does not necessarily do.

J

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo