[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250821140131.225756-1-pincheng.plct@isrc.iscas.ac.cn>
Date: Thu, 21 Aug 2025 22:01:26 +0800
From: Pincheng Wang <pincheng.plct@...c.iscas.ac.cn>
To: paul.walmsley@...ive.com,
palmer@...belt.com,
aou@...s.berkeley.edu,
alex@...ti.fr,
robh@...nel.org,
krzk+dt@...nel.org,
conor+dt@...nel.org,
anup@...infault.org,
pbonzini@...hat.com,
shuah@...nel.org,
cyan.yang@...ive.com,
cleger@...osinc.com,
charlie@...osinc.com,
cuiyunhui@...edance.com,
samuel.holland@...ive.com,
namcao@...utronix.de,
jesse@...osinc.com,
inochiama@...il.com,
yongxuan.wang@...ive.com,
ajones@...tanamicro.com,
parri.andrea@...il.com,
mikisabate@...il.com,
yikming2222@...il.com,
thomas.weissschuh@...utronix.de
Cc: linux-riscv@...ts.infradead.org,
linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org,
devicetree@...r.kernel.org,
kvm@...r.kernel.org,
kvm-riscv@...ts.infradead.org,
linux-kselftest@...r.kernel.org,
pincheng.plct@...c.iscas.ac.cn
Subject: [PATCH v1 RESEND 0/5] RISC-V: Add Zilsd/Zclsd support in hwprobe and KVM
Hi all,
This is a RESEND of v1 to correct a mistake in the CC list.
There are **no changes in code** compared to the previous v1.
This patch series adds support for the recently ratified Zilsd
(Load/Store pair instructions) and Zclsd (Compressed Load/Store pair
instructions) extensions to the RISC-V Linux kernel. It covers device tree
binding,ISA string parsing, hwprobe exposure, KVM guest handling and selftests.
Zilsd and Zclsd allow more efficient memory access sequences on RV32. My
goal is to enable glibc and other user-space libraries to detect these
extensions via hwprobe and make use of them for optimized
implementations of common routines. To achieve this, the Linux kernel
needs to recognize and expose the availability of these extensions
through the device tree bindings, ISA string parsing and hwprobe
interfaces. KVM support is also required to correctly virtualize these
features for guest environments.
The series is structured as follows:
- Patch 1: Add device tree bindings documentation for Zilsd and Zclsd
- Patch 2: Extend RISC-V ISA extension string parsing to recognize them.
- Patch 3: Export Zilsd and Zclsd via riscv_hwprobe
- Patch 4: Allow KVM guests to use them.
- Patch 5: Add KVM selftests.
This series of patches is a preparatory step toward enabling user-space
optimizations in glibc that leverage Zilsd and Zclsd, by providing the
necessary kernel-side support.
Please review, and let me know if any adjustments are needed.
Thanks,
Pincheng Wang
Pincheng Wang (5):
dt-bidings: riscv: add Zilsd and Zclsd extension descriptions
riscv: add ISA extension parsing for Zilsd and Zclsd:
riscv: hwprobe: export Zilsd and Zclsd ISA extensions
riscv: KVM: allow Zilsd and Zclsd extensions for Guest/VM
KVM: riscv: selftests: add Zilsd and Zclsd extension to get-reg-list
test
Documentation/arch/riscv/hwprobe.rst | 8 ++++
.../devicetree/bindings/riscv/extensions.yaml | 39 +++++++++++++++++++
arch/riscv/include/asm/hwcap.h | 2 +
arch/riscv/include/uapi/asm/hwprobe.h | 2 +
arch/riscv/include/uapi/asm/kvm.h | 2 +
arch/riscv/kernel/cpufeature.c | 24 ++++++++++++
arch/riscv/kernel/sys_hwprobe.c | 2 +
arch/riscv/kvm/vcpu_onereg.c | 2 +
.../selftests/kvm/riscv/get-reg-list.c | 6 +++
9 files changed, 87 insertions(+)
--
2.39.5
Powered by blists - more mailing lists