RISC-V: Require H for hinval.vvma and hinval.gvma
Adds checks to binutils to ensure RISC-V hinval.vvma and hinval.gvma instructions are only supported when both Svinval and H extensions are present.
This patch series updates binutils to enforce that the RISC-V hinval.vvma and hinval.gvma instructions are only recognized and supported when both the Svinval and H extensions are implemented. This aligns with the RISC-V Privileged Specification. The changes involve modifying the riscv_multi_subset_supports and riscv_multi_subset_supports_ext functions in bfd/elfxx-riscv.c, adding a new instruction class INSN_CLASS_SVINVAL_AND_H in include/opcode/riscv.h, and updating the opcode definitions in opcodes/riscv-opc.c. New test cases are also added to the gas test suite to verify this requirement.
- proposer
Submits patches to enforce RISC-V Svinval and H extension requirements for hinval.vvma and hinval.gvma instructions.
“According to the RISC-V Privileged Specification, the Svinval instructions hinval.vvma and hinval.gvma are only available when both the Svinval and H extensions are implemented.”
In Details
This patch series modifies binutils to correctly handle the hinval.vvma and hinval.gvma instructions for the RISC-V architecture. It enforces the requirement that these instructions are only valid when both the Svinval and H extensions are present, as per the RISC-V Privileged Specification. Changes are made across BFD, gas, and opcodes components, including the addition of a new instruction class and comprehensive test suite updates.
- RISC-V
- An open-source instruction set architecture (ISA) based on Reduced Instruction Set Computing principles.
- Svinval
- A RISC-V extension related to invalidating virtual memory mappings.
- H extension
- A RISC-V extension that provides hypervisor support, which is required for certain privileged instructions like hinval.vvma and hinval.gvma.
- hinval.vvma
- A specific RISC-V instruction for invalidating virtual memory address mappings, requiring Svinval and H extensions.
- hinval.gvma
- A specific RISC-V instruction for invalidating global virtual memory address mappings, requiring Svinval and H extensions.
- bfd
- Binary File Descriptor library, part of binutils, used to abstract different object file formats.
- gas
- The GNU Assembler, part of binutils.