Skip to content
  • Liu, Jinsong's avatar
    x86: Fix cpu offline bug: add clflush inside dead loop · 7c61cf4f
    Liu, Jinsong authored
    
    
    At some platform (like Xen 7400), when hyperthreading, an offlined
    thread may waked spuriously up by its brother, and returning around
    the loop.  This patch explicitly clflush the cache line in a light
    weight way to workaround potential issue.  Unlike wbinvd, clflush is
    not serializing instruction, hence memory fence is necessary to make
    sure all load/store operation visible before flush cache line.
    
    Signed-off-by: default avatarLiu, Jinsong <jinsong.liu@intel.com>
    7c61cf4f