|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen staging] x86: reduce "visibility" of spec_ctrl_asm.h
commit 55924f9d923b51ce8ed6d2ecc7a3644a8562e8d9
Author: Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Wed Aug 29 16:32:17 2018 +0200
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Aug 29 16:32:17 2018 +0200
x86: reduce "visibility" of spec_ctrl_asm.h
Other than indirect_thunk_asm.h, spec_ctrl_asm.h is a header generally
needed by assembly source files only. Avoid having all C sources have a
dependency on that header (the set of assembly sources now gaining a
dependency on the C header is much smaller and hence more acceptable).
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
xen/include/asm-x86/asm_defns.h | 4 ++--
xen/include/asm-x86/spec_ctrl.h | 8 ++++++++
xen/include/asm-x86/spec_ctrl_asm.h | 6 +-----
3 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/xen/include/asm-x86/asm_defns.h b/xen/include/asm-x86/asm_defns.h
index 89a0fb41a2..da504eaec2 100644
--- a/xen/include/asm-x86/asm_defns.h
+++ b/xen/include/asm-x86/asm_defns.h
@@ -326,6 +326,8 @@ static always_inline void stac(void)
"call cr4_pv32_restore", X86_FEATURE_XEN_SMEP, \
"call cr4_pv32_restore", X86_FEATURE_XEN_SMAP
+#include <asm/spec_ctrl_asm.h>
+
#endif
#ifdef CONFIG_PERF_COUNTERS
@@ -368,6 +370,4 @@ static always_inline void stac(void)
4: .p2align 2 ; \
.popsection
-#include <asm/spec_ctrl_asm.h>
-
#endif /* __X86_ASM_DEFNS_H__ */
diff --git a/xen/include/asm-x86/spec_ctrl.h b/xen/include/asm-x86/spec_ctrl.h
index e7d946ecb6..e06fa84865 100644
--- a/xen/include/asm-x86/spec_ctrl.h
+++ b/xen/include/asm-x86/spec_ctrl.h
@@ -20,6 +20,13 @@
#ifndef __X86_SPEC_CTRL_H__
#define __X86_SPEC_CTRL_H__
+/* Encoding of cpuinfo.spec_ctrl_flags */
+#define SCF_use_shadow (1 << 0)
+#define SCF_ist_wrmsr (1 << 1)
+#define SCF_ist_rsb (1 << 2)
+
+#ifndef __ASSEMBLY__
+
#include <asm/alternative.h>
#include <asm/current.h>
#include <asm/msr-index.h>
@@ -91,6 +98,7 @@ static always_inline void spec_ctrl_exit_idle(struct cpu_info
*info)
:: "a" (val), "c" (MSR_SPEC_CTRL), "d" (0) : "memory" );
}
+#endif /* __ASSEMBLY__ */
#endif /* !__X86_SPEC_CTRL_H__ */
/*
diff --git a/xen/include/asm-x86/spec_ctrl_asm.h
b/xen/include/asm-x86/spec_ctrl_asm.h
index 686a0f77a5..803f7ce5ef 100644
--- a/xen/include/asm-x86/spec_ctrl_asm.h
+++ b/xen/include/asm-x86/spec_ctrl_asm.h
@@ -20,13 +20,9 @@
#ifndef __X86_SPEC_CTRL_ASM_H__
#define __X86_SPEC_CTRL_ASM_H__
-/* Encoding of cpuinfo.spec_ctrl_flags */
-#define SCF_use_shadow (1 << 0)
-#define SCF_ist_wrmsr (1 << 1)
-#define SCF_ist_rsb (1 << 2)
-
#ifdef __ASSEMBLY__
#include <asm/msr-index.h>
+#include <asm/spec_ctrl.h>
/*
* Saving and restoring MSR_SPEC_CTRL state is a little tricky.
--
generated by git-patchbot for /home/xen/git/xen.git#staging
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |