[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen stable-4.7] x86: fix build with older tool chain



commit aac4cbe3644738d485d38bd551046d63c00cc670
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Wed Feb 14 12:06:22 2018 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Feb 14 12:06:22 2018 +0100

    x86: fix build with older tool chain
    
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 xen/include/asm-x86/spec_ctrl.h | 12 ++++++++----
 xen/tools/gen-cpuid.py          |  2 +-
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/xen/include/asm-x86/spec_ctrl.h b/xen/include/asm-x86/spec_ctrl.h
index 39823af..68c756f 100644
--- a/xen/include/asm-x86/spec_ctrl.h
+++ b/xen/include/asm-x86/spec_ctrl.h
@@ -50,8 +50,10 @@ static always_inline void spec_ctrl_enter_idle(struct 
cpu_info *info)
     barrier();
     info->use_shadow_spec_ctrl = 1;
     barrier();
-    asm volatile ( ALTERNATIVE(ASM_NOP3, "wrmsr", X86_FEATURE_XEN_IBRS_SET)
-                   :: "a" (val), "c" (MSR_SPEC_CTRL), "d" (0) : "memory" );
+    asm volatile ( ALTERNATIVE(ASM_NOP3, "wrmsr", %c3)
+                   :: "a" (val), "c" (MSR_SPEC_CTRL), "d" (0),
+                      "i" (X86_FEATURE_XEN_IBRS_SET)
+                   : "memory" );
 }
 
 /* WARNING! `ret`, `call *`, `jmp *` not safe before this call. */
@@ -65,8 +67,10 @@ static always_inline void spec_ctrl_exit_idle(struct 
cpu_info *info)
      */
     info->use_shadow_spec_ctrl = 0;
     barrier();
-    asm volatile ( ALTERNATIVE(ASM_NOP3, "wrmsr", X86_FEATURE_XEN_IBRS_SET)
-                   :: "a" (val), "c" (MSR_SPEC_CTRL), "d" (0) : "memory" );
+    asm volatile ( ALTERNATIVE(ASM_NOP3, "wrmsr", %c3)
+                   :: "a" (val), "c" (MSR_SPEC_CTRL), "d" (0),
+                      "i" (X86_FEATURE_XEN_IBRS_SET)
+                   : "memory" );
 }
 
 #endif /* !__X86_SPEC_CTRL_H__ */
diff --git a/xen/tools/gen-cpuid.py b/xen/tools/gen-cpuid.py
index ad8b632..fde39db 100755
--- a/xen/tools/gen-cpuid.py
+++ b/xen/tools/gen-cpuid.py
@@ -297,7 +297,7 @@ def write_results(state):
 
     state.output.write(
 """
-#define FEATURESET_NR_ENTRIES %sU
+#define FEATURESET_NR_ENTRIES _AC(%s,U)
 
 #define CPUID_COMMON_1D_FEATURES %s
 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.7

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.