All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] RISC-V: Add Bitmanip/Scalar Crypto HWCAP
@ 2022-04-30 13:48 ` Hongren (Zenithal) Zheng
  0 siblings, 0 replies; 12+ messages in thread
From: Hongren (Zenithal) Zheng @ 2022-04-30 13:48 UTC (permalink / raw)
  To: Palmer Dabbelt, Paul Walmsley, Albert Ou
  Cc: Atish Patra, Anup Patel, Eric Biederman, Kees Cook, linux-mm,
	linux-riscv, linux-kernel, linux-api, Michael Kerrisk, linux-man,
	Jiatai He

This patchset proposes a currently viable and forward
compatible way to expose the bitmanip/scalar crypto
capability of the platform to the userspace.

Currently viable refers to the property that hardware
platforms can easily modify the riscv,isa field in DT to
tell the kernel it has the capability. Note that QEMU
has already done so in its device tree.

Forward compatible refers to the property that userspace
can still detect the capability of the environment by
using HWCAP regardless of how the mechanism changes
below kernel in the future. I do know that it has not
been settled how to discover a capability, but I think
kernel has to offer some API after all, and HWCAP
is the preferred way among other mechanisms for now.

More discussion on userspace discovering
can be found on my PR to openssl
https://github.com/openssl/openssl/pull/18197

Hongren (Zenithal) Zheng (3):
  RISC-V: add Bitmanip/Scalar Crypto parsing from DT
  RISC-V: uapi: add HWCAP for Bitmanip/Scalar Crypto
  RISC-V: HWCAP: parse Bitmanip/Scalar Crypto HWCAP from DT

 arch/riscv/include/asm/elf.h        |  2 +
 arch/riscv/include/asm/hwcap.h      | 16 ++++++
 arch/riscv/include/uapi/asm/hwcap.h | 22 ++++++++
 arch/riscv/kernel/cpu.c             | 14 +++++
 arch/riscv/kernel/cpufeature.c      | 79 +++++++++++++++++++++++++----
 5 files changed, 123 insertions(+), 10 deletions(-)

-- 
2.35.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-05-04  2:40 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-30 13:48 [PATCH 0/3] RISC-V: Add Bitmanip/Scalar Crypto HWCAP Hongren (Zenithal) Zheng
2022-04-30 13:48 ` Hongren (Zenithal) Zheng
2022-04-30 13:50 ` [PATCH 1/3] RISC-V: add Bitmanip/Scalar Crypto parsing from DT Hongren (Zenithal) Zheng
2022-04-30 13:50   ` Hongren (Zenithal) Zheng
2022-05-03 23:21   ` Heiko Stuebner
2022-05-03 23:21     ` Heiko Stuebner
2022-05-04  2:39     ` Hongren (Zenithal) Zheng
2022-05-04  2:39       ` Hongren (Zenithal) Zheng
2022-04-30 13:51 ` [PATCH 2/3] RISC-V: uapi: add HWCAP for Bitmanip/Scalar Crypto Hongren (Zenithal) Zheng
2022-04-30 13:51   ` Hongren (Zenithal) Zheng
2022-04-30 13:51 ` [PATCH 3/3] RISC-V: HWCAP: parse Bitmanip/Scalar Crypto HWCAP from DT Hongren (Zenithal) Zheng
2022-04-30 13:51   ` Hongren (Zenithal) Zheng

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.