Re: [patch 134/149] x86, paravirt: Add a global synchronization point for pvclock

Jeremy Fitzhardinge
2010-07-14T21:11:28Z

On 07/14/2010 01:45 PM, Zachary Amsden wrote:
> clts() has no memory clobber; it is used to serialize execution of
> code within kernel_fpu_begin() / kernel_fpu_end() blocks.
>
> If the code within is reordered before the clts(), we've corrupted
> guest FPU state.

Hm, that's awkward - you'd really need some way of specifying ordering
with respect to the FPU state, and "memory" would only be an approximate
proxy of that. And not a good one, since gcc wouldn't regard
register-only fpu ops as being affected by a memory clobber.

J