mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
x86, idle: add barriers to CLFLUSH workaround
... since the documentation is explicit that CLFLUSH is only ordered with respect to MFENCE. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> Signed-off-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
a4e0cea6fc
commit
48d32458bc
1 file changed
+4
@@ -336,7 +336,11 @@ void mwait_idle_with_hints(unsigned int eax, unsigned int ecx)
|
||||
s_time_t expires = per_cpu(timer_deadline, cpu);
|
||||
|
||||
if ( boot_cpu_has(X86_FEATURE_CLFLUSH_MONITOR) )
|
||||
{
|
||||
mb();
|
||||
clflush((void *)&mwait_wakeup(cpu));
|
||||
mb();
|
||||
}
|
||||
|
||||
__monitor((void *)&mwait_wakeup(cpu), 0, 0);
|
||||
smp_mb();
|
||||
|
||||