Message ID | 16370492de5344ae8e1aab688261600491868f4e.1708962629.git.oleksii.kurochko@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Enable build of full Xen for RISC-V | expand |
On 26.02.2024 18:38, Oleksii Kurochko wrote: > From the unpriviliged doc: > No standard hints are presently defined. > We anticipate standard hints to eventually include memory-system spatial > and temporal locality hints, branch prediction hints, thread-scheduling > hints, security tags, and instrumentation flags for simulation/emulation. > > Also, there are no speculation execution barriers. > > Therefore, functions evaluate_nospec() and block_speculation() should > remain empty until a specific platform has an extension to deal with > speculation execution. What about array_index_mask_nospec(), though? No custom implementation, meaning the generic one will be used there? If that's the intention, then ... > Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com> Acked-by: Jan Beulich <jbeulich@suse.com> Jan
On Tue, 2024-02-27 at 08:38 +0100, Jan Beulich wrote: > On 26.02.2024 18:38, Oleksii Kurochko wrote: > > From the unpriviliged doc: > > No standard hints are presently defined. > > We anticipate standard hints to eventually include memory-system > > spatial > > and temporal locality hints, branch prediction hints, thread- > > scheduling > > hints, security tags, and instrumentation flags for > > simulation/emulation. > > > > Also, there are no speculation execution barriers. > > > > Therefore, functions evaluate_nospec() and block_speculation() > > should > > remain empty until a specific platform has an extension to deal > > with > > speculation execution. > > What about array_index_mask_nospec(), though? No custom > implementation, > meaning the generic one will be used there? If that's the intention, > then ... Yes, the generic one will be used. ~ Oleksii > > > Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com> > > Acked-by: Jan Beulich <jbeulich@suse.com> > > Jan >
Hi Oleksii, On 26/02/2024 17:38, Oleksii Kurochko wrote: > From the unpriviliged doc: > No standard hints are presently defined. > We anticipate standard hints to eventually include memory-system spatial > and temporal locality hints, branch prediction hints, thread-scheduling > hints, security tags, and instrumentation flags for simulation/emulation. > > Also, there are no speculation execution barriers. > > Therefore, functions evaluate_nospec() and block_speculation() should > remain empty until a specific platform has an extension to deal with > speculation execution. > > Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com> > --- > Changes in V5: > - new patch > --- > xen/arch/riscv/include/asm/nospec.h | 25 +++++++++++++++++++++++++ > 1 file changed, 25 insertions(+) > create mode 100644 xen/arch/riscv/include/asm/nospec.h > > diff --git a/xen/arch/riscv/include/asm/nospec.h b/xen/arch/riscv/include/asm/nospec.h > new file mode 100644 > index 0000000000..4fb404a0a2 > --- /dev/null > +++ b/xen/arch/riscv/include/asm/nospec.h > @@ -0,0 +1,25 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ New file should use the SPDX tag GPL-2.0-only. I guess this could be fixed on commit? Cheers,
On 29.02.2024 14:49, Julien Grall wrote: > On 26/02/2024 17:38, Oleksii Kurochko wrote: >> --- /dev/null >> +++ b/xen/arch/riscv/include/asm/nospec.h >> @@ -0,0 +1,25 @@ >> +/* SPDX-License-Identifier: GPL-2.0 */ > > New file should use the SPDX tag GPL-2.0-only. I guess this could be > fixed on commit? I wouldn't mind doing so. Jan
On Thu, 2024-02-29 at 15:01 +0100, Jan Beulich wrote: > On 29.02.2024 14:49, Julien Grall wrote: > > On 26/02/2024 17:38, Oleksii Kurochko wrote: > > > --- /dev/null > > > +++ b/xen/arch/riscv/include/asm/nospec.h > > > @@ -0,0 +1,25 @@ > > > +/* SPDX-License-Identifier: GPL-2.0 */ > > > > New file should use the SPDX tag GPL-2.0-only. I guess this could > > be > > fixed on commit? > > I wouldn't mind doing so. I would happy with that. Thanks. ~ Oleksii
On 26.02.2024 18:38, Oleksii Kurochko wrote: > --- /dev/null > +++ b/xen/arch/riscv/include/asm/nospec.h > @@ -0,0 +1,25 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/* Copyright (C) 2024 Vates */ > + > +#ifndef _ASM_GENERIC_NOSPEC_H > +#define _ASM_GENERIC_NOSPEC_H Btw, at the very last second I noticed the GENERIC in here, which I took the liberty to replace. But please be more careful when moving files around in the tree. Jan
diff --git a/xen/arch/riscv/include/asm/nospec.h b/xen/arch/riscv/include/asm/nospec.h new file mode 100644 index 0000000000..4fb404a0a2 --- /dev/null +++ b/xen/arch/riscv/include/asm/nospec.h @@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* Copyright (C) 2024 Vates */ + +#ifndef _ASM_GENERIC_NOSPEC_H +#define _ASM_GENERIC_NOSPEC_H + +static inline bool evaluate_nospec(bool condition) +{ + return condition; +} + +static inline void block_speculation(void) +{ +} + +#endif /* _ASM_GENERIC_NOSPEC_H */ + +/* + * Local variables: + * mode: C + * c-file-style: "BSD" + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */
From the unpriviliged doc: No standard hints are presently defined. We anticipate standard hints to eventually include memory-system spatial and temporal locality hints, branch prediction hints, thread-scheduling hints, security tags, and instrumentation flags for simulation/emulation. Also, there are no speculation execution barriers. Therefore, functions evaluate_nospec() and block_speculation() should remain empty until a specific platform has an extension to deal with speculation execution. Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com> --- Changes in V5: - new patch --- xen/arch/riscv/include/asm/nospec.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 xen/arch/riscv/include/asm/nospec.h