Re: [PATCH] xen/nospec: Remove unreachable code

2024-04-10 Thread Stefano Stabellini
On Wed, 10 Apr 2024, Andrew Cooper wrote: > When CONFIG_SPECULATIVE_HARDEN_LOCK is active, this reads: > > static always_inline bool lock_evaluate_nospec(bool condition) > { > return arch_lock_evaluate_nospec(condition); > return condition; > } > > Insert an #else to take out th

Re: [PATCH] xen/nospec: Remove unreachable code

2024-04-10 Thread Luca Fancellu
> On 10 Apr 2024, at 20:26, Andrew Cooper wrote: > > When CONFIG_SPECULATIVE_HARDEN_LOCK is active, this reads: > > static always_inline bool lock_evaluate_nospec(bool condition) > { > return arch_lock_evaluate_nospec(condition); > return condition; > } > > Insert an #else to ta

[PATCH] xen/nospec: Remove unreachable code

2024-04-10 Thread Andrew Cooper
When CONFIG_SPECULATIVE_HARDEN_LOCK is active, this reads: static always_inline bool lock_evaluate_nospec(bool condition) { return arch_lock_evaluate_nospec(condition); return condition; } Insert an #else to take out the second return. Fixes: 7ef0084418e1 ("x86/spinlock: introd