File tree Expand file tree Collapse file tree 6 files changed +25
-18
lines changed Expand file tree Collapse file tree 6 files changed +25
-18
lines changed Original file line number Diff line number Diff line change @@ -228,26 +228,12 @@ enum spectre_v2_mitigation {
228
228
extern void x86_spec_ctrl_set (u64 );
229
229
extern u64 x86_spec_ctrl_get_default (void );
230
230
231
- /*
232
- * On VMENTER we must preserve whatever view of the SPEC_CTRL MSR
233
- * the guest has, while on VMEXIT we restore the host view. This
234
- * would be easier if SPEC_CTRL were architecturally maskable or
235
- * shadowable for guests but this is not (currently) the case.
236
- * Takes the guest view of SPEC_CTRL MSR as a parameter.
237
- */
238
- extern void x86_spec_ctrl_set_guest (u64 );
239
- extern void x86_spec_ctrl_restore_host (u64 );
240
-
241
231
/* The Speculative Store Bypass disable variants */
242
232
enum ssb_mitigation {
243
233
SPEC_STORE_BYPASS_NONE ,
244
234
SPEC_STORE_BYPASS_DISABLE ,
245
235
};
246
236
247
- /* AMD specific Speculative Store Bypass MSR data */
248
- extern u64 x86_amd_ls_cfg_base ;
249
- extern u64 x86_amd_ls_cfg_rds_mask ;
250
-
251
237
extern char __indirect_thunk_start [];
252
238
extern char __indirect_thunk_end [];
253
239
Original file line number Diff line number Diff line change
1
+ /* SPDX-License-Identifier: GPL-2.0 */
2
+ #ifndef _ASM_X86_SPECCTRL_H_
3
+ #define _ASM_X86_SPECCTRL_H_
4
+
5
+ #include <asm/nospec-branch.h>
6
+
7
+ /*
8
+ * On VMENTER we must preserve whatever view of the SPEC_CTRL MSR
9
+ * the guest has, while on VMEXIT we restore the host view. This
10
+ * would be easier if SPEC_CTRL were architecturally maskable or
11
+ * shadowable for guests but this is not (currently) the case.
12
+ * Takes the guest view of SPEC_CTRL MSR as a parameter.
13
+ */
14
+ extern void x86_spec_ctrl_set_guest (u64 );
15
+ extern void x86_spec_ctrl_restore_host (u64 );
16
+
17
+ /* AMD specific Speculative Store Bypass MSR data */
18
+ extern u64 x86_amd_ls_cfg_base ;
19
+ extern u64 x86_amd_ls_cfg_rds_mask ;
20
+
21
+ #endif
Original file line number Diff line number Diff line change 10
10
#include <asm/processor.h>
11
11
#include <asm/apic.h>
12
12
#include <asm/cpu.h>
13
- #include <asm/nospec-branch .h>
13
+ #include <asm/spec-ctrl .h>
14
14
#include <asm/smp.h>
15
15
#include <asm/pci-direct.h>
16
16
#include <asm/delay.h>
Original file line number Diff line number Diff line change 13
13
#include <linux/cpu.h>
14
14
#include <linux/module.h>
15
15
16
- #include <asm/nospec-branch .h>
16
+ #include <asm/spec-ctrl .h>
17
17
#include <asm/cmdline.h>
18
18
#include <asm/bugs.h>
19
19
#include <asm/processor.h>
Original file line number Diff line number Diff line change 49
49
#include <asm/debugreg.h>
50
50
#include <asm/kvm_para.h>
51
51
#include <asm/irq_remapping.h>
52
- #include <asm/nospec-branch .h>
52
+ #include <asm/spec-ctrl .h>
53
53
54
54
#include <asm/virtext.h>
55
55
#include "trace.h"
Original file line number Diff line number Diff line change 51
51
#include <asm/apic.h>
52
52
#include <asm/irq_remapping.h>
53
53
#include <asm/mmu_context.h>
54
- #include <asm/nospec-branch .h>
54
+ #include <asm/spec-ctrl .h>
55
55
#include <asm/mshyperv.h>
56
56
57
57
#include "trace.h"
You can’t perform that action at this time.
0 commit comments