Messages in this thread | | | Date | Thu, 15 Jul 2010 10:07:51 +0300 | From | Avi Kivity <> | Subject | Re: [PATCH] x86: fix ordering constraints on crX read/writes |
| |
On 07/15/2010 03:28 AM, Zachary Amsden wrote: >> static inline void native_write_cr2(unsigned long val) >> { >> - asm volatile("mov %0,%%cr2": : "r" (val), "m" (__force_order)); >> + asm volatile("mov %1,%%cr2": "+m" (__force_order) : "r" (val) : >> "memory"); >> } > > > You don't need the memory clobber there. Technically, this should > never be used, however.
kvm writes cr2 in order to present the correct value to the guest. It doesn't use native_write_cr2(), however.
-- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.
| |