blob: e0e0f87fb1f2ae134a659ec98c1f90a310511d98 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
From 104a54a307b08945365faf6d285cd5a02f94a80f Mon Sep 17 00:00:00 2001
From: Ross Lagerwall <ross.lagerwall@citrix.com>
Date: Mon, 15 Aug 2022 15:43:08 +0200
Subject: [PATCH 38/67] x86/amd: only call setup_force_cpu_cap for boot CPU
This should only be called for the boot CPU to avoid calling _init code
after it has been unloaded.
Fixes: 062868a5a8b4 ("x86/amd: Work around CLFLUSH ordering on older parts")
Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
master commit: 31b41ce858c8bd5159212d40969f8e0b7124bbf0
master date: 2022-08-11 17:44:26 +0200
---
xen/arch/x86/cpu/amd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/arch/x86/cpu/amd.c b/xen/arch/x86/cpu/amd.c
index 60dbe61a61ca..a8d2fb8a1590 100644
--- a/xen/arch/x86/cpu/amd.c
+++ b/xen/arch/x86/cpu/amd.c
@@ -820,7 +820,7 @@ static void init_amd(struct cpuinfo_x86 *c)
* everything, including reads and writes to address, and
* LFENCE/SFENCE instructions.
*/
- if (!cpu_has_clflushopt)
+ if (c == &boot_cpu_data && !cpu_has_clflushopt)
setup_force_cpu_cap(X86_BUG_CLFLUSH_MFENCE);
switch(c->x86)
--
2.37.3
|