[PATCH v2 0/3] riscv: cpufeature: Add Supm extension id and validation

Guodong Xu guodong at riscstar.com
Sat Jan 24 17:36:05 PST 2026


Supm as an extension indicates pointer-masking support for user mode
(U-mode). It relies on Ssnpm or Smnpm for the underlying hardware
implementation.

Major change in v2 is added dependency check for Supm in bindings.

As a ratified feature, define a dedicated RISCV_ISA_EXT_ id for Supm.
However, since Supm is targeting U-mode, it should not be added into
devicetrees that describe hardware running privileged system softwares.

Supm is implied by Ssnpm (S-mode) or Smnpm (M-mode). Add parsing logic
and validation to ensure this dependency.

When CONFIG_RISCV_ISA_SUPM is disabled, Supm validation will fail
regardless of whether Ssnpm or Smnpm exist. This patchset doesn't change
this behavior.

Prior discussions about how Supm should be handled can be found in Links
[1] and [2].

Link: https://lore.kernel.org/lkml/20260101-legume-engraved-0fae8282cfbe@spud/#r [1]
Link: https://lore.kernel.org/all/4ebbe14b-2579-4ba6-808d-d50c24641d04@sifive.com/#r [2]

Changes in v2:
- Patch 1: Added Supm dependency check.
- Patch 2: Updated the SUPM id number due to rebase conflict.
           Added Reviewed-by from Conor.
- Patch 3: Updated the Fixes tag.
           Added Acked-by from Conor.
- Link to v1: https://lore.kernel.org/r/20260116-supm-ext-id-v1-0-5fcf778ba4a6@riscstar.com

Signed-off-by: Guodong Xu <guodong at riscstar.com>
---
To: Rob Herring <robh at kernel.org>
To: Krzysztof Kozlowski <krzk+dt at kernel.org>
To: Conor Dooley <conor+dt at kernel.org>
To: Paul Walmsley <pjw at kernel.org>
To: Palmer Dabbelt <palmer at dabbelt.com>
To: Albert Ou <aou at eecs.berkeley.edu>
To: Alexandre Ghiti <alex at ghiti.fr>
To: Andrew Jones <ajones at ventanamicro.com>
To: Conor Dooley <conor.dooley at microchip.com>
Cc: Paul Walmsley <paul.walmsley at sifive.com>
Cc: Conor Dooley <conor at kernel.org>
Cc: devicetree at vger.kernel.org
Cc: linux-riscv at lists.infradead.org
Cc: linux-kernel at vger.kernel.org

---
Guodong Xu (3):
      dt-bindings: riscv: Add Supm extension description
      riscv: cpufeature: Add ISA extension parsing for Supm
      riscv: cpufeature: Clarify ISA spec version for canonical order

 .../devicetree/bindings/riscv/extensions.yaml      | 27 +++++++++++++++
 arch/riscv/include/asm/hwcap.h                     |  3 +-
 arch/riscv/kernel/cpufeature.c                     | 38 ++++++++++++++++++++--
 3 files changed, 63 insertions(+), 5 deletions(-)
---
base-commit: 4af4e95edc37ae54f64cbd75b46f16ce15f3a6b8
change-id: 20260116-supm-ext-id-826e8da4c4b5

Best regards,
-- 
Guodong Xu <guodong at riscstar.com>




More information about the linux-riscv mailing list