[PATCH] x86/entry: Fix build with older toolchains

Andrew Cooper posted 1 patch 3 weeks, 2 days ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20240409203951.577241-1-andrew.cooper3@citrix.com
xen/arch/x86/x86_64/entry.S | 2 ++
1 file changed, 2 insertions(+)
[PATCH] x86/entry: Fix build with older toolchains
Posted by Andrew Cooper 3 weeks, 2 days ago
Binutils older than 2.29 doesn't know INCSSPD.

Fixes: 8e186f98ce0e ("x86: Use indirect calls in reset-stack infrastructure")
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
---
 xen/arch/x86/x86_64/entry.S | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/arch/x86/x86_64/entry.S b/xen/arch/x86/x86_64/entry.S
index 461bbc355872..a4615e1ccbaf 100644
--- a/xen/arch/x86/x86_64/entry.S
+++ b/xen/arch/x86/x86_64/entry.S
@@ -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
-- 
2.30.2


Re: [PATCH] x86/entry: Fix build with older toolchains
Posted by Stefano Stabellini 3 weeks, 2 days ago
On Tue, 9 Apr 2024, Andrew Cooper wrote:
> Binutils older than 2.29 doesn't know INCSSPD.
> 
> Fixes: 8e186f98ce0e ("x86: Use indirect calls in reset-stack infrastructure")
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>


> ---
> CC: Jan Beulich <JBeulich@suse.com>
> CC: Roger Pau Monné <roger.pau@citrix.com>
> ---
>  xen/arch/x86/x86_64/entry.S | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/xen/arch/x86/x86_64/entry.S b/xen/arch/x86/x86_64/entry.S
> index 461bbc355872..a4615e1ccbaf 100644
> --- a/xen/arch/x86/x86_64/entry.S
> +++ b/xen/arch/x86/x86_64/entry.S
> @@ -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
> -- 
> 2.30.2
> 
>