hv: serializng: use mfence to ensure trampoline code was updated

Using the MFENCE to make sure trampoline code
has been updated (clflush) into memory beforing start APs.

Tracked-On: #5929
Signed-off-by: Li Fei1 <fei1.li@intel.com>
This commit is contained in:
Li Fei1 2021-04-19 11:02:11 +08:00 committed by wenlingz
parent 76eb68bf9c
commit 5f281df548

View File

@ -322,6 +322,10 @@ static void start_pcpu(uint16_t pcpu_id)
write_trampoline_stack_sym(pcpu_id);
clac();
/* Using the MFENCE to make sure trampoline code
* has been updated (clflush) into memory beforing start APs.
*/
cpu_memory_barrier();
send_startup_ipi(pcpu_id, startup_paddr);
/* Wait until the pcpu with pcpu_id is running and set the active bitmap or