diff options
Diffstat (limited to 'patches/boot_time_opt_guest/0108-use-lfence-instead-of-rep-and-nop.patch')
-rw-r--r-- | patches/boot_time_opt_guest/0108-use-lfence-instead-of-rep-and-nop.patch | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/patches/boot_time_opt_guest/0108-use-lfence-instead-of-rep-and-nop.patch b/patches/boot_time_opt_guest/0108-use-lfence-instead-of-rep-and-nop.patch new file mode 100644 index 0000000..463f384 --- /dev/null +++ b/patches/boot_time_opt_guest/0108-use-lfence-instead-of-rep-and-nop.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
2 | From: Arjan van de Ven <arjan@linux.intel.com> | ||
3 | Date: Sat, 8 Dec 2018 18:21:32 +0000 | ||
4 | Subject: [PATCH] use lfence instead of rep and nop | ||
5 | |||
6 | --- | ||
7 | arch/x86/include/asm/vdso/processor.h | 2 +- | ||
8 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
9 | |||
10 | diff --git a/arch/x86/include/asm/vdso/processor.h b/arch/x86/include/asm/vdso/processor.h | ||
11 | index 57b1a7034c64..e2c45674f989 100644 | ||
12 | --- a/arch/x86/include/asm/vdso/processor.h | ||
13 | +++ b/arch/x86/include/asm/vdso/processor.h | ||
14 | @@ -10,7 +10,7 @@ | ||
15 | /* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ | ||
16 | static __always_inline void rep_nop(void) | ||
17 | { | ||
18 | - asm volatile("rep; nop" ::: "memory"); | ||
19 | + asm volatile("lfence" ::: "memory"); | ||
20 | } | ||
21 | |||
22 | static __always_inline void cpu_relax(void) | ||
23 | -- | ||
24 | https://clearlinux.org | ||
25 | |||