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

Re: [PATCH v2 2/3] riscv/nospec: Make nospec helpers always_inline





On 10/7/26 4:31 PM, Alejandro Vallejo wrote:
While today they don't implement fencing in a way that would block
speculation, once/if they do they'll absolutely need to be inlined, even
if -fno-inline is passed.

Signed-off-by: Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>
---
  xen/arch/riscv/include/asm/nospec.h | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/riscv/include/asm/nospec.h 
b/xen/arch/riscv/include/asm/nospec.h
index f9b0241c98..f9bba8b2bb 100644
--- a/xen/arch/riscv/include/asm/nospec.h
+++ b/xen/arch/riscv/include/asm/nospec.h
@@ -4,12 +4,12 @@
  #ifndef ASM__RISCV__NOSPEC_H
  #define ASM__RISCV__NOSPEC_H
-static inline bool evaluate_nospec(bool condition)
+static always_inline bool evaluate_nospec(bool condition)
  {
      return condition;
  }
-static inline void block_speculation(void)
+static always_inline void block_speculation(void)
  {
  }

LGTM:
 Reviewed-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>

Thanks!

~ Oleksii




 


Rackspace

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