* [PATCH] arm/nospec: Make nospec helpers always_inline
@ 2026-10-06 10:31 Alejandro Vallejo
2026-10-06 10:45 ` Orzel, Michal
2026-10-06 13:50 ` Roger Pau Monné
0 siblings, 2 replies; 8+ messages in thread
From: Alejandro Vallejo @ 2026-10-06 10:31 UTC (permalink / raw)
To: xen-devel
Cc: Alejandro Vallejo, Stefano Stabellini, Julien Grall,
Bertrand Marquis, Volodymyr Babchuk, Michal Orzel
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 or -fno-early-inlining are passed.
Signed-off-by: Alejandro Vallejo <alejandro.garciavallejo@amd.com>
---
xen/arch/arm/include/asm/nospec.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xen/arch/arm/include/asm/nospec.h b/xen/arch/arm/include/asm/nospec.h
index 51c7aea4f4..b84f8dff45 100644
--- a/xen/arch/arm/include/asm/nospec.h
+++ b/xen/arch/arm/include/asm/nospec.h
@@ -4,12 +4,12 @@
#ifndef _ASM_ARM_NOSPEC_H
#define _ASM_ARM_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)
{
}
base-commit: 290959692726bed9a9404fbb151767dba9928c5b
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] arm/nospec: Make nospec helpers always_inline
2026-10-06 10:31 [PATCH] arm/nospec: Make nospec helpers always_inline Alejandro Vallejo
@ 2026-10-06 10:45 ` Orzel, Michal
2026-10-06 10:51 ` Andrew Cooper
2026-10-06 12:29 ` Alejandro Vallejo
2026-10-06 13:50 ` Roger Pau Monné
1 sibling, 2 replies; 8+ messages in thread
From: Orzel, Michal @ 2026-10-06 10:45 UTC (permalink / raw)
To: Alejandro Vallejo, xen-devel
Cc: Stefano Stabellini, Julien Grall, Bertrand Marquis,
Volodymyr Babchuk
On 06-Oct-26 12:31, 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 or -fno-early-inlining are passed.
>
> Signed-off-by: Alejandro Vallejo <alejandro.garciavallejo@amd.com>
Reviewed-by: Michal Orzel <michal.orzel@amd.com>
but this should be done for Arm, RISCV and PPC at once in which case you can
keep my tag for v2 # for Arm.
~Michal
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] arm/nospec: Make nospec helpers always_inline
2026-10-06 10:45 ` Orzel, Michal
@ 2026-10-06 10:51 ` Andrew Cooper
2026-10-06 12:21 ` Alejandro Vallejo
2026-10-06 12:29 ` Alejandro Vallejo
1 sibling, 1 reply; 8+ messages in thread
From: Andrew Cooper @ 2026-10-06 10:51 UTC (permalink / raw)
To: Orzel, Michal, Alejandro Vallejo, xen-devel
Cc: Andrew Cooper, Stefano Stabellini, Julien Grall, Bertrand Marquis,
Volodymyr Babchuk
On 06/10/2026 11:45 am, Orzel, Michal wrote:
>
> On 06-Oct-26 12:31, 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 or -fno-early-inlining are passed.
>>
>> Signed-off-by: Alejandro Vallejo <alejandro.garciavallejo@amd.com>
> Reviewed-by: Michal Orzel <michal.orzel@amd.com>
>
> but this should be done for Arm, RISCV and PPC at once in which case you can
> keep my tag for v2 # for Arm.
I previously had a patch series which made this all common, for these
kinds of reasons.
I think I'd prefer to kick that over the line, than to keep on taking
micro-bugfixes like this.
~Andrew
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] arm/nospec: Make nospec helpers always_inline
2026-10-06 10:51 ` Andrew Cooper
@ 2026-10-06 12:21 ` Alejandro Vallejo
0 siblings, 0 replies; 8+ messages in thread
From: Alejandro Vallejo @ 2026-10-06 12:21 UTC (permalink / raw)
To: Andrew Cooper, Orzel, Michal, xen-devel
Cc: Stefano Stabellini, Julien Grall, Bertrand Marquis,
Volodymyr Babchuk
On Tue Oct 6, 2026 at 12:51 PM CEST, Andrew Cooper wrote:
> On 06/10/2026 11:45 am, Orzel, Michal wrote:
> >
> > On 06-Oct-26 12:31, 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 or -fno-early-inlining are passed.
> >>
> >> Signed-off-by: Alejandro Vallejo <alejandro.garciavallejo@amd.com>
> > Reviewed-by: Michal Orzel <michal.orzel@amd.com>
> >
> > but this should be done for Arm, RISCV and PPC at once in which case you can
> > keep my tag for v2 # for Arm.
>
> I previously had a patch series which made this all common, for these
> kinds of reasons.
>
> I think I'd prefer to kick that over the line, than to keep on taking
> micro-bugfixes like this.
for reference:
https://lore.kernel.org/all/20240304161041.3465897-1-andrew.cooper3@citrix.com/
I wouldn't mind that, I can R-by it if you resend it. I'll still send a
v2 of this on the grounds that it's a strict improvement over existing
matters and might land faster.
Cheers,
Alejandro
>
> ~Andrew
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] arm/nospec: Make nospec helpers always_inline
2026-10-06 10:45 ` Orzel, Michal
2026-10-06 10:51 ` Andrew Cooper
@ 2026-10-06 12:29 ` Alejandro Vallejo
2026-10-07 12:00 ` Orzel, Michal
1 sibling, 1 reply; 8+ messages in thread
From: Alejandro Vallejo @ 2026-10-06 12:29 UTC (permalink / raw)
To: Orzel, Michal, xen-devel
Cc: Stefano Stabellini, Julien Grall, Bertrand Marquis,
Volodymyr Babchuk
On Tue Oct 6, 2026 at 12:45 PM CEST, Orzel, Michal wrote:
>
>
> On 06-Oct-26 12:31, 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 or -fno-early-inlining are passed.
> >
> > Signed-off-by: Alejandro Vallejo <alejandro.garciavallejo@amd.com>
> Reviewed-by: Michal Orzel <michal.orzel@amd.com>
>
> but this should be done for Arm, RISCV and PPC at once in which case you can
> keep my tag for v2 # for Arm.
Neither RISCV nor PPC implement nospec.h today. Should I considered the
R-by just settled for this patch?
Cheers,
Alejandro
>
> ~Michal
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] arm/nospec: Make nospec helpers always_inline
2026-10-06 10:31 [PATCH] arm/nospec: Make nospec helpers always_inline Alejandro Vallejo
2026-10-06 10:45 ` Orzel, Michal
@ 2026-10-06 13:50 ` Roger Pau Monné
1 sibling, 0 replies; 8+ messages in thread
From: Roger Pau Monné @ 2026-10-06 13:50 UTC (permalink / raw)
To: Alejandro Vallejo
Cc: xen-devel, Stefano Stabellini, Julien Grall, Bertrand Marquis,
Volodymyr Babchuk, Michal Orzel
On Tue, Oct 06, 2026 at 12:31:40PM +0200, 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 or -fno-early-inlining are passed.
FWIW, it's my understanding that -fno-early-inlining is not really
relevant here; it disables the early inlining pass, but the late(r)
one(s) is/are still present, so inlining will happen, just later in
the compilation process. -fno-inline is indeed relevant here.
Thanks, Roger.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] arm/nospec: Make nospec helpers always_inline
2026-10-06 12:29 ` Alejandro Vallejo
@ 2026-10-07 12:00 ` Orzel, Michal
2026-10-07 12:40 ` Alejandro Vallejo
0 siblings, 1 reply; 8+ messages in thread
From: Orzel, Michal @ 2026-10-07 12:00 UTC (permalink / raw)
To: Alejandro Vallejo, xen-devel
Cc: Stefano Stabellini, Julien Grall, Bertrand Marquis,
Volodymyr Babchuk
On 06-Oct-26 14:29, Alejandro Vallejo wrote:
> On Tue Oct 6, 2026 at 12:45 PM CEST, Orzel, Michal wrote:
>>
>>
>> On 06-Oct-26 12:31, 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 or -fno-early-inlining are passed.
>>>
>>> Signed-off-by: Alejandro Vallejo <alejandro.garciavallejo@amd.com>
>> Reviewed-by: Michal Orzel <michal.orzel@amd.com>
>>
>> but this should be done for Arm, RISCV and PPC at once in which case you can
>> keep my tag for v2 # for Arm.
>
> Neither RISCV nor PPC implement nospec.h today. Should I considered the
> R-by just settled for this patch?
I'm not sure I understand. You wrote that they don't implement the header
whereas I can see:
arch/riscv/include/asm/nospec.h
arch/ppc/include/asm/nospec.h
hence my remark to fix all at once.
~Michal
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] arm/nospec: Make nospec helpers always_inline
2026-10-07 12:00 ` Orzel, Michal
@ 2026-10-07 12:40 ` Alejandro Vallejo
0 siblings, 0 replies; 8+ messages in thread
From: Alejandro Vallejo @ 2026-10-07 12:40 UTC (permalink / raw)
To: Orzel, Michal, xen-devel
Cc: Stefano Stabellini, Julien Grall, Bertrand Marquis,
Volodymyr Babchuk
On Wed Oct 7, 2026 at 2:00 PM CEST, Orzel, Michal wrote:
>
>
> On 06-Oct-26 14:29, Alejandro Vallejo wrote:
> > On Tue Oct 6, 2026 at 12:45 PM CEST, Orzel, Michal wrote:
> >>
> >>
> >> On 06-Oct-26 12:31, 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 or -fno-early-inlining are passed.
> >>>
> >>> Signed-off-by: Alejandro Vallejo <alejandro.garciavallejo@amd.com>
> >> Reviewed-by: Michal Orzel <michal.orzel@amd.com>
> >>
> >> but this should be done for Arm, RISCV and PPC at once in which case you can
> >> keep my tag for v2 # for Arm.
> >
> > Neither RISCV nor PPC implement nospec.h today. Should I considered the
> > R-by just settled for this patch?
> I'm not sure I understand. You wrote that they don't implement the header
> whereas I can see:
> arch/riscv/include/asm/nospec.h
> arch/ppc/include/asm/nospec.h
> hence my remark to fix all at once.
Bah, I was on a completely different baseline than I should've been.
Even v1 doesn't apply cleanly.
Let me prep a proper v2 then.
Cheers,
Alejandro
>
> ~Michal
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-10-07 12:40 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-06 10:31 [PATCH] arm/nospec: Make nospec helpers always_inline Alejandro Vallejo
2026-10-06 10:45 ` Orzel, Michal
2026-10-06 10:51 ` Andrew Cooper
2026-10-06 12:21 ` Alejandro Vallejo
2026-10-06 12:29 ` Alejandro Vallejo
2026-10-07 12:00 ` Orzel, Michal
2026-10-07 12:40 ` Alejandro Vallejo
2026-10-06 13:50 ` Roger Pau Monné
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.