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

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


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>
  • Date: Wed, 7 Oct 2026 16:31:07 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=QpzggtEvc89d4Zq2S3JWjnl+sYf63o/UJpx7GfD7Wis=; b=PUOP9ch/+RLDxy39iRBbzHpwwBRrlxWga3fr4oGGt8uUWFBsIyqnJ+yfvwq7galIYNHrddW74TlRUrBiesyQX2a18niiXXYbijdlipjynLRVnsgkyledYymS5M7cgYkhL849jjnnBuRCXZPH8aiu9iM5kTUwx3GokI+Ly3hK0HaojQQ58RsPus4WOPZv/Ec4CkC4pDGegVeiHPXnDJNwYayrCQfiFbRujQ6mjz0XbMOzqA1HL6ynv14tNa2LOeddzrWHpWmCCves+I/gVERTKwtySJlPPQ6jq3CZVABnAc4MZxakvkeAbA9i1HWFAtPgTwlGzfmD9IUqyhgFMXJQbA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=OzHWDshsU1OkUEIpjeqoO493UorzG7w+6vX6oeQv35BSr0LT/M06rQCHiqtlF51q3hiDOumOpYGicA9i8+pgcwGt+GQdtsqBVGB0Bx12WUESQAvIpkzOAcxrfxo/fW59KOdfFv7Nvo4oIsFqWNLvjDvEQto+E2hhFpnhbMHDuMoIOyaPMwSfgnrml5yv4qyJc0uAZJAgEsqtQmdlPLQV/kKXzGMsHR45h8lnS/N3vXiXYTbp1Oi9MV0a1VK1Ohtj1WAvid5EN/VadUDH8q7JkwVHDU2aMKLbvkDrjkQcKTOMY7NucNgiKOdKsuwGCb+7KfveAim6Kwx2/CD5y0yv0w==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=amd.com header.i="@amd.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Cc: Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>, Alistair Francis <alistair.francis@xxxxxxx>, Connor Davis <connojdavis@xxxxxxxxx>, "Oleksii Kurochko" <oleksii.kurochko@xxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, "Julien Grall" <julien@xxxxxxx>, Roger Pau Monné <roger@xxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Wed, 07 Oct 2026 14:32:00 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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)
 {
 }
 
-- 
2.43.0




 


Rackspace

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