Re: [Xen-devel] [PATCH v3 4/4] x86/asm: Rewrite sync_core() to use IRET-to-self

From: H. Peter Anvin
Date: Tue Dec 06 2016 - 14:35:50 EST


On 12/06/16 00:46, Jan Beulich wrote:
>> +
>> +#ifdef CONFIG_X86_32
>> + asm volatile (
>> + "pushfl\n\t"
>> + "pushl %%cs\n\t"
>> + "pushl $1f\n\t"
>> + "iret\n\t"
>> + "1:"
>> + : "+r" (__sp) : : "cc", "memory");
>
> I don't thing EFLAGS (i.e. "cc") gets modified anywhere here. And
> the memory clobber would perhaps better be pulled out into an
> explicit barrier() invocation (making it more obvious what it's needed
> for)?
>

Not to mention "cc" doesn't do anything on x86 at all.

-hpa