hv: memory order: use mfence to strengthen the fast string operations order

Use MFENCE to strengthen the fast string operations execute order to ensure
all trampoline code was updated before flush it into the memory.

Tracked-On: #5929
Signed-off-by: Li Fei1 <fei1.li@intel.com>
This commit is contained in:
Li Fei1 2021-04-09 16:32:45 +08:00 committed by wenlingz
parent 702158dfad
commit 31f48d12a2

View File

@ -119,6 +119,7 @@ uint64_t prepare_trampoline(void)
(size_t)size);
update_trampoline_code_refs(dest_pa);
cpu_memory_barrier();
for (i = 0UL; i < size; i = i + CACHE_LINE_SIZE) {
clflush(hpa2hva(dest_pa + i));
}