Skip to contentSkip to conversation

x86/entry: Fix build with older toolchains

PATCH In review Andrew Cooper 2 participants 2 messages Apr 9, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/entry: Fix build with older toolchains

Binutils older than 2.29 doesn't know INCSSPD.

Fixes 8e186f98ce0e ("x86: Use indirect calls in reset-stack infrastructure")

---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>

---
 xen/arch/x86/x86_64/entry.S | 2 ++
 1 file changed, 2 insertions(+)
xen/arch/x86/x86_64/entry.S +2 -0
index 461bbc355872..a4615e1ccbaf 100644
@@ -650,7 +650,9 @@ FUNC(continue_pv_domain)
          * JMPed to.  Drop the return address.
          */
         add   $8, %rsp
+#ifdef CONFIG_XEN_SHSTK
         ALTERNATIVE "", "mov $2, %eax; incsspd %eax", X86_FEATURE_XEN_SHSTK
+#endif
 
         call  check_wakeup_from_wait
 ret_from_intr:

base-commit: d5887c0decbd90e798b24ed696628645b04632fb

Signature · 1 line
2.30.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Andrew Cooper

Binutils older than 2.29 doesn't know INCSSPD.

Fixes 8e186f98ce0e ("x86: Use indirect calls in reset-stack infrastructure")
Quoted 27 lines

---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>

---
 xen/arch/x86/x86_64/entry.S | 2 ++
 1 file changed, 2 insertions(+)
xen/arch/x86/x86_64/entry.S +2 -0
index 461bbc355872..a4615e1ccbaf 100644
@@ -650,7 +650,9 @@ FUNC(continue_pv_domain)
          * JMPed to.  Drop the return address.
          */
         add   $8, %rsp
+#ifdef CONFIG_XEN_SHSTK
         ALTERNATIVE "", "mov $2, %eax; incsspd %eax", X86_FEATURE_XEN_SHSTK
+#endif
 
         call  check_wakeup_from_wait
 ret_from_intr:

base-commit: d5887c0decbd90e798b24ed696628645b04632fb

Signature · 1 line
2.30.2