Skip to contentSkip to conversation

named CPU models for ARM64 on KVM

RFC PATCH In review Shaju Abraham 3 participants 36 messages May 13 – May 28

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover named CPU models for ARM64 on KVM

Hi All,

This RFC introduces "named" CPU models for ARM64 KVM guests. This is foundational for cross-host live migration and management-stack control over individual CPU features exposed to the guest.

TL;DR Examples:
# Boot with Grace CPU model
qemu-system-aarch64 -cpu grace-v1 -machine virt,accel=kvm ...

# Grace with a feature disabled qemu-system-aarch64 -cpu grace-v1,feat_SHA1=off ...

# Host passthrough with individual feature control qemu-system-aarch64 -cpu host,feat_AES=aes ...

# Neoverse v2 on Grace.
qemu-system-aarch64 -cpu neoverse-v2-v1

# Migration from Grace to Graviton3 (TBD)
qemu-system-aarch64 -cpu neoverse-v1-v1 ...

Relationship with Auger/Huck's customizable host model [1]:
We have been working on this series in parallel with [1]. Eric Auger and Cornelia Huck's series [1] exposes raw SYSREG_<REG>_<FIELD> uint64 properties on -cpu host, providing the essential low-level knobs for ID register customization. This RFC builds on the same KVM capability and can be layered on top of [1]:
- Human-readable property names: feat_AES=pmull instead of SYSREG_ID_AA64ISAR0_EL1_AES=2, with arch-defined named values validated at set time.
- Default values and forward compatibility: CPU models start from a known-zero baseline rather than the host view, so new fields/registers introduced in future kernels do not silently leak into existing models.
- Named CPU models with hierarchical inheritance: grace-v1,

    neoverse-v2-v1, etc.

The two series can coexist; this series can be rebased on top of [1].

[1] https://lore.kernel.org/qemu-devel/[email protected]/

Problems with defining "named" CPU models for ARM64 KVM guests:
* Features are not single CPUID bits. They are mostly multi-bit fields encoding version/level instead of just presence. A single field encodes multiple ARM ARM defined features (FEAT_s) at different thresholds.
* KVM does not allow all registers and fields to be modified for a guest. Some fields KVM does not virtualise at all (SME) or only support host values (BRPs, CWG, etc.). This is evolving and differs between kernel versions.
* ARM does not have a single natural granularity for CPU models unlike x86. ARM has architecture, reference core and SoC levels each becoming more granular.
* ARM has dozens of vendors and it will be tricky to maintain models for all of them.
* Previous designs started from the host values and then subtracted undesirable features. This is not forward-compatible; the design should work when a new ID register or field is introduced.

With the above problems in mind, the design has 3 layers:

1. ARM ID Register Field Table:
- This layer maintains all architecturally defined ID registers and ID register fields. It includes:
* Field name
* Field shift
* Field length
* Safe-value tag: LOWER, HIGHER, HIGHER_OR_ZERO, SIGNED_LOWER, EXACT, ANY
This will be used to validate user-provided values during CPU realization time against the host's value. I.e., if the host only supports "aes", a CPU model that sets "pmull" should be rejected.
* Default value: The value to which the field is reset. This gives CPU models a clean cpu.isar.idregs[] baseline instead of the host view provided by the kernel, as in previous designs. This also complements the forward-compatibility story. Given the "default" values, higher levels need not worry about new fields/registers being introduced.
* Architecturally defined named values like "off", "aes", "pmull", etc.
* These values are derived from the kernel's ftr_bits array and tools/sysreg file.
E.g:

IDREG_START(ID_AA64ISAR0) IDREG_FIELD_START(ID_AA64ISAR0, AES, 4, 4, LOWER, 0) IDREG_FIELD_ARCH_VAL(0b0000, "off") IDREG_FIELD_ARCH_VAL(0b0001, "aes") IDREG_FIELD_ARCH_VAL(0b0010, "pmull") IDREG_FIELD_END(ID_AA64ISAR0, AES)
....
IDREG_END(ID_AA64ISAR0)

- This layer is the single source of truth for ARM64 ID registers. The default values and safe-value tags are manually derived from the kernel's ftr_bits array. Other boilerplate and arch-defined values are script-generated.

- AArch32 ID registers are added with a single field so they can be zeroed out on hosts that support AArch32.

- This layer also defines helpers for higher layers to extract and manipulate ID register fields.
* arm_idregs_reset_to_defaults(): Reset all ID registers to their default values.
* arm_idreg_field_read/write(): Read the value of an ID register field.
* arm_arch_val_name/from_name(): Look up the arch-defined name for a numeric field value.
* ...

- This layer creates the following tables using X-macro expansion:
* arm_idregs[]: Array of ID register descriptors.
* arm_field_locs[]: Array of field location descriptors. (fieldIDx -> registerIndex, fieldIndex)
* ...

- The ArmIdReg struct also includes a writable_mask to track which bits are writable by KVM. This is populated at runtime during scratch VM creation, and is further used to validate that only the writable bits are modified by the CPU model.

2. ARM Properties Layer:
A small property layer on top of the ID Register Field table is defined. This series defines two types of properties with plans for one more in the future:
- Single field properties: These represent ARM FEAT_X features that correspond to a single ID register field. Example: feat_AES, feat_SHA2, etc.

The property name is set as "feat_<FieldName>" and possible values are the arch-defined named values. This can be further categorized into:
* STRING: multi-bit fields (>=2 bits) with arch-defined named values, example: feat_AES, feat_SHA2, etc.
* BOOLEAN: 1-bit fields only (true/false)
example: hw_prop_IDC, hw_prop_DIC, etc.
* NUMERIC: IDREG_ANY fields with no named values (raw integer)
example: hw_prop_BS, hw_prop_DZP, etc.

String property values are validated against the arch-defined named values.

ID register fields that are not covered by single field properties are also exposed as a property named hw_prop_FieldName. These are usually implementation-defined values like cache geometry, debug counter widths, etc. (CTR_EL0.*, DCZID_EL0.*, etc.)
Example: hw_prop_BS, hw_prop_DZP, etc.

Single field properties are defined as:

ARM_PROP("prop_name", type, reg, field) Example:
ARM_PROP("feat_AES", STRING, ID_AA64ISAR0, AES)

* Validation based on safe-value tags is yet to be implemented.

- Fractional properties: These represent ARM FEAT_X features that use two fields (base + frac) across registers. Example: feat_CSV2, feat_MPAM, etc.

The property name is set as "feat_<BaseFieldName>" and possible values are the arch-defined string values like "0.0", "1.0", "1.1", etc.

Fractional properties are defined as:
ARM_FRACTIONAL_PROP("prop_name", base_reg, base_field, frac_reg, frac_field) Example:
ARM_FRACTIONAL_PROP("feat_CSV2", ID_AA64PFR0, CSV2, ID_AA64PFR1, CSV2_FRAC)

When a fractional property is set, both the base field and frac field values are set to the corresponding values.
E.g: feat_CSV2=1.1 will set ID_AA64PFR0.CSV2=1 and ID_AA64PFR1.CSV2_FRAC=1.

- Composite properties (planned for v2):
These will act as master boolean switches that control a list of fields. Example: pauth, sve, etc. Setting sve=on with a named model will set all the SVE-related fields (ID_AA64ZFR0_EL1.*) along with sveNNN vector-length. Similarly, setting pauth=on will set APA, GPA, API, GPA3, GPI, GPA3 fields based on the named model.

- cpu_revision, cpu_partnum, etc. properties are introduced to expose MIDR, REVIDR, AIDR fields.

Exceptions to the property naming are made for ID_AA64PFR0_EL1.ELx fields, which are named elx_mode.

This series defines over 130 single field properties plus 4 fractional properties. All properties work with -cpu host also.

All properties change the cpu.isar.idregs[] values which are later written back to KVM at the end of kvm_arch_init_vcpu().

* The arch-defined named values and property names can be iterated until they make sense.

3. ARM CPU Model Hierarchy:

A small named model layer is defined on top of the properties. An ARM named CPU model defines a list of property values and a parent model. A child model naturally inherits all the properties from its parent and can override them when needed.

The initial model hierarchy shipped here is:

    kvm-base-v1                  KVM-imposed quirks
      arm-v8_4-a-v1              ARMv8.4-A architectural mandate
          neoverse-v1-v1         Neoverse V1

graviton3-v1 AWS Graviton3
arm-v9_0-a-v1 ARMv9.0-A architectural deltas on top of ARM-v8_4-a-v1
neoverse-v2-v1 Neoverse V2
grace-v1 NVIDIA Grace

(kvm-base-v1 and arm-vX are not meant to be realizable unless the
user provides values for implementation-defined fields)

So for example, grace-v1 defines Crypto fields and CTR_EL0.IDC/DIC on top of neoverse-v2-v1, which leaves those fields vendor-configurable.

The hierarchy reflects a deliberate trade-off:
- Architecture-level models (arm-v8_4-a-v1) maximize migration compatibility but lack implementation-defined values.
- Reference-core models (neoverse-v2-v1) enable migration across SoCs sharing the same core design.
- SoC models (grace-v1) expose the full hardware feature set but limit migration to hosts with the same SoC.

At model realization time,
1. a clean slate of cpu.isar.idregs[] is created using arm_idregs_reset_to_defaults().
2. Then, a model's full parent-chain is walked and all properties are applied in order from parent to child.
3. Finally, kvm_arm_writeback_idregs() compares the model's desired ID-register values against the host-provided cpreg snapshot and writes back the writable bits, warning on any non-writable difference.

Models will follow a monotonic versioning convention (grace-v1, grace-v2, ...) mirroring x86's scheme.

* Please take the CPU model property values with a grain of salt. They are added based on what the guest-visible values are with "host" model on available hardware.

Benefits of this design:
- General benefits that come with properties and named CPU models, like cross-host live migration, management-stack control over feature exposure, etc.
- Forward compatibility: when a new ID register or field is introduced, CPU models need not change; during realization they will be populated with the default values. Only ID register/field information needs to be added to the field table.
- As CPU models are hierarchical, defining a new model is much easier.
- The property names and values are self-documenting.

NOTE: ~2200 of the ~3300 added lines are declarative (field table, model definitions, properties, etc.)

Tested with KVM on an NVIDIA Grace host.

Relationship with existing code base:
- It does not change any TCG-based code paths.
- For KVM host passthrough it just adds property support.
- Does not change any existing properties or other code paths.
- Can layer on top of the SYSREG_ property series [1].

Planned Follow-ups:
- Composite properties with handling of sve, pauth for named models.
- CLIDR_EL1 and CCSIDR_EL1 handling.
- Safe-value based validation logic.
- QMP commands like query-cpu-model-expansion are not hooked yet. Blockers and supported values (calculated using safe-value tags and runtime KVM writable masks) will be reported through them. E.g. libvirt could report:
<property name='feat_AES' type='string' value='pmull'
supports='off,aes,pmull'/>
and:
<cpu type='kvm' name='nvidia-grace-v1'
typename='arm-nvidia-grace-v1-arm-cpu' usable='no'>
<blocker name='feat_AES'/>
</cpu>

- DCZID_EL0 handling.

Out of Scope:
- Inter-feature dependencies like FP <--> AdvSIMD, SM3 <--> SM4, etc.

Appendix: KVM Non-writable fields (kernel 6.18):

These fields pass the host value through to the guest unmodified on 6.18; trying to override them get a warning from kvm_arm_writeback_idregs() and the slot retains the host value:

   #   Field                       #   Field
  ---  -----------------------    ---  -----------------------
   1   ID_AA64PFR0.FP              10  ID_AA64MMFR2.NV
   2   ID_AA64PFR0.AdvSIMD         11  ID_AA64MMFR2.CCIDX
   3   ID_AA64MMFR0.ASIDBITS       12  ID_AA64MMFR4.E2H0
   4   ID_AA64MMFR1.XNX            13  ID_AA64DFR0.CTX_CMPs
   5   ID_AA64MMFR1.VH             14  ID_AA64DFR0.BRPs
   6   ID_AA64MMFR1.VMIDBits       15  CTR_EL0.CWG
   7   ID_AA64MMFR2.EVT            16  CTR_EL0.ERG
   8   ID_AA64MMFR2.FWB            17  DCZID_EL0.*
   9   ID_AA64MMFR2.IDS

This list shifts with the kernel version. The runtime probe via KVM_ARM_GET_REG_WRITABLE_MASKS is authoritative.

Warm Regards,
Shaju, Khushit

Khushit Shah (1):
target/arm/kvm: enable writable implementation ID registers

Shaju Abraham (12):
target/arm: named_cpu_model: define containers for ID registers and
fields
target/arm: named_cpu_model: Add ID Register Fields target/arm: named_cpu_model: initialise additional sysregs target/arm: named_cpu_model: generate tables for Arm64 ID registers
and fields
target/arm: named_cpu_model: replace FIELD macro with IDREG_FIELD target/arm: named_cpu_model: data-structures required for the ARM
property layer.
target/arm: named_cpu_model: define ARM properties target/arm: named_cpu_model: generate arm_cpu_props[] table target/arm: named_cpu_model: Add ID register field helper functions target/arm: named_cpu_model: Register Arm64 properties for host model target/arm: named_cpu_model: introduce named CPU models for selected
CPUs
target/arm: named_cpu_model: writeback modified ID registers to KVM

 hw/arm/virt.c                   |    8 +
 target/arm/arm-cpu-frac.inc.h   |   34 +
 target/arm/arm-cpu-models.c     |  214 ++++
 target/arm/arm-cpu-models.h     |   43 +
 target/arm/arm-cpu-props.c      |  259 +++++
 target/arm/arm-cpu-props.h      |   36 +
 target/arm/arm-cpu-props.inc.h  |  180 ++++
 target/arm/arm-v8_4-a-v1.inc.h  |   22 +
 target/arm/arm-v9_0-a-v1.inc.h  |   28 +
 target/arm/cpu-features.h       |  232 +----
 target/arm/cpu-idregs.c         |  232 +++++
 target/arm/cpu-idregs.h         |  132 +++
 target/arm/cpu-idregs.h.inc     | 1724 +++++++++++++++++++++++++++++++
 target/arm/cpu-sysregs.h.inc    |    5 +
 target/arm/cpu64.c              |    3 +-
 target/arm/grace-v1.inc.h       |   17 +
 target/arm/graviton3-v1.inc.h   |   16 +
 target/arm/kvm-base-v1.inc.h    |   13 +
 target/arm/kvm.c                |  167 ++-
 target/arm/meson.build          |    7 +-
 target/arm/neoverse-v1-v1.inc.h |   64 ++
 target/arm/neoverse-v2-v1.inc.h |   64 ++
 target/arm/trace-events         |    1 +
 23 files changed, 3284 insertions(+), 217 deletions(-)
 create mode 100644 target/arm/arm-cpu-frac.inc.h
 create mode 100644 target/arm/arm-cpu-models.c
 create mode 100644 target/arm/arm-cpu-models.h
 create mode 100644 target/arm/arm-cpu-props.c
 create mode 100644 target/arm/arm-cpu-props.h
 create mode 100644 target/arm/arm-cpu-props.inc.h
 create mode 100644 target/arm/arm-v8_4-a-v1.inc.h
 create mode 100644 target/arm/arm-v9_0-a-v1.inc.h
 create mode 100644 target/arm/cpu-idregs.c
 create mode 100644 target/arm/cpu-idregs.h
 create mode 100644 target/arm/cpu-idregs.h.inc
 create mode 100644 target/arm/grace-v1.inc.h
 create mode 100644 target/arm/graviton3-v1.inc.h
 create mode 100644 target/arm/kvm-base-v1.inc.h
 create mode 100644 target/arm/neoverse-v1-v1.inc.h
 create mode 100644 target/arm/neoverse-v2-v1.inc.h

--
2.52.0

#1 lore raw

RFC PATCH 1/13 target/arm: named_cpu_model: define containers for ID registers and fields

Define data structures for mapping the ARM ID registers and ID register fields.

---
 target/arm/cpu-idregs.h | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 target/arm/cpu-idregs.h
target/arm/cpu-idregs.h new file +41 -0
new file mode 100644
index 0000000000..403190cbd7
@@ -0,0 +1,41 @@
+/*
+ *   ARM ID register field table -- shared declarations.
+ *
+ *   SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#ifndef CPU_IDREGS_H
+#define CPU_IDREGS_H
+
+typedef enum ArmIdRegSafeRule {
+    IDREG_SAFE_LOWER,
+    IDREG_SAFE_HIGHER,
+    IDREG_SAFE_HIGHER_OR_ZERO,
+    IDREG_SAFE_SIGNED_LOWER,
+    IDREG_SAFE_EXACT,
+    IDREG_SAFE_ANY,
+} ArmIdRegSafeRule;
+
+typedef struct ArmIdRegArchVal {
+    uint64_t value;
+    const char *name;
+} ArmIdRegArchVal;
+
+typedef struct ArmIdRegField {
+    const char *name;
+    uint32_t shift;
+    uint32_t length;
+    ArmIdRegSafeRule safe_rule;
+    uint64_t default_val;
+    ArmIdRegArchVal *arch_vals;
+    uint32_t arch_vals_count;
+} ArmIdRegField;
+
+typedef struct ArmIdReg {
+    const char *name;
+    struct ArmIdRegField *fields;
+    uint32_t fields_count;
+} ArmIdReg;
+
+
+#endif /* CPU_IDREGS_H */
Signature · 1 line
2.52.0
#2 lore raw

RFC PATCH 2/13 target/arm: named_cpu_model: Add ID Register Fields

In reply to Shaju Abraham

Add a declarative description of every architecturally defined field in the Arm64 ID registers in cpu-idregs.h.inc file. This file will be included multiple times with different definitions to build the per-field arch values, per-register field descriptor arrays, arm-idregs table etc. The architecturely defined values for each ID register field is extracted from kernel's arch/arm64/tools/sysreg file. The safe-value tags and default values are derived from the kernel's ftr_bits array. Aarch32 ID registers are added with dummy field so they can be defaulted to 0 by later commits.

X-macro structure:
IDREG_START(REG)
IDREG_FIELD_START(REG, FIELD, SHIFT, LENGTH, SAFE_RULE, DEFAULT_VAL) IDREG_FIELD_ARCH_VAL(VALUE, NAME)
...
IDREG_FIELD_END(REG, FIELD)
...
IDREG_END(REG)

---
 target/arm/cpu-idregs.h.inc | 1724 +++++++++++++++++++++++++++++++++++
 1 file changed, 1724 insertions(+)
 create mode 100644 target/arm/cpu-idregs.h.inc
target/arm/cpu-idregs.h.inc new file +1724 -0
new file mode 100644
index 0000000000..5a627631c9
@@ -0,0 +1,1724 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+/* ID_AA64ISAR0_EL1 */
+IDREG_START(ID_AA64ISAR0_EL1)
+IDREG_FIELD_START(ID_AA64ISAR0, RES0_0,   0,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64ISAR0, RES0_0)
+
+IDREG_FIELD_START(ID_AA64ISAR0, AES,      4,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "aes")
+IDREG_FIELD_ARCH_VAL(0b0010, "pmull")
+IDREG_FIELD_END(ID_AA64ISAR0, AES)
+
+IDREG_FIELD_START(ID_AA64ISAR0, SHA1,     8,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR0, SHA1)
+
+IDREG_FIELD_START(ID_AA64ISAR0, SHA2,    12,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "sha256")
+IDREG_FIELD_ARCH_VAL(0b0010, "sha512")
+IDREG_FIELD_END(ID_AA64ISAR0, SHA2)
+
+IDREG_FIELD_START(ID_AA64ISAR0, CRC32,   16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR0, CRC32)
+
+IDREG_FIELD_START(ID_AA64ISAR0, ATOMIC,  20,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0010, "on")
+IDREG_FIELD_ARCH_VAL(0b0011, "LSE128")
+IDREG_FIELD_END(ID_AA64ISAR0, ATOMIC)
+
+IDREG_FIELD_START(ID_AA64ISAR0, RES0_24, 24,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64ISAR0, RES0_24)
+
+IDREG_FIELD_START(ID_AA64ISAR0, RDM,     28,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR0, RDM)
+
+IDREG_FIELD_START(ID_AA64ISAR0, SHA3,    32,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR0, SHA3)
+
+IDREG_FIELD_START(ID_AA64ISAR0, SM3,     36,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR0, SM3)
+
+IDREG_FIELD_START(ID_AA64ISAR0, SM4,     40,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR0, SM4)
+
+IDREG_FIELD_START(ID_AA64ISAR0, DP,      44,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR0, DP)
+
+IDREG_FIELD_START(ID_AA64ISAR0, FHM,     48,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR0, FHM)
+
+IDREG_FIELD_START(ID_AA64ISAR0, TS,      52,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "flagm")
+IDREG_FIELD_ARCH_VAL(0b0010, "flagm2")
+IDREG_FIELD_END(ID_AA64ISAR0, TS)
+
+IDREG_FIELD_START(ID_AA64ISAR0, TLB,     56,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "os")
+IDREG_FIELD_ARCH_VAL(0b0010, "range")
+IDREG_FIELD_END(ID_AA64ISAR0, TLB)
+
+IDREG_FIELD_START(ID_AA64ISAR0, RNDR,    60,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR0, RNDR)
+
+IDREG_END(ID_AA64ISAR0_EL1)
+
+/* ID_AA64ISAR1_EL1 */
+IDREG_START(ID_AA64ISAR1_EL1)
+IDREG_FIELD_START(ID_AA64ISAR1, DPB,      0,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "dpb2")
+IDREG_FIELD_END(ID_AA64ISAR1, DPB)
+
+IDREG_FIELD_START(ID_AA64ISAR1, APA,      4,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "pauth")
+IDREG_FIELD_ARCH_VAL(0b0010, "epac")
+IDREG_FIELD_ARCH_VAL(0b0011, "pauth2")
+IDREG_FIELD_ARCH_VAL(0b0100, "fpac")
+IDREG_FIELD_ARCH_VAL(0b0101, "fpaccombine")
+IDREG_FIELD_ARCH_VAL(0b0110, "pauth_lr")
+IDREG_FIELD_END(ID_AA64ISAR1, APA)
+
+IDREG_FIELD_START(ID_AA64ISAR1, API,      8,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "pauth")
+IDREG_FIELD_ARCH_VAL(0b0010, "epac")
+IDREG_FIELD_ARCH_VAL(0b0011, "pauth2")
+IDREG_FIELD_ARCH_VAL(0b0100, "fpac")
+IDREG_FIELD_ARCH_VAL(0b0101, "fpaccombine")
+IDREG_FIELD_ARCH_VAL(0b0110, "pauth_lr")
+IDREG_FIELD_END(ID_AA64ISAR1, API)
+
+IDREG_FIELD_START(ID_AA64ISAR1, JSCVT,   12,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR1, JSCVT)
+
+IDREG_FIELD_START(ID_AA64ISAR1, FCMA,    16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR1, FCMA)
+
+IDREG_FIELD_START(ID_AA64ISAR1, LRCPC,   20,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "lrcpc2")
+IDREG_FIELD_ARCH_VAL(0b0011, "lrcpc3")
+IDREG_FIELD_END(ID_AA64ISAR1, LRCPC)
+
+IDREG_FIELD_START(ID_AA64ISAR1, GPA,     24,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR1, GPA)
+
+IDREG_FIELD_START(ID_AA64ISAR1, GPI,     28,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR1, GPI)
+
+IDREG_FIELD_START(ID_AA64ISAR1, FRINTTS, 32,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR1, FRINTTS)
+
+IDREG_FIELD_START(ID_AA64ISAR1, SB,      36,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR1, SB)
+
+IDREG_FIELD_START(ID_AA64ISAR1, SPECRES, 40,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "cosp_rctx")
+IDREG_FIELD_END(ID_AA64ISAR1, SPECRES)
+
+IDREG_FIELD_START(ID_AA64ISAR1, BF16,    44,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "ebf16")
+IDREG_FIELD_END(ID_AA64ISAR1, BF16)
+
+IDREG_FIELD_START(ID_AA64ISAR1, DGH,     48,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR1, DGH)
+
+IDREG_FIELD_START(ID_AA64ISAR1, I8MM,    52,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR1, I8MM)
+
+IDREG_FIELD_START(ID_AA64ISAR1, XS,      56,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR1, XS)
+
+IDREG_FIELD_START(ID_AA64ISAR1, LS64,    60,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "ls64")
+IDREG_FIELD_ARCH_VAL(0b0010, "ls64_v")
+IDREG_FIELD_ARCH_VAL(0b0011, "ls64_accdata")
+IDREG_FIELD_ARCH_VAL(0b0100, "ls64wb")
+IDREG_FIELD_END(ID_AA64ISAR1, LS64)
+
+IDREG_END(ID_AA64ISAR1_EL1)
+
+/*  ID_AA64ISAR2_EL1  */
+IDREG_START(ID_AA64ISAR2_EL1)
+IDREG_FIELD_START(ID_AA64ISAR2, WFXT,          0,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0010, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, WFXT)
+
+IDREG_FIELD_START(ID_AA64ISAR2, RPRES,         4,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, RPRES)
+
+IDREG_FIELD_START(ID_AA64ISAR2, GPA3,          8,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, GPA3)
+
+IDREG_FIELD_START(ID_AA64ISAR2, APA3,         12,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "pauth")
+IDREG_FIELD_ARCH_VAL(0b0010, "epac")
+IDREG_FIELD_ARCH_VAL(0b0011, "pauth2")
+IDREG_FIELD_ARCH_VAL(0b0100, "fpac")
+IDREG_FIELD_ARCH_VAL(0b0101, "fpaccombine")
+IDREG_FIELD_ARCH_VAL(0b0110, "pauth_lr")
+IDREG_FIELD_END(ID_AA64ISAR2, APA3)
+
+IDREG_FIELD_START(ID_AA64ISAR2, MOPS,         16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, MOPS)
+
+IDREG_FIELD_START(ID_AA64ISAR2, BC,           20,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, BC)
+
+IDREG_FIELD_START(ID_AA64ISAR2, PAC_FRAC,     24,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, PAC_FRAC)
+
+IDREG_FIELD_START(ID_AA64ISAR2, CLRBHB,       28,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, CLRBHB)
+
+IDREG_FIELD_START(ID_AA64ISAR2, SYSREG_128,   32,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, SYSREG_128)
+
+IDREG_FIELD_START(ID_AA64ISAR2, SYSINSTR_128, 36,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, SYSINSTR_128)
+
+IDREG_FIELD_START(ID_AA64ISAR2, PRFMSLC,      40,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, PRFMSLC)
+
+IDREG_FIELD_START(ID_AA64ISAR2, PCDPHINT,     44,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, PCDPHINT)
+
+IDREG_FIELD_START(ID_AA64ISAR2, RPRFM,        48,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, RPRFM)
+
+IDREG_FIELD_START(ID_AA64ISAR2, CSSC,         52,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "cmpbr")
+IDREG_FIELD_END(ID_AA64ISAR2, CSSC)
+
+IDREG_FIELD_START(ID_AA64ISAR2, LUT,          56,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, LUT)
+
+IDREG_FIELD_START(ID_AA64ISAR2, ATS1A,        60,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, ATS1A)
+
+IDREG_END(ID_AA64ISAR2_EL1)
+
+/*  ID_AA64PFR0_EL1  */
+IDREG_START(ID_AA64PFR0_EL1)
+IDREG_FIELD_START(ID_AA64PFR0, EL0,     0,  4, LOWER,  0b0001)
+IDREG_FIELD_ARCH_VAL(0b0001, "aarch64")
+IDREG_FIELD_ARCH_VAL(0b0010, "aarch32")
+IDREG_FIELD_END(ID_AA64PFR0, EL0)
+
+IDREG_FIELD_START(ID_AA64PFR0, EL1,     4,  4, LOWER,  0b0001)
+IDREG_FIELD_ARCH_VAL(0b0001, "aarch64")
+IDREG_FIELD_ARCH_VAL(0b0010, "aarch32")
+IDREG_FIELD_END(ID_AA64PFR0, EL1)
+
+IDREG_FIELD_START(ID_AA64PFR0, EL2,     8,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "aarch64")
+IDREG_FIELD_ARCH_VAL(0b0010, "aarch32")
+IDREG_FIELD_END(ID_AA64PFR0, EL2)
+
+IDREG_FIELD_START(ID_AA64PFR0, EL3,    12,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "aarch64")
+IDREG_FIELD_ARCH_VAL(0b0010, "aarch32")
+IDREG_FIELD_END(ID_AA64PFR0, EL3)
+
+IDREG_FIELD_START(ID_AA64PFR0, FP,     16,  4, SIGNED_LOWER,  0b1111)
+IDREG_FIELD_ARCH_VAL(0b0000, "on")
+IDREG_FIELD_ARCH_VAL(0b0001, "fp16")
+IDREG_FIELD_ARCH_VAL(0b1111, "off")
+IDREG_FIELD_END(ID_AA64PFR0, FP)
+
+IDREG_FIELD_START(ID_AA64PFR0, ADVSIMD,20,  4, SIGNED_LOWER,  0b1111)
+IDREG_FIELD_ARCH_VAL(0b0000, "on")
+IDREG_FIELD_ARCH_VAL(0b0001, "fp16")
+IDREG_FIELD_ARCH_VAL(0b1111, "off")
+IDREG_FIELD_END(ID_AA64PFR0, ADVSIMD)
+
+IDREG_FIELD_START(ID_AA64PFR0, GIC,    24,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0011, "v4p1")
+IDREG_FIELD_END(ID_AA64PFR0, GIC)
+
+IDREG_FIELD_START(ID_AA64PFR0, RAS,    28,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "v1p1")
+IDREG_FIELD_ARCH_VAL(0b0011, "v2")
+IDREG_FIELD_END(ID_AA64PFR0, RAS)
+
+IDREG_FIELD_START(ID_AA64PFR0, SVE,    32,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR0, SVE)
+
+IDREG_FIELD_START(ID_AA64PFR0, SEL2,   36,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR0, SEL2)
+
+IDREG_FIELD_START(ID_AA64PFR0, MPAM,   40,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "0")
+IDREG_FIELD_ARCH_VAL(0b0001, "1")
+IDREG_FIELD_END(ID_AA64PFR0, MPAM)
+
+IDREG_FIELD_START(ID_AA64PFR0, AMU,    44,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "v1p1")
+IDREG_FIELD_END(ID_AA64PFR0, AMU)
+
+IDREG_FIELD_START(ID_AA64PFR0, DIT,    48,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR0, DIT)
+
+IDREG_FIELD_START(ID_AA64PFR0, RME,    52,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR0, RME)
+
+IDREG_FIELD_START(ID_AA64PFR0, CSV2,   56,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "csv2_2")
+IDREG_FIELD_ARCH_VAL(0b0011, "csv2_3")
+IDREG_FIELD_END(ID_AA64PFR0, CSV2)
+
+IDREG_FIELD_START(ID_AA64PFR0, CSV3,   60,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR0, CSV3)
+
+IDREG_END(ID_AA64PFR0_EL1)
+
+/*  ID_AA64PFR1_EL1  */
+IDREG_START(ID_AA64PFR1_EL1)
+IDREG_FIELD_START(ID_AA64PFR1, BT,        0,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR1, BT)
+
+IDREG_FIELD_START(ID_AA64PFR1, SSBS,      4,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "ssbs2")
+IDREG_FIELD_END(ID_AA64PFR1, SSBS)
+
+IDREG_FIELD_START(ID_AA64PFR1, MTE,       8,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "mte2")
+IDREG_FIELD_ARCH_VAL(0b0011, "mte3")
+IDREG_FIELD_END(ID_AA64PFR1, MTE)
+
+IDREG_FIELD_START(ID_AA64PFR1, RAS_FRAC, 12,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "rasv1p1")
+IDREG_FIELD_END(ID_AA64PFR1, RAS_FRAC)
+
+IDREG_FIELD_START(ID_AA64PFR1, MPAM_FRAC,16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "minor_0")
+IDREG_FIELD_ARCH_VAL(0b0001, "minor_1")
+IDREG_FIELD_END(ID_AA64PFR1, MPAM_FRAC)
+
+IDREG_FIELD_START(ID_AA64PFR1, RES0_20,  20,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64PFR1, RES0_20)
+
+IDREG_FIELD_START(ID_AA64PFR1, SME,      24,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "sme2")
+IDREG_FIELD_END(ID_AA64PFR1, SME)
+
+IDREG_FIELD_START(ID_AA64PFR1, RNDR_TRAP,28,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR1, RNDR_TRAP)
+
+IDREG_FIELD_START(ID_AA64PFR1, CSV2_FRAC,32,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "csv2_1p1")
+IDREG_FIELD_ARCH_VAL(0b0010, "csv2_1p2")
+IDREG_FIELD_END(ID_AA64PFR1, CSV2_FRAC)
+
+IDREG_FIELD_START(ID_AA64PFR1, NMI,      36,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR1, NMI)
+
+IDREG_FIELD_START(ID_AA64PFR1, MTE_FRAC, 40,  4, SIGNED_LOWER,  0b1111)
+IDREG_FIELD_ARCH_VAL(0b0000, "async")
+IDREG_FIELD_ARCH_VAL(0b1111, "off")
+IDREG_FIELD_END(ID_AA64PFR1, MTE_FRAC)
+
+IDREG_FIELD_START(ID_AA64PFR1, GCS,      44,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR1, GCS)
+
+IDREG_FIELD_START(ID_AA64PFR1, THE,      48,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR1, THE)
+
+IDREG_FIELD_START(ID_AA64PFR1, MTEX,     52,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "mte")
+IDREG_FIELD_ARCH_VAL(0b0001, "mte4")
+IDREG_FIELD_END(ID_AA64PFR1, MTEX)
+
+IDREG_FIELD_START(ID_AA64PFR1, DF2,      56,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR1, DF2)
+
+IDREG_FIELD_START(ID_AA64PFR1, PFAR,     60,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR1, PFAR)
+
+IDREG_END(ID_AA64PFR1_EL1)
+
+/*  ID_AA64MMFR0_EL1 */
+IDREG_START(ID_AA64MMFR0_EL1)
+IDREG_FIELD_START(ID_AA64MMFR0, PARANGE,    0,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "32")
+IDREG_FIELD_ARCH_VAL(0b0001, "36")
+IDREG_FIELD_ARCH_VAL(0b0010, "40")
+IDREG_FIELD_ARCH_VAL(0b0011, "42")
+IDREG_FIELD_ARCH_VAL(0b0100, "44")
+IDREG_FIELD_ARCH_VAL(0b0101, "48")
+IDREG_FIELD_ARCH_VAL(0b0110, "52")
+IDREG_FIELD_ARCH_VAL(0b0111, "56")
+IDREG_FIELD_END(ID_AA64MMFR0, PARANGE)
+
+IDREG_FIELD_START(ID_AA64MMFR0, ASIDBITS,   4,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "8")
+IDREG_FIELD_ARCH_VAL(0b0010, "16")
+IDREG_FIELD_END(ID_AA64MMFR0, ASIDBITS)
+
+IDREG_FIELD_START(ID_AA64MMFR0, BIGEND,     8,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR0, BIGEND)
+
+IDREG_FIELD_START(ID_AA64MMFR0, SNSMEM,    12,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR0, SNSMEM)
+
+IDREG_FIELD_START(ID_AA64MMFR0, BIGENDEL0, 16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR0, BIGENDEL0)
+
+IDREG_FIELD_START(ID_AA64MMFR0, TGRAN16,   20,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "52_bit")
+IDREG_FIELD_END(ID_AA64MMFR0, TGRAN16)
+
+IDREG_FIELD_START(ID_AA64MMFR0, TGRAN64,   24,  4, SIGNED_LOWER,  0b1111)
+IDREG_FIELD_ARCH_VAL(0b0000, "on")
+IDREG_FIELD_ARCH_VAL(0b1111, "off")
+IDREG_FIELD_END(ID_AA64MMFR0, TGRAN64)
+
+IDREG_FIELD_START(ID_AA64MMFR0, TGRAN4,    28,  4, SIGNED_LOWER,  0b1111)
+IDREG_FIELD_ARCH_VAL(0b0000, "on")
+IDREG_FIELD_ARCH_VAL(0b0001, "52_bit")
+IDREG_FIELD_ARCH_VAL(0b1111, "off")
+IDREG_FIELD_END(ID_AA64MMFR0, TGRAN4)
+
+IDREG_FIELD_START(ID_AA64MMFR0, TGRAN16_2, 32,  4, EXACT,  0b0001)
+IDREG_FIELD_ARCH_VAL(0b0000, "tgran16")
+IDREG_FIELD_ARCH_VAL(0b0001, "off")
+IDREG_FIELD_ARCH_VAL(0b0010, "on")
+IDREG_FIELD_ARCH_VAL(0b0011, "52_bit")
+IDREG_FIELD_END(ID_AA64MMFR0, TGRAN16_2)
+
+IDREG_FIELD_START(ID_AA64MMFR0, TGRAN64_2, 36,  4, EXACT,  0b0001)
+IDREG_FIELD_ARCH_VAL(0b0000, "tgran64")
+IDREG_FIELD_ARCH_VAL(0b0001, "off")
+IDREG_FIELD_ARCH_VAL(0b0010, "on")
+IDREG_FIELD_END(ID_AA64MMFR0, TGRAN64_2)
+
+IDREG_FIELD_START(ID_AA64MMFR0, TGRAN4_2,  40,  4, EXACT,  0b0001)
+IDREG_FIELD_ARCH_VAL(0b0000, "tgran4")
+IDREG_FIELD_ARCH_VAL(0b0001, "off")
+IDREG_FIELD_ARCH_VAL(0b0010, "on")
+IDREG_FIELD_ARCH_VAL(0b0011, "52_bit")
+IDREG_FIELD_END(ID_AA64MMFR0, TGRAN4_2)
+
+IDREG_FIELD_START(ID_AA64MMFR0, EXS,       44,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR0, EXS)
+
+IDREG_FIELD_START(ID_AA64MMFR0, RES0_48,   48,  8, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64MMFR0, RES0_48)
+
+IDREG_FIELD_START(ID_AA64MMFR0, FGT,       56,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "fgt2")
+IDREG_FIELD_END(ID_AA64MMFR0, FGT)
+
+IDREG_FIELD_START(ID_AA64MMFR0, ECV,       60,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "cntpoff")
+IDREG_FIELD_END(ID_AA64MMFR0, ECV)
+
+IDREG_END(ID_AA64MMFR0_EL1)
+
+/*  ID_AA64MMFR1_EL1  */
+IDREG_START(ID_AA64MMFR1_EL1)
+IDREG_FIELD_START(ID_AA64MMFR1, HAFDBS,    0,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "af")
+IDREG_FIELD_ARCH_VAL(0b0010, "dbm")
+IDREG_FIELD_ARCH_VAL(0b0011, "haft")
+IDREG_FIELD_ARCH_VAL(0b0100, "hdbss")
+IDREG_FIELD_END(ID_AA64MMFR1, HAFDBS)
+
+IDREG_FIELD_START(ID_AA64MMFR1, VMIDBITS,  4,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "8")
+IDREG_FIELD_ARCH_VAL(0b0010, "16")
+IDREG_FIELD_END(ID_AA64MMFR1, VMIDBITS)
+
+IDREG_FIELD_START(ID_AA64MMFR1, VH,        8,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, VH)
+
+IDREG_FIELD_START(ID_AA64MMFR1, HPDS,     12,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "hpds2")
+IDREG_FIELD_END(ID_AA64MMFR1, HPDS)
+
+IDREG_FIELD_START(ID_AA64MMFR1, LO,       16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, LO)
+
+IDREG_FIELD_START(ID_AA64MMFR1, PAN,      20,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "pan2")
+IDREG_FIELD_ARCH_VAL(0b0011, "pan3")
+IDREG_FIELD_END(ID_AA64MMFR1, PAN)
+
+IDREG_FIELD_START(ID_AA64MMFR1, SPECSEI,  24,  4, HIGHER, 0b0001)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, SPECSEI)
+
+IDREG_FIELD_START(ID_AA64MMFR1, XNX,      28,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, XNX)
+
+IDREG_FIELD_START(ID_AA64MMFR1, TWED,     32,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, TWED)
+
+IDREG_FIELD_START(ID_AA64MMFR1, ETS,      36,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "ets2")
+IDREG_FIELD_ARCH_VAL(0b0011, "ets3")
+IDREG_FIELD_END(ID_AA64MMFR1, ETS)
+
+IDREG_FIELD_START(ID_AA64MMFR1, HCX,      40,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, HCX)
+
+IDREG_FIELD_START(ID_AA64MMFR1, AFP,      44,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, AFP)
+
+IDREG_FIELD_START(ID_AA64MMFR1, NTLBPA,   48,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, NTLBPA)
+
+IDREG_FIELD_START(ID_AA64MMFR1, TIDCP1,   52,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, TIDCP1)
+
+IDREG_FIELD_START(ID_AA64MMFR1, CMOW,     56,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, CMOW)
+
+IDREG_FIELD_START(ID_AA64MMFR1, ECBHB,    60,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, ECBHB)
+
+IDREG_END(ID_AA64MMFR1_EL1)
+
+/*  ID_AA64MMFR2_EL1  */
+IDREG_START(ID_AA64MMFR2_EL1)
+IDREG_FIELD_START(ID_AA64MMFR2, CNP,      0,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR2, CNP)
+
+IDREG_FIELD_START(ID_AA64MMFR2, UAO,      4,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR2, UAO)
+
+IDREG_FIELD_START(ID_AA64MMFR2, LSM,      8,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR2, LSM)
+
+IDREG_FIELD_START(ID_AA64MMFR2, IESB,    12,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR2, IESB)
+
+IDREG_FIELD_START(ID_AA64MMFR2, VARANGE, 16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "48")
+IDREG_FIELD_ARCH_VAL(0b0001, "52")
+IDREG_FIELD_END(ID_AA64MMFR2, VARANGE)
+
+IDREG_FIELD_START(ID_AA64MMFR2, CCIDX,   20,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "32")
+IDREG_FIELD_ARCH_VAL(0b0001, "64")
+IDREG_FIELD_END(ID_AA64MMFR2, CCIDX)
+
+IDREG_FIELD_START(ID_AA64MMFR2, NV,      24,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "nv2")
+IDREG_FIELD_END(ID_AA64MMFR2, NV)
+
+IDREG_FIELD_START(ID_AA64MMFR2, ST,      28,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "39")
+IDREG_FIELD_ARCH_VAL(0b0001, "48_47")
+IDREG_FIELD_END(ID_AA64MMFR2, ST)
+
+IDREG_FIELD_START(ID_AA64MMFR2, AT,      32,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR2, AT)
+
+IDREG_FIELD_START(ID_AA64MMFR2, IDS,     36,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "0x0")
+IDREG_FIELD_ARCH_VAL(0b0001, "0x18")
+IDREG_FIELD_END(ID_AA64MMFR2, IDS)
+
+IDREG_FIELD_START(ID_AA64MMFR2, FWB,     40,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR2, FWB)
+
+IDREG_FIELD_START(ID_AA64MMFR2, RES0_44, 44,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64MMFR2, RES0_44)
+
+IDREG_FIELD_START(ID_AA64MMFR2, TTL,     48,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR2, TTL)
+
+IDREG_FIELD_START(ID_AA64MMFR2, BBM,     52,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "0")
+IDREG_FIELD_ARCH_VAL(0b0001, "1")
+IDREG_FIELD_ARCH_VAL(0b0010, "2")
+IDREG_FIELD_END(ID_AA64MMFR2, BBM)
+
+IDREG_FIELD_START(ID_AA64MMFR2, EVT,     56,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "ttlbxs")
+IDREG_FIELD_END(ID_AA64MMFR2, EVT)
+
+IDREG_FIELD_START(ID_AA64MMFR2, E0PD,    60,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR2, E0PD)
+
+IDREG_END(ID_AA64MMFR2_EL1)
+
+/* ID_AA64MMFR3_EL1  */
+IDREG_START(ID_AA64MMFR3_EL1)
+IDREG_FIELD_START(ID_AA64MMFR3, TCRX,       0,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, TCRX)
+
+IDREG_FIELD_START(ID_AA64MMFR3, SCTLRX,     4,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, SCTLRX)
+
+IDREG_FIELD_START(ID_AA64MMFR3, S1PIE,      8,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, S1PIE)
+
+IDREG_FIELD_START(ID_AA64MMFR3, S2PIE,     12,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, S2PIE)
+
+IDREG_FIELD_START(ID_AA64MMFR3, S1POE,     16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, S1POE)
+
+IDREG_FIELD_START(ID_AA64MMFR3, S2POE,     20,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, S2POE)
+
+IDREG_FIELD_START(ID_AA64MMFR3, AIE,       24,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, AIE)
+
+IDREG_FIELD_START(ID_AA64MMFR3, MEC,       28,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, MEC)
+
+IDREG_FIELD_START(ID_AA64MMFR3, D128,      32,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, D128)
+
+IDREG_FIELD_START(ID_AA64MMFR3, D128_2,    36,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, D128_2)
+
+IDREG_FIELD_START(ID_AA64MMFR3, SNERR,     40,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "sync")
+IDREG_FIELD_ARCH_VAL(0b0010, "ANERR")
+IDREG_FIELD_ARCH_VAL(0b0011, "ANERR_IND")
+IDREG_FIELD_END(ID_AA64MMFR3, SNERR)
+
+IDREG_FIELD_START(ID_AA64MMFR3, ANERR,     44,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "async")
+IDREG_FIELD_ARCH_VAL(0b0010, "ANERR")
+IDREG_FIELD_ARCH_VAL(0b0011, "ANERR_IND")
+IDREG_FIELD_END(ID_AA64MMFR3, ANERR)
+
+IDREG_FIELD_START(ID_AA64MMFR3, RES0_48,   48,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64MMFR3, RES0_48)
+
+IDREG_FIELD_START(ID_AA64MMFR3, SDERR,     52,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "dev_sync")
+IDREG_FIELD_ARCH_VAL(0b0010, "ADERR")
+IDREG_FIELD_ARCH_VAL(0b0011, "ADERR_IND")
+IDREG_FIELD_END(ID_AA64MMFR3, SDERR)
+
+IDREG_FIELD_START(ID_AA64MMFR3, ADERR,     56,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "dev_async")
+IDREG_FIELD_ARCH_VAL(0b0010, "ADERR")
+IDREG_FIELD_ARCH_VAL(0b0011, "ADERR_IND")
+IDREG_FIELD_END(ID_AA64MMFR3, ADERR)
+
+IDREG_FIELD_START(ID_AA64MMFR3, SPEC_FPACC,60,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, SPEC_FPACC)
+
+IDREG_END(ID_AA64MMFR3_EL1)
+
+/* ID_AA64DFR0_EL1 */
+IDREG_START(ID_AA64DFR0_EL1)
+IDREG_FIELD_START(ID_AA64DFR0, DEBUGVER,    0,  4, LOWER,  0x6)
+IDREG_FIELD_ARCH_VAL(0b0110, "on")
+IDREG_FIELD_ARCH_VAL(0b0111, "vhe")
+IDREG_FIELD_ARCH_VAL(0b1000, "v8p2")
+IDREG_FIELD_ARCH_VAL(0b1001, "v8p4")
+IDREG_FIELD_ARCH_VAL(0b1010, "v8p8")
+IDREG_FIELD_ARCH_VAL(0b1011, "v8p9")
+IDREG_FIELD_END(ID_AA64DFR0, DEBUGVER)
+
+IDREG_FIELD_START(ID_AA64DFR0, TRACEVER,    4,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64DFR0, TRACEVER)
+
+IDREG_FIELD_START(ID_AA64DFR0, PMUVER,      8,  4, SIGNED_LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0100, "v3p1")
+IDREG_FIELD_ARCH_VAL(0b0101, "v3p4")
+IDREG_FIELD_ARCH_VAL(0b0110, "v3p5")
+IDREG_FIELD_ARCH_VAL(0b0111, "v3p7")
+IDREG_FIELD_ARCH_VAL(0b1000, "v3p8")
+IDREG_FIELD_ARCH_VAL(0b1001, "v3p9")
+IDREG_FIELD_ARCH_VAL(0b1111, "imp_def")
+IDREG_FIELD_END(ID_AA64DFR0, PMUVER)
+
+IDREG_FIELD_START(ID_AA64DFR0, BRPS,       12,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(ID_AA64DFR0, BRPS)
+
+IDREG_FIELD_START(ID_AA64DFR0, PMSS,       16,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64DFR0, PMSS)
+
+IDREG_FIELD_START(ID_AA64DFR0, WRPS,       20,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(ID_AA64DFR0, WRPS)
+
+IDREG_FIELD_START(ID_AA64DFR0, SEBEP,      24,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64DFR0, SEBEP)
+
+IDREG_FIELD_START(ID_AA64DFR0, CTX_CMPS,   28,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(ID_AA64DFR0, CTX_CMPS)
+
+IDREG_FIELD_START(ID_AA64DFR0, PMSVER,     32,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "v1p1")
+IDREG_FIELD_ARCH_VAL(0b0011, "v1p2")
+IDREG_FIELD_ARCH_VAL(0b0100, "v1p3")
+IDREG_FIELD_ARCH_VAL(0b0101, "v1p4")
+IDREG_FIELD_ARCH_VAL(0b0110, "v1p5")
+IDREG_FIELD_END(ID_AA64DFR0, PMSVER)
+
+IDREG_FIELD_START(ID_AA64DFR0, DOUBLELOCK, 36,  4, SIGNED_LOWER,  0b1111)
+IDREG_FIELD_ARCH_VAL(0b0000, "on")
+IDREG_FIELD_ARCH_VAL(0b1111, "off")
+IDREG_FIELD_END(ID_AA64DFR0, DOUBLELOCK)
+
+IDREG_FIELD_START(ID_AA64DFR0, TRACEFILT,  40,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64DFR0, TRACEFILT)
+
+IDREG_FIELD_START(ID_AA64DFR0, TRACEBUFFER,44,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "trbe_v1p1")
+IDREG_FIELD_END(ID_AA64DFR0, TRACEBUFFER)
+
+IDREG_FIELD_START(ID_AA64DFR0, MTPMU,      48,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "ni_impdef")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b1111, "off")
+IDREG_FIELD_END(ID_AA64DFR0, MTPMU)
+
+IDREG_FIELD_START(ID_AA64DFR0, BRBE,       52,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "brbe_v1p1")
+IDREG_FIELD_END(ID_AA64DFR0, BRBE)
+
+IDREG_FIELD_START(ID_AA64DFR0, EXTTRCBUFF, 56,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64DFR0, EXTTRCBUFF)
+
+IDREG_FIELD_START(ID_AA64DFR0, HPMN0,      60,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "unpredictable")
+IDREG_FIELD_ARCH_VAL(0b0001, "def")
+IDREG_FIELD_END(ID_AA64DFR0, HPMN0)
+
+IDREG_END(ID_AA64DFR0_EL1)
+
+/*  ID_AA64ZFR0_EL1  */
+IDREG_START(ID_AA64ZFR0_EL1)
+IDREG_FIELD_START(ID_AA64ZFR0, SVEVER,      0,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "on")
+IDREG_FIELD_ARCH_VAL(0b0001, "sve2")
+IDREG_FIELD_ARCH_VAL(0b0010, "sve2p1")
+IDREG_FIELD_ARCH_VAL(0b0011, "sve2p2")
+IDREG_FIELD_END(ID_AA64ZFR0, SVEVER)
+
+IDREG_FIELD_START(ID_AA64ZFR0, AES,         4,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "pmull128")
+IDREG_FIELD_ARCH_VAL(0b0011, "aes2")
+IDREG_FIELD_END(ID_AA64ZFR0, AES)
+
+IDREG_FIELD_START(ID_AA64ZFR0, RES0_8,      8,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64ZFR0, RES0_8)
+
+IDREG_FIELD_START(ID_AA64ZFR0, ELTPERM,    12,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ZFR0, ELTPERM)
+
+IDREG_FIELD_START(ID_AA64ZFR0, BITPERM,    16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ZFR0, BITPERM)
+
+IDREG_FIELD_START(ID_AA64ZFR0, BFLOAT16,   20,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "ebf16")
+IDREG_FIELD_END(ID_AA64ZFR0, BFLOAT16)
+
+IDREG_FIELD_START(ID_AA64ZFR0, B16B16,     24,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "bfscale")
+IDREG_FIELD_END(ID_AA64ZFR0, B16B16)
+
+IDREG_FIELD_START(ID_AA64ZFR0, RES0_28,    28,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64ZFR0, RES0_28)
+
+IDREG_FIELD_START(ID_AA64ZFR0, SHA3,       32,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ZFR0, SHA3)
+
+IDREG_FIELD_START(ID_AA64ZFR0, RES0_36,    36,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64ZFR0, RES0_36)
+
+IDREG_FIELD_START(ID_AA64ZFR0, SM4,        40,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ZFR0, SM4)
+
+IDREG_FIELD_START(ID_AA64ZFR0, I8MM,       44,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ZFR0, I8MM)
+
+IDREG_FIELD_START(ID_AA64ZFR0, F16MM,      48,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ZFR0, F16MM)
+
+IDREG_FIELD_START(ID_AA64ZFR0, F32MM,      52,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ZFR0, F32MM)
+
+IDREG_FIELD_START(ID_AA64ZFR0, F64MM,      56,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ZFR0, F64MM)
+
+IDREG_FIELD_START(ID_AA64ZFR0, RES0_60,    60,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64ZFR0, RES0_60)
+
+IDREG_END(ID_AA64ZFR0_EL1)
+
+/*  ID_AA64SMFR0_EL1  */
+IDREG_START(ID_AA64SMFR0_EL1)
+IDREG_FIELD_START(ID_AA64SMFR0, SMOP4,      0,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, SMOP4)
+
+IDREG_FIELD_START(ID_AA64SMFR0, RES0_1,     1, 15, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64SMFR0, RES0_1)
+
+IDREG_FIELD_START(ID_AA64SMFR0, STMOP,     16,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, STMOP)
+
+IDREG_FIELD_START(ID_AA64SMFR0, RES0_17,   17,  6, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64SMFR0, RES0_17)
+
+IDREG_FIELD_START(ID_AA64SMFR0, SFEXPA,    23,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, SFEXPA)
+
+IDREG_FIELD_START(ID_AA64SMFR0, AES,       24,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, AES)
+
+IDREG_FIELD_START(ID_AA64SMFR0, SBITPERM,  25,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, SBITPERM)
+
+IDREG_FIELD_START(ID_AA64SMFR0, RES0_26,   26,  2, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64SMFR0, RES0_26)
+
+IDREG_FIELD_START(ID_AA64SMFR0, SF8DP2,    28,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, SF8DP2)
+
+IDREG_FIELD_START(ID_AA64SMFR0, SF8DP4,    29,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, SF8DP4)
+
+IDREG_FIELD_START(ID_AA64SMFR0, SF8FMA,    30,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, SF8FMA)
+
+IDREG_FIELD_START(ID_AA64SMFR0, RES0_31,   31,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64SMFR0, RES0_31)
+
+IDREG_FIELD_START(ID_AA64SMFR0, F32F32,    32,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, F32F32)
+
+IDREG_FIELD_START(ID_AA64SMFR0, BI32I32,   33,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, BI32I32)
+
+IDREG_FIELD_START(ID_AA64SMFR0, B16F32,    34,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, B16F32)
+
+IDREG_FIELD_START(ID_AA64SMFR0, F16F32,    35,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, F16F32)
+
+IDREG_FIELD_START(ID_AA64SMFR0, I8I32,     36,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b1111, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, I8I32)
+
+IDREG_FIELD_START(ID_AA64SMFR0, F8F32,     40,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, F8F32)
+
+IDREG_FIELD_START(ID_AA64SMFR0, F8F16,     41,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, F8F16)
+
+IDREG_FIELD_START(ID_AA64SMFR0, F16F16,    42,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, F16F16)
+
+IDREG_FIELD_START(ID_AA64SMFR0, B16B16,    43,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, B16B16)
+
+IDREG_FIELD_START(ID_AA64SMFR0, I16I32,    44,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0101, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, I16I32)
+
+IDREG_FIELD_START(ID_AA64SMFR0, F64F64,    48,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, F64F64)
+
+IDREG_FIELD_START(ID_AA64SMFR0, RES0_49,   49,  3, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64SMFR0, RES0_49)
+
+IDREG_FIELD_START(ID_AA64SMFR0, I16I64,    52,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b1111, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, I16I64)
+
+IDREG_FIELD_START(ID_AA64SMFR0, SMEVER,    56,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "sme")
+IDREG_FIELD_ARCH_VAL(0b0001, "sme2")
+IDREG_FIELD_ARCH_VAL(0b0010, "sme2p1")
+IDREG_FIELD_ARCH_VAL(0b0011, "sme2p2")
+IDREG_FIELD_END(ID_AA64SMFR0, SMEVER)
+
+IDREG_FIELD_START(ID_AA64SMFR0, LUTV2,     60,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, LUTV2)
+
+IDREG_FIELD_START(ID_AA64SMFR0, RES0_61,   61,  2, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64SMFR0, RES0_61)
+
+IDREG_FIELD_START(ID_AA64SMFR0, FA64,      63,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, FA64)
+
+IDREG_END(ID_AA64SMFR0_EL1)
+
+/* CTR_EL0 */
+IDREG_START(CTR_EL0)
+IDREG_FIELD_START(CTR_EL0, IMINLINE,    0,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(CTR_EL0, IMINLINE)
+
+IDREG_FIELD_START(CTR_EL0, RES0_4,      4, 10, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(CTR_EL0, RES0_4)
+
+IDREG_FIELD_START(CTR_EL0, L1IP,       14,  2, EXACT,  0b10)
+IDREG_FIELD_ARCH_VAL(0b00, "reserved_vpipt")
+IDREG_FIELD_ARCH_VAL(0b01, "reserved_aivivt")
+IDREG_FIELD_ARCH_VAL(0b10, "vipt")
+IDREG_FIELD_ARCH_VAL(0b11, "pipt")
+IDREG_FIELD_END(CTR_EL0, L1IP)
+
+IDREG_FIELD_START(CTR_EL0, DMINLINE,   16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(CTR_EL0, DMINLINE)
+
+IDREG_FIELD_START(CTR_EL0, ERG,        20,  4, HIGHER_OR_ZERO,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(CTR_EL0, ERG)
+
+IDREG_FIELD_START(CTR_EL0, CWG,        24,  4, HIGHER_OR_ZERO,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(CTR_EL0, CWG)
+
+IDREG_FIELD_START(CTR_EL0, IDC,        28,  1, LOWER,  0b1)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(CTR_EL0, IDC)
+
+IDREG_FIELD_START(CTR_EL0, DIC,        29,  1, LOWER,  0b1)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(CTR_EL0, DIC)
+
+IDREG_FIELD_START(CTR_EL0, RES0_30,    30,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(CTR_EL0, RES0_30)
+
+IDREG_FIELD_START(CTR_EL0, RES1_31,    31,  1, EXACT,  1)
+IDREG_FIELD_ARCH_VAL(1, NULL)
+IDREG_FIELD_END(CTR_EL0, RES1_31)
+
+IDREG_FIELD_START(CTR_EL0, TMINLINE,   32,  6, EXACT,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(CTR_EL0, TMINLINE)
+
+IDREG_FIELD_START(CTR_EL0, RES0_38,    38, 26, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(CTR_EL0, RES0_38)
+
+IDREG_END(CTR_EL0)
+
+/* ID_AA64ISAR3_EL1 */
+IDREG_START(ID_AA64ISAR3_EL1)
+IDREG_FIELD_START(ID_AA64ISAR3, CPA,       0,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "cpa2")
+IDREG_FIELD_END(ID_AA64ISAR3, CPA)
+
+IDREG_FIELD_START(ID_AA64ISAR3, FAMINMAX,  4,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR3, FAMINMAX)
+
+IDREG_FIELD_START(ID_AA64ISAR3, TLBIW,     8,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR3, TLBIW)
+
+IDREG_FIELD_START(ID_AA64ISAR3, PACM,     12,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "trivial_imp")
+IDREG_FIELD_ARCH_VAL(0b0010, "full_imp")
+IDREG_FIELD_END(ID_AA64ISAR3, PACM)
+
+IDREG_FIELD_START(ID_AA64ISAR3, LSFE,     16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR3, LSFE)
+
+IDREG_FIELD_START(ID_AA64ISAR3, OCCMO,    20,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR3, OCCMO)
+
+IDREG_FIELD_START(ID_AA64ISAR3, LSUI,     24,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR3, LSUI)
+
+IDREG_FIELD_START(ID_AA64ISAR3, FPRCVT,   28,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR3, FPRCVT)
+
+IDREG_FIELD_START(ID_AA64ISAR3, RES0_32,  32, 32, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64ISAR3, RES0_32)
+
+IDREG_END(ID_AA64ISAR3_EL1)
+
+/* ID_AA64PFR2_EL1 */
+IDREG_START(ID_AA64PFR2_EL1)
+IDREG_FIELD_START(ID_AA64PFR2, MTEPERM,       0,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR2, MTEPERM)
+
+IDREG_FIELD_START(ID_AA64PFR2, MTESTOREONLY,  4,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR2, MTESTOREONLY)
+
+IDREG_FIELD_START(ID_AA64PFR2, MTEFAR,        8,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR2, MTEFAR)
+
+IDREG_FIELD_START(ID_AA64PFR2, GCIE,         12,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR2, GCIE)
+
+IDREG_FIELD_START(ID_AA64PFR2, UINJ,         16,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR2, UINJ)
+
+IDREG_FIELD_START(ID_AA64PFR2, RES0_20,      20, 12, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64PFR2, RES0_20)
+
+IDREG_FIELD_START(ID_AA64PFR2, FPMR,         32,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR2, FPMR)
+
+IDREG_FIELD_START(ID_AA64PFR2, RES0_36,      36, 28, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64PFR2, RES0_36)
+
+IDREG_END(ID_AA64PFR2_EL1)
+
+/*  ID_AA64FPFR0_EL1  */
+IDREG_START(ID_AA64FPFR0_EL1)
+IDREG_FIELD_START(ID_AA64FPFR0, F8E5M2,    0,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64FPFR0, F8E5M2)
+
+IDREG_FIELD_START(ID_AA64FPFR0, F8E4M3,    1,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64FPFR0, F8E4M3)
+
+IDREG_FIELD_START(ID_AA64FPFR0, RES0_2,    2, 24, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64FPFR0, RES0_2)
+
+IDREG_FIELD_START(ID_AA64FPFR0, F8MM4,    26,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64FPFR0, F8MM4)
+
+IDREG_FIELD_START(ID_AA64FPFR0, F8MM8,    27,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64FPFR0, F8MM8)
+
+IDREG_FIELD_START(ID_AA64FPFR0, F8DP2,    28,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64FPFR0, F8DP2)
+
+IDREG_FIELD_START(ID_AA64FPFR0, F8DP4,    29,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64FPFR0, F8DP4)
+
+IDREG_FIELD_START(ID_AA64FPFR0, F8FMA,    30,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64FPFR0, F8FMA)
+
+IDREG_FIELD_START(ID_AA64FPFR0, F8CVT,    31,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64FPFR0, F8CVT)
+
+IDREG_FIELD_START(ID_AA64FPFR0, RES0_32,  32, 32, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64FPFR0, RES0_32)
+
+IDREG_END(ID_AA64FPFR0_EL1)
+
+
+/*  ID_AA64MMFR4_EL1  */
+IDREG_START(ID_AA64MMFR4_EL1)
+IDREG_FIELD_START(ID_AA64MMFR4, POPS,      0,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR4, POPS)
+
+IDREG_FIELD_START(ID_AA64MMFR4, EIESB,     4,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "toel3")
+IDREG_FIELD_ARCH_VAL(0b0010, "toelx")
+IDREG_FIELD_ARCH_VAL(0b1111, "any")
+IDREG_FIELD_END(ID_AA64MMFR4, EIESB)
+
+IDREG_FIELD_START(ID_AA64MMFR4, ASID2,     8,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR4, ASID2)
+
+IDREG_FIELD_START(ID_AA64MMFR4, HACDBS,   12,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR4, HACDBS)
+
+IDREG_FIELD_START(ID_AA64MMFR4, FGWTE3,   16,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR4, FGWTE3)
+
+IDREG_FIELD_START(ID_AA64MMFR4, NV_FRAC,  20,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "nv_nv2")
+IDREG_FIELD_ARCH_VAL(0b0001, "nv2_only")
+IDREG_FIELD_ARCH_VAL(0b0010, "nv2p1")
+IDREG_FIELD_END(ID_AA64MMFR4, NV_FRAC)
+
+IDREG_FIELD_START(ID_AA64MMFR4, E2H0,     24,  4, SIGNED_LOWER,  0b1111)
+IDREG_FIELD_ARCH_VAL(0b0000, "on")
+IDREG_FIELD_ARCH_VAL(0b1110, "ni_nv1")
+IDREG_FIELD_ARCH_VAL(0b1111, "off")
+IDREG_FIELD_END(ID_AA64MMFR4, E2H0)
+
+IDREG_FIELD_START(ID_AA64MMFR4, RMEGDI,   28,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR4, RMEGDI)
+
+IDREG_FIELD_START(ID_AA64MMFR4, RES0_32,  32,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64MMFR4, RES0_32)
+
+IDREG_FIELD_START(ID_AA64MMFR4, E3DSE,    36,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR4, E3DSE)
+
+IDREG_FIELD_START(ID_AA64MMFR4, RES0_40,  40,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64MMFR4, RES0_40)
+
+IDREG_FIELD_START(ID_AA64MMFR4, SRMASK,   44,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR4, SRMASK)
+
+IDREG_FIELD_START(ID_AA64MMFR4, RES0_48,  48, 16, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64MMFR4, RES0_48)
+
+IDREG_END(ID_AA64MMFR4_EL1)
+
+/*  ID_AA64DFR1_EL1  */
+IDREG_START(ID_AA64DFR1_EL1)
+IDREG_FIELD_START(ID_AA64DFR1, SYSPMUID,    0,  8, EXACT,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(ID_AA64DFR1, SYSPMUID)
+
+IDREG_FIELD_START(ID_AA64DFR1, BRPS,        8,  8, EXACT,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(ID_AA64DFR1, BRPS)
+
+IDREG_FIELD_START(ID_AA64DFR1, WRPS,       16,  8, EXACT,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(ID_AA64DFR1, WRPS)
+
+IDREG_FIELD_START(ID_AA64DFR1, CTX_CMPS,   24,  8, EXACT,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(ID_AA64DFR1, CTX_CMPS)
+
+IDREG_FIELD_START(ID_AA64DFR1, SPMU,       32,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "imp_spmzr")
+IDREG_FIELD_END(ID_AA64DFR1, SPMU)
+
+IDREG_FIELD_START(ID_AA64DFR1, PMICNTR,    36,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64DFR1, PMICNTR)
+
+IDREG_FIELD_START(ID_AA64DFR1, ABLE,       40,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64DFR1, ABLE)
+
+IDREG_FIELD_START(ID_AA64DFR1, ITE,        44,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64DFR1, ITE)
+
+IDREG_FIELD_START(ID_AA64DFR1, EBEP,       48,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64DFR1, EBEP)
+
+IDREG_FIELD_START(ID_AA64DFR1, DPFZS,      52,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "ignr")
+IDREG_FIELD_ARCH_VAL(0b0001, "frzn")
+IDREG_FIELD_END(ID_AA64DFR1, DPFZS)
+
+IDREG_FIELD_START(ID_AA64DFR1, ABL_CMPS,   56,  8, EXACT,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(ID_AA64DFR1, ABL_CMPS)
+
+IDREG_END(ID_AA64DFR1_EL1)
+
+/*  MIDR_EL1  */
+IDREG_START(MIDR_EL1)
+IDREG_FIELD_START(MIDR, REVISION,       0,  4, ANY,  0)
+IDREG_FIELD_END(MIDR, REVISION)
+
+IDREG_FIELD_START(MIDR, PARTNUM,        4, 12, ANY,  0)
+IDREG_FIELD_END(MIDR, PARTNUM)
+
+IDREG_FIELD_START(MIDR, ARCHITECTURE,  16,  4, ANY,  0)
+IDREG_FIELD_END(MIDR, ARCHITECTURE)
+
+IDREG_FIELD_START(MIDR, VARIANT,       20,  4, ANY,  0)
+IDREG_FIELD_END(MIDR, VARIANT)
+
+IDREG_FIELD_START(MIDR, IMPLEMENTER,   24,  8, ANY,  0)
+IDREG_FIELD_END(MIDR, IMPLEMENTER)
+
+IDREG_FIELD_START(MIDR, RES0_32,       32, 32, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(MIDR, RES0_32)
+
+IDREG_END(MIDR_EL1)
+
+/* REVIDR_EL1  */
+IDREG_START(REVIDR_EL1)
+IDREG_FIELD_START(REVIDR, VAL,  0, 64, ANY,  0)
+IDREG_FIELD_END(REVIDR, VAL)
+
+IDREG_END(REVIDR_EL1)
+
+/* AIDR_EL1  */
+IDREG_START(AIDR_EL1)
+IDREG_FIELD_START(AIDR, VAL,  0, 64, ANY,  0)
+IDREG_FIELD_END(AIDR, VAL)
+
+IDREG_END(AIDR_EL1)
+
+/* DCZID_EL0 */
+IDREG_START(DCZID_EL0)
+IDREG_FIELD_START(DCZID_EL0, BS,       0,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(DCZID_EL0, BS)
+
+IDREG_FIELD_START(DCZID_EL0, DZP,      4,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(DCZID_EL0, DZP)
+
+IDREG_FIELD_START(DCZID_EL0, RES0_5,   5, 59, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(DCZID_EL0, RES0_5)
+
+IDREG_END(DCZID_EL0)
+
+
+/*  ID_AA64AFR0_EL1  */
+IDREG_START(ID_AA64AFR0_EL1)
+IDREG_FIELD_START(ID_AA64AFR0, VAL,  0, 64, EXACT,  0)
+IDREG_FIELD_END(ID_AA64AFR0, VAL)
+
+IDREG_END(ID_AA64AFR0_EL1)
+
+/*  ID_AA64AFR1_EL1  */
+IDREG_START(ID_AA64AFR1_EL1)
+IDREG_FIELD_START(ID_AA64AFR1, VAL,  0, 64, EXACT,  0)
+IDREG_FIELD_END(ID_AA64AFR1, VAL)
+
+IDREG_END(ID_AA64AFR1_EL1)
+
+ /* AArch32 ID registers */
+
+/*  ID_PFR0_EL1  */
+IDREG_START(ID_PFR0_EL1)
+IDREG_FIELD_START(ID_PFR0, VAL,  0, 64, EXACT,  0)
+IDREG_FIELD_END(ID_PFR0, VAL)
+
+IDREG_END(ID_PFR0_EL1)
+
+/*  ID_PFR1_EL1  */
+IDREG_START(ID_PFR1_EL1)
+IDREG_FIELD_START(ID_PFR1, VAL_LO,    0, 28, EXACT,  0)
+IDREG_FIELD_END(ID_PFR1, VAL_LO)
+
+IDREG_FIELD_START(ID_PFR1, GIC,      28,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "gicv3")
+IDREG_FIELD_ARCH_VAL(0b0011, "gicv4p1")
+IDREG_FIELD_END(ID_PFR1, GIC)
+
+IDREG_FIELD_START(ID_PFR1, RES0_HI, 32, 32, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_PFR1, RES0_HI)
+
+IDREG_END(ID_PFR1_EL1)
+
+/* ID_DFR0_EL1  */
+IDREG_START(ID_DFR0_EL1)
+IDREG_FIELD_START(ID_DFR0, VAL_LO,    0, 24, EXACT,  0 )
+IDREG_FIELD_END(ID_DFR0, VAL_LO)
+
+IDREG_FIELD_START(ID_DFR0, PMU,      24,  4, LOWER,  0 )
+IDREG_FIELD_END(ID_DFR0, PMU)
+
+IDREG_FIELD_START(ID_DFR0, VAL_HI,   28,  4, EXACT,  0 )
+IDREG_FIELD_END(ID_DFR0, VAL_HI)
+
+IDREG_FIELD_START(ID_DFR0, RES0_HI, 32, 32, EXACT,  0 )
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_DFR0, RES0_HI)
+
+IDREG_END(ID_DFR0_EL1)
+
+/*  ID_AFR0_EL1  */
+IDREG_START(ID_AFR0_EL1)
+IDREG_FIELD_START(ID_AFR0, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_AFR0, VAL)
+
+IDREG_END(ID_AFR0_EL1)
+
+/* ID_MMFR0_EL1  */
+IDREG_START(ID_MMFR0_EL1)
+IDREG_FIELD_START(ID_MMFR0, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_MMFR0, VAL)
+
+IDREG_END(ID_MMFR0_EL1)
+
+/* ID_MMFR1_EL1  */
+IDREG_START(ID_MMFR1_EL1)
+IDREG_FIELD_START(ID_MMFR1, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_MMFR1, VAL)
+
+IDREG_END(ID_MMFR1_EL1)
+
+/* ID_MMFR2_EL1 */
+IDREG_START(ID_MMFR2_EL1)
+IDREG_FIELD_START(ID_MMFR2, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_MMFR2, VAL)
+
+IDREG_END(ID_MMFR2_EL1)
+
+/* ID_MMFR3_EL1  */
+IDREG_START(ID_MMFR3_EL1)
+IDREG_FIELD_START(ID_MMFR3, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_MMFR3, VAL)
+
+IDREG_END(ID_MMFR3_EL1)
+
+/*  ID_MMFR4_EL1  */
+IDREG_START(ID_MMFR4_EL1)
+IDREG_FIELD_START(ID_MMFR4, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_MMFR4, VAL)
+
+IDREG_END(ID_MMFR4_EL1)
+
+/* ID_MMFR5_EL1  */
+IDREG_START(ID_MMFR5_EL1)
+IDREG_FIELD_START(ID_MMFR5, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_MMFR5, VAL)
+
+IDREG_END(ID_MMFR5_EL1)
+
+/* ID_ISAR0_EL1  */
+IDREG_START(ID_ISAR0_EL1)
+IDREG_FIELD_START(ID_ISAR0, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_ISAR0, VAL)
+
+IDREG_END(ID_ISAR0_EL1)
+
+/*  ID_ISAR1_EL1  */
+IDREG_START(ID_ISAR1_EL1)
+IDREG_FIELD_START(ID_ISAR1, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_ISAR1, VAL)
+
+IDREG_END(ID_ISAR1_EL1)
+
+/*  ID_ISAR2_EL1  */
+IDREG_START(ID_ISAR2_EL1)
+IDREG_FIELD_START(ID_ISAR2, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_ISAR2, VAL)
+
+IDREG_END(ID_ISAR2_EL1)
+
+/*  ID_ISAR3_EL1  */
+IDREG_START(ID_ISAR3_EL1)
+IDREG_FIELD_START(ID_ISAR3, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_ISAR3, VAL)
+
+IDREG_END(ID_ISAR3_EL1)
+
+/*  ID_ISAR4_EL1  */
+IDREG_START(ID_ISAR4_EL1)
+IDREG_FIELD_START(ID_ISAR4, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_ISAR4, VAL)
+
+IDREG_END(ID_ISAR4_EL1)
+
+/* ID_ISAR5_EL1  */
+IDREG_START(ID_ISAR5_EL1)
+IDREG_FIELD_START(ID_ISAR5, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_ISAR5, VAL)
+
+IDREG_END(ID_ISAR5_EL1)
+
+/*  ID_ISAR6_EL1  */
+IDREG_START(ID_ISAR6_EL1)
+IDREG_FIELD_START(ID_ISAR6, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_ISAR6, VAL)
+
+IDREG_END(ID_ISAR6_EL1)
+
+/*  ID_PFR2_EL1  */
+IDREG_START(ID_PFR2_EL1)
+IDREG_FIELD_START(ID_PFR2, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_PFR2, VAL)
+
+IDREG_END(ID_PFR2_EL1)
+
+/*  ID_DFR1_EL1 */
+IDREG_START(ID_DFR1_EL1)
+IDREG_FIELD_START(ID_DFR1, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_DFR1, VAL)
+
+IDREG_END(ID_DFR1_EL1)
+
+/*  MVFR0_EL1  */
+IDREG_START(MVFR0_EL1)
+IDREG_FIELD_START(MVFR0, VAL,  0, 64, EXACT,  0)
+IDREG_FIELD_END(MVFR0, VAL)
+
+IDREG_END(MVFR0_EL1)
+
+/*  MVFR1_EL1  */
+IDREG_START(MVFR1_EL1)
+IDREG_FIELD_START(MVFR1, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(MVFR1, VAL)
+
+IDREG_END(MVFR1_EL1)
+
+/* MVFR2_EL1  */
+IDREG_START(MVFR2_EL1)
+IDREG_FIELD_START(MVFR2, VAL,  0, 64, EXACT,  0)
+IDREG_FIELD_END(MVFR2, VAL)
+
+IDREG_END(MVFR2_EL1)
Signature · 1 line
2.52.0
#3 lore raw

Re: [RFC PATCH v1 02/13] target/arm: named_cpu_model: Add ID Register Fields

Hi,

Quoted 6 lines · Shaju Abraham

Add a declarative description of every architecturally defined field in the Arm64 ID registers in cpu-idregs.h.inc file. This file will be included multiple times with different definitions to build the per-field arch values, per-register field descriptor arrays, arm-idregs table etc. The architecturely defined values for each ID register field is extracted from kernel's arch/arm64/tools/sysreg file. The safe-value tags and default values are

In the past we were rather advised to use AARCHMRS instead of sysreg. This is what is currently done in [PATCH v4 00/17] kvm/arm: Introduce a customizable aarch64 KVM host model.

Quoted 6 lines

derived from the kernel's ftr_bits array. Aarch32 ID registers are added with dummy field so they can be defaulted to 0 by later commits.

X-macro structure:
IDREG_START(REG)
IDREG_FIELD_START(REG, FIELD, SHIFT, LENGTH, SAFE_RULE, DEFAULT_VAL)

Why do you need SAFE_RULE/DEFAULT_VAL? As far as I understand this is used when we have different flavours of CPUS in SMP and we face mismatches between CPU features. Why do we care here?

I don't see safe_rule used anywhere.
I see arm_idregs_reset_to_defaults() uses the default value though. Should we use the Registers.json reset value instead?

Quoted 78 lines

IDREG_FIELD_ARCH_VAL(VALUE, NAME)
...
IDREG_FIELD_END(REG, FIELD)
...
IDREG_END(REG)

---
 target/arm/cpu-idregs.h.inc | 1724 +++++++++++++++++++++++++++++++++++
 1 file changed, 1724 insertions(+)
 create mode 100644 target/arm/cpu-idregs.h.inc
target/arm/cpu-idregs.h.inc new file +59 -0
new file mode 100644
index 0000000000..5a627631c9
@@ -0,0 +1,1724 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+/* ID_AA64ISAR0_EL1 */
+IDREG_START(ID_AA64ISAR0_EL1)
+IDREG_FIELD_START(ID_AA64ISAR0, RES0_0,   0,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64ISAR0, RES0_0)
+
+IDREG_FIELD_START(ID_AA64ISAR0, AES,      4,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "aes")
+IDREG_FIELD_ARCH_VAL(0b0010, "pmull")
+IDREG_FIELD_END(ID_AA64ISAR0, AES)
+
+IDREG_FIELD_START(ID_AA64ISAR0, SHA1,     8,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR0, SHA1)
+
+IDREG_FIELD_START(ID_AA64ISAR0, SHA2,    12,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "sha256")
+IDREG_FIELD_ARCH_VAL(0b0010, "sha512")
+IDREG_FIELD_END(ID_AA64ISAR0, SHA2)
+
+IDREG_FIELD_START(ID_AA64ISAR0, CRC32,   16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR0, CRC32)
+
+IDREG_FIELD_START(ID_AA64ISAR0, ATOMIC,  20,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0010, "on")
+IDREG_FIELD_ARCH_VAL(0b0011, "LSE128")
+IDREG_FIELD_END(ID_AA64ISAR0, ATOMIC)
+
+IDREG_FIELD_START(ID_AA64ISAR0, RES0_24, 24,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64ISAR0, RES0_24)
+
+IDREG_FIELD_START(ID_AA64ISAR0, RDM,     28,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR0, RDM)
+
+IDREG_FIELD_START(ID_AA64ISAR0, SHA3,    32,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR0, SHA3)
+
+IDREG_FIELD_START(ID_AA64ISAR0, SM3,     36,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR0, SM3)
+
+IDREG_FIELD_START(ID_AA64ISAR0, SM4,     40,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR0, SM4)

target/arm/cpu-idregs.h.inc line 69

Quoted 10 lines
target/arm/cpu-idregs.h.inc new file +10 -0
+
+IDREG_FIELD_START(ID_AA64ISAR0, DP,      44,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR0, DP)
+
+IDREG_FIELD_START(ID_AA64ISAR0, FHM,     48,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR0, FHM)

taking FHM field if I compare with sysreg I have:
UnsignedEnum    51:48   FHM
        0b0000  NI
        0b0001  IMP
        0b0010  F16F32DOT
        0b0011  F16F32MM
So why do we miss some values?

So when you say this is extracted fril sysreg, is it a manual process including renaminf of some field values?

Can't we reuse the extraction from registers.json. If we agree on a common IDREG field description pattern, I think this could be achievable

Thanks

Eric

Quoted 1,655 lines
target/arm/cpu-idregs.h.inc new file +1655 -0
+
+IDREG_FIELD_START(ID_AA64ISAR0, TS,      52,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "flagm")
+IDREG_FIELD_ARCH_VAL(0b0010, "flagm2")
+IDREG_FIELD_END(ID_AA64ISAR0, TS)
+
+IDREG_FIELD_START(ID_AA64ISAR0, TLB,     56,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "os")
+IDREG_FIELD_ARCH_VAL(0b0010, "range")
+IDREG_FIELD_END(ID_AA64ISAR0, TLB)
+
+IDREG_FIELD_START(ID_AA64ISAR0, RNDR,    60,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR0, RNDR)
+
+IDREG_END(ID_AA64ISAR0_EL1)
+
+/* ID_AA64ISAR1_EL1 */
+IDREG_START(ID_AA64ISAR1_EL1)
+IDREG_FIELD_START(ID_AA64ISAR1, DPB,      0,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "dpb2")
+IDREG_FIELD_END(ID_AA64ISAR1, DPB)
+
+IDREG_FIELD_START(ID_AA64ISAR1, APA,      4,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "pauth")
+IDREG_FIELD_ARCH_VAL(0b0010, "epac")
+IDREG_FIELD_ARCH_VAL(0b0011, "pauth2")
+IDREG_FIELD_ARCH_VAL(0b0100, "fpac")
+IDREG_FIELD_ARCH_VAL(0b0101, "fpaccombine")
+IDREG_FIELD_ARCH_VAL(0b0110, "pauth_lr")
+IDREG_FIELD_END(ID_AA64ISAR1, APA)
+
+IDREG_FIELD_START(ID_AA64ISAR1, API,      8,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "pauth")
+IDREG_FIELD_ARCH_VAL(0b0010, "epac")
+IDREG_FIELD_ARCH_VAL(0b0011, "pauth2")
+IDREG_FIELD_ARCH_VAL(0b0100, "fpac")
+IDREG_FIELD_ARCH_VAL(0b0101, "fpaccombine")
+IDREG_FIELD_ARCH_VAL(0b0110, "pauth_lr")
+IDREG_FIELD_END(ID_AA64ISAR1, API)
+
+IDREG_FIELD_START(ID_AA64ISAR1, JSCVT,   12,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR1, JSCVT)
+
+IDREG_FIELD_START(ID_AA64ISAR1, FCMA,    16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR1, FCMA)
+
+IDREG_FIELD_START(ID_AA64ISAR1, LRCPC,   20,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "lrcpc2")
+IDREG_FIELD_ARCH_VAL(0b0011, "lrcpc3")
+IDREG_FIELD_END(ID_AA64ISAR1, LRCPC)
+
+IDREG_FIELD_START(ID_AA64ISAR1, GPA,     24,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR1, GPA)
+
+IDREG_FIELD_START(ID_AA64ISAR1, GPI,     28,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR1, GPI)
+
+IDREG_FIELD_START(ID_AA64ISAR1, FRINTTS, 32,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR1, FRINTTS)
+
+IDREG_FIELD_START(ID_AA64ISAR1, SB,      36,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR1, SB)
+
+IDREG_FIELD_START(ID_AA64ISAR1, SPECRES, 40,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "cosp_rctx")
+IDREG_FIELD_END(ID_AA64ISAR1, SPECRES)
+
+IDREG_FIELD_START(ID_AA64ISAR1, BF16,    44,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "ebf16")
+IDREG_FIELD_END(ID_AA64ISAR1, BF16)
+
+IDREG_FIELD_START(ID_AA64ISAR1, DGH,     48,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR1, DGH)
+
+IDREG_FIELD_START(ID_AA64ISAR1, I8MM,    52,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR1, I8MM)
+
+IDREG_FIELD_START(ID_AA64ISAR1, XS,      56,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR1, XS)
+
+IDREG_FIELD_START(ID_AA64ISAR1, LS64,    60,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "ls64")
+IDREG_FIELD_ARCH_VAL(0b0010, "ls64_v")
+IDREG_FIELD_ARCH_VAL(0b0011, "ls64_accdata")
+IDREG_FIELD_ARCH_VAL(0b0100, "ls64wb")
+IDREG_FIELD_END(ID_AA64ISAR1, LS64)
+
+IDREG_END(ID_AA64ISAR1_EL1)
+
+/*  ID_AA64ISAR2_EL1  */
+IDREG_START(ID_AA64ISAR2_EL1)
+IDREG_FIELD_START(ID_AA64ISAR2, WFXT,          0,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0010, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, WFXT)
+
+IDREG_FIELD_START(ID_AA64ISAR2, RPRES,         4,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, RPRES)
+
+IDREG_FIELD_START(ID_AA64ISAR2, GPA3,          8,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, GPA3)
+
+IDREG_FIELD_START(ID_AA64ISAR2, APA3,         12,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "pauth")
+IDREG_FIELD_ARCH_VAL(0b0010, "epac")
+IDREG_FIELD_ARCH_VAL(0b0011, "pauth2")
+IDREG_FIELD_ARCH_VAL(0b0100, "fpac")
+IDREG_FIELD_ARCH_VAL(0b0101, "fpaccombine")
+IDREG_FIELD_ARCH_VAL(0b0110, "pauth_lr")
+IDREG_FIELD_END(ID_AA64ISAR2, APA3)
+
+IDREG_FIELD_START(ID_AA64ISAR2, MOPS,         16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, MOPS)
+
+IDREG_FIELD_START(ID_AA64ISAR2, BC,           20,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, BC)
+
+IDREG_FIELD_START(ID_AA64ISAR2, PAC_FRAC,     24,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, PAC_FRAC)
+
+IDREG_FIELD_START(ID_AA64ISAR2, CLRBHB,       28,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, CLRBHB)
+
+IDREG_FIELD_START(ID_AA64ISAR2, SYSREG_128,   32,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, SYSREG_128)
+
+IDREG_FIELD_START(ID_AA64ISAR2, SYSINSTR_128, 36,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, SYSINSTR_128)
+
+IDREG_FIELD_START(ID_AA64ISAR2, PRFMSLC,      40,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, PRFMSLC)
+
+IDREG_FIELD_START(ID_AA64ISAR2, PCDPHINT,     44,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, PCDPHINT)
+
+IDREG_FIELD_START(ID_AA64ISAR2, RPRFM,        48,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, RPRFM)
+
+IDREG_FIELD_START(ID_AA64ISAR2, CSSC,         52,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "cmpbr")
+IDREG_FIELD_END(ID_AA64ISAR2, CSSC)
+
+IDREG_FIELD_START(ID_AA64ISAR2, LUT,          56,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, LUT)
+
+IDREG_FIELD_START(ID_AA64ISAR2, ATS1A,        60,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, ATS1A)
+
+IDREG_END(ID_AA64ISAR2_EL1)
+
+/*  ID_AA64PFR0_EL1  */
+IDREG_START(ID_AA64PFR0_EL1)
+IDREG_FIELD_START(ID_AA64PFR0, EL0,     0,  4, LOWER,  0b0001)
+IDREG_FIELD_ARCH_VAL(0b0001, "aarch64")
+IDREG_FIELD_ARCH_VAL(0b0010, "aarch32")
+IDREG_FIELD_END(ID_AA64PFR0, EL0)
+
+IDREG_FIELD_START(ID_AA64PFR0, EL1,     4,  4, LOWER,  0b0001)
+IDREG_FIELD_ARCH_VAL(0b0001, "aarch64")
+IDREG_FIELD_ARCH_VAL(0b0010, "aarch32")
+IDREG_FIELD_END(ID_AA64PFR0, EL1)
+
+IDREG_FIELD_START(ID_AA64PFR0, EL2,     8,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "aarch64")
+IDREG_FIELD_ARCH_VAL(0b0010, "aarch32")
+IDREG_FIELD_END(ID_AA64PFR0, EL2)
+
+IDREG_FIELD_START(ID_AA64PFR0, EL3,    12,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "aarch64")
+IDREG_FIELD_ARCH_VAL(0b0010, "aarch32")
+IDREG_FIELD_END(ID_AA64PFR0, EL3)
+
+IDREG_FIELD_START(ID_AA64PFR0, FP,     16,  4, SIGNED_LOWER,  0b1111)
+IDREG_FIELD_ARCH_VAL(0b0000, "on")
+IDREG_FIELD_ARCH_VAL(0b0001, "fp16")
+IDREG_FIELD_ARCH_VAL(0b1111, "off")
+IDREG_FIELD_END(ID_AA64PFR0, FP)
+
+IDREG_FIELD_START(ID_AA64PFR0, ADVSIMD,20,  4, SIGNED_LOWER,  0b1111)
+IDREG_FIELD_ARCH_VAL(0b0000, "on")
+IDREG_FIELD_ARCH_VAL(0b0001, "fp16")
+IDREG_FIELD_ARCH_VAL(0b1111, "off")
+IDREG_FIELD_END(ID_AA64PFR0, ADVSIMD)
+
+IDREG_FIELD_START(ID_AA64PFR0, GIC,    24,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0011, "v4p1")
+IDREG_FIELD_END(ID_AA64PFR0, GIC)
+
+IDREG_FIELD_START(ID_AA64PFR0, RAS,    28,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "v1p1")
+IDREG_FIELD_ARCH_VAL(0b0011, "v2")
+IDREG_FIELD_END(ID_AA64PFR0, RAS)
+
+IDREG_FIELD_START(ID_AA64PFR0, SVE,    32,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR0, SVE)
+
+IDREG_FIELD_START(ID_AA64PFR0, SEL2,   36,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR0, SEL2)
+
+IDREG_FIELD_START(ID_AA64PFR0, MPAM,   40,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "0")
+IDREG_FIELD_ARCH_VAL(0b0001, "1")
+IDREG_FIELD_END(ID_AA64PFR0, MPAM)
+
+IDREG_FIELD_START(ID_AA64PFR0, AMU,    44,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "v1p1")
+IDREG_FIELD_END(ID_AA64PFR0, AMU)
+
+IDREG_FIELD_START(ID_AA64PFR0, DIT,    48,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR0, DIT)
+
+IDREG_FIELD_START(ID_AA64PFR0, RME,    52,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR0, RME)
+
+IDREG_FIELD_START(ID_AA64PFR0, CSV2,   56,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "csv2_2")
+IDREG_FIELD_ARCH_VAL(0b0011, "csv2_3")
+IDREG_FIELD_END(ID_AA64PFR0, CSV2)
+
+IDREG_FIELD_START(ID_AA64PFR0, CSV3,   60,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR0, CSV3)
+
+IDREG_END(ID_AA64PFR0_EL1)
+
+/*  ID_AA64PFR1_EL1  */
+IDREG_START(ID_AA64PFR1_EL1)
+IDREG_FIELD_START(ID_AA64PFR1, BT,        0,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR1, BT)
+
+IDREG_FIELD_START(ID_AA64PFR1, SSBS,      4,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "ssbs2")
+IDREG_FIELD_END(ID_AA64PFR1, SSBS)
+
+IDREG_FIELD_START(ID_AA64PFR1, MTE,       8,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "mte2")
+IDREG_FIELD_ARCH_VAL(0b0011, "mte3")
+IDREG_FIELD_END(ID_AA64PFR1, MTE)
+
+IDREG_FIELD_START(ID_AA64PFR1, RAS_FRAC, 12,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "rasv1p1")
+IDREG_FIELD_END(ID_AA64PFR1, RAS_FRAC)
+
+IDREG_FIELD_START(ID_AA64PFR1, MPAM_FRAC,16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "minor_0")
+IDREG_FIELD_ARCH_VAL(0b0001, "minor_1")
+IDREG_FIELD_END(ID_AA64PFR1, MPAM_FRAC)
+
+IDREG_FIELD_START(ID_AA64PFR1, RES0_20,  20,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64PFR1, RES0_20)
+
+IDREG_FIELD_START(ID_AA64PFR1, SME,      24,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "sme2")
+IDREG_FIELD_END(ID_AA64PFR1, SME)
+
+IDREG_FIELD_START(ID_AA64PFR1, RNDR_TRAP,28,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR1, RNDR_TRAP)
+
+IDREG_FIELD_START(ID_AA64PFR1, CSV2_FRAC,32,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "csv2_1p1")
+IDREG_FIELD_ARCH_VAL(0b0010, "csv2_1p2")
+IDREG_FIELD_END(ID_AA64PFR1, CSV2_FRAC)
+
+IDREG_FIELD_START(ID_AA64PFR1, NMI,      36,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR1, NMI)
+
+IDREG_FIELD_START(ID_AA64PFR1, MTE_FRAC, 40,  4, SIGNED_LOWER,  0b1111)
+IDREG_FIELD_ARCH_VAL(0b0000, "async")
+IDREG_FIELD_ARCH_VAL(0b1111, "off")
+IDREG_FIELD_END(ID_AA64PFR1, MTE_FRAC)
+
+IDREG_FIELD_START(ID_AA64PFR1, GCS,      44,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR1, GCS)
+
+IDREG_FIELD_START(ID_AA64PFR1, THE,      48,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR1, THE)
+
+IDREG_FIELD_START(ID_AA64PFR1, MTEX,     52,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "mte")
+IDREG_FIELD_ARCH_VAL(0b0001, "mte4")
+IDREG_FIELD_END(ID_AA64PFR1, MTEX)
+
+IDREG_FIELD_START(ID_AA64PFR1, DF2,      56,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR1, DF2)
+
+IDREG_FIELD_START(ID_AA64PFR1, PFAR,     60,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR1, PFAR)
+
+IDREG_END(ID_AA64PFR1_EL1)
+
+/*  ID_AA64MMFR0_EL1 */
+IDREG_START(ID_AA64MMFR0_EL1)
+IDREG_FIELD_START(ID_AA64MMFR0, PARANGE,    0,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "32")
+IDREG_FIELD_ARCH_VAL(0b0001, "36")
+IDREG_FIELD_ARCH_VAL(0b0010, "40")
+IDREG_FIELD_ARCH_VAL(0b0011, "42")
+IDREG_FIELD_ARCH_VAL(0b0100, "44")
+IDREG_FIELD_ARCH_VAL(0b0101, "48")
+IDREG_FIELD_ARCH_VAL(0b0110, "52")
+IDREG_FIELD_ARCH_VAL(0b0111, "56")
+IDREG_FIELD_END(ID_AA64MMFR0, PARANGE)
+
+IDREG_FIELD_START(ID_AA64MMFR0, ASIDBITS,   4,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "8")
+IDREG_FIELD_ARCH_VAL(0b0010, "16")
+IDREG_FIELD_END(ID_AA64MMFR0, ASIDBITS)
+
+IDREG_FIELD_START(ID_AA64MMFR0, BIGEND,     8,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR0, BIGEND)
+
+IDREG_FIELD_START(ID_AA64MMFR0, SNSMEM,    12,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR0, SNSMEM)
+
+IDREG_FIELD_START(ID_AA64MMFR0, BIGENDEL0, 16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR0, BIGENDEL0)
+
+IDREG_FIELD_START(ID_AA64MMFR0, TGRAN16,   20,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "52_bit")
+IDREG_FIELD_END(ID_AA64MMFR0, TGRAN16)
+
+IDREG_FIELD_START(ID_AA64MMFR0, TGRAN64,   24,  4, SIGNED_LOWER,  0b1111)
+IDREG_FIELD_ARCH_VAL(0b0000, "on")
+IDREG_FIELD_ARCH_VAL(0b1111, "off")
+IDREG_FIELD_END(ID_AA64MMFR0, TGRAN64)
+
+IDREG_FIELD_START(ID_AA64MMFR0, TGRAN4,    28,  4, SIGNED_LOWER,  0b1111)
+IDREG_FIELD_ARCH_VAL(0b0000, "on")
+IDREG_FIELD_ARCH_VAL(0b0001, "52_bit")
+IDREG_FIELD_ARCH_VAL(0b1111, "off")
+IDREG_FIELD_END(ID_AA64MMFR0, TGRAN4)
+
+IDREG_FIELD_START(ID_AA64MMFR0, TGRAN16_2, 32,  4, EXACT,  0b0001)
+IDREG_FIELD_ARCH_VAL(0b0000, "tgran16")
+IDREG_FIELD_ARCH_VAL(0b0001, "off")
+IDREG_FIELD_ARCH_VAL(0b0010, "on")
+IDREG_FIELD_ARCH_VAL(0b0011, "52_bit")
+IDREG_FIELD_END(ID_AA64MMFR0, TGRAN16_2)
+
+IDREG_FIELD_START(ID_AA64MMFR0, TGRAN64_2, 36,  4, EXACT,  0b0001)
+IDREG_FIELD_ARCH_VAL(0b0000, "tgran64")
+IDREG_FIELD_ARCH_VAL(0b0001, "off")
+IDREG_FIELD_ARCH_VAL(0b0010, "on")
+IDREG_FIELD_END(ID_AA64MMFR0, TGRAN64_2)
+
+IDREG_FIELD_START(ID_AA64MMFR0, TGRAN4_2,  40,  4, EXACT,  0b0001)
+IDREG_FIELD_ARCH_VAL(0b0000, "tgran4")
+IDREG_FIELD_ARCH_VAL(0b0001, "off")
+IDREG_FIELD_ARCH_VAL(0b0010, "on")
+IDREG_FIELD_ARCH_VAL(0b0011, "52_bit")
+IDREG_FIELD_END(ID_AA64MMFR0, TGRAN4_2)
+
+IDREG_FIELD_START(ID_AA64MMFR0, EXS,       44,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR0, EXS)
+
+IDREG_FIELD_START(ID_AA64MMFR0, RES0_48,   48,  8, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64MMFR0, RES0_48)
+
+IDREG_FIELD_START(ID_AA64MMFR0, FGT,       56,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "fgt2")
+IDREG_FIELD_END(ID_AA64MMFR0, FGT)
+
+IDREG_FIELD_START(ID_AA64MMFR0, ECV,       60,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "cntpoff")
+IDREG_FIELD_END(ID_AA64MMFR0, ECV)
+
+IDREG_END(ID_AA64MMFR0_EL1)
+
+/*  ID_AA64MMFR1_EL1  */
+IDREG_START(ID_AA64MMFR1_EL1)
+IDREG_FIELD_START(ID_AA64MMFR1, HAFDBS,    0,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "af")
+IDREG_FIELD_ARCH_VAL(0b0010, "dbm")
+IDREG_FIELD_ARCH_VAL(0b0011, "haft")
+IDREG_FIELD_ARCH_VAL(0b0100, "hdbss")
+IDREG_FIELD_END(ID_AA64MMFR1, HAFDBS)
+
+IDREG_FIELD_START(ID_AA64MMFR1, VMIDBITS,  4,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "8")
+IDREG_FIELD_ARCH_VAL(0b0010, "16")
+IDREG_FIELD_END(ID_AA64MMFR1, VMIDBITS)
+
+IDREG_FIELD_START(ID_AA64MMFR1, VH,        8,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, VH)
+
+IDREG_FIELD_START(ID_AA64MMFR1, HPDS,     12,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "hpds2")
+IDREG_FIELD_END(ID_AA64MMFR1, HPDS)
+
+IDREG_FIELD_START(ID_AA64MMFR1, LO,       16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, LO)
+
+IDREG_FIELD_START(ID_AA64MMFR1, PAN,      20,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "pan2")
+IDREG_FIELD_ARCH_VAL(0b0011, "pan3")
+IDREG_FIELD_END(ID_AA64MMFR1, PAN)
+
+IDREG_FIELD_START(ID_AA64MMFR1, SPECSEI,  24,  4, HIGHER, 0b0001)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, SPECSEI)
+
+IDREG_FIELD_START(ID_AA64MMFR1, XNX,      28,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, XNX)
+
+IDREG_FIELD_START(ID_AA64MMFR1, TWED,     32,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, TWED)
+
+IDREG_FIELD_START(ID_AA64MMFR1, ETS,      36,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "ets2")
+IDREG_FIELD_ARCH_VAL(0b0011, "ets3")
+IDREG_FIELD_END(ID_AA64MMFR1, ETS)
+
+IDREG_FIELD_START(ID_AA64MMFR1, HCX,      40,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, HCX)
+
+IDREG_FIELD_START(ID_AA64MMFR1, AFP,      44,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, AFP)
+
+IDREG_FIELD_START(ID_AA64MMFR1, NTLBPA,   48,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, NTLBPA)
+
+IDREG_FIELD_START(ID_AA64MMFR1, TIDCP1,   52,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, TIDCP1)
+
+IDREG_FIELD_START(ID_AA64MMFR1, CMOW,     56,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, CMOW)
+
+IDREG_FIELD_START(ID_AA64MMFR1, ECBHB,    60,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, ECBHB)
+
+IDREG_END(ID_AA64MMFR1_EL1)
+
+/*  ID_AA64MMFR2_EL1  */
+IDREG_START(ID_AA64MMFR2_EL1)
+IDREG_FIELD_START(ID_AA64MMFR2, CNP,      0,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR2, CNP)
+
+IDREG_FIELD_START(ID_AA64MMFR2, UAO,      4,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR2, UAO)
+
+IDREG_FIELD_START(ID_AA64MMFR2, LSM,      8,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR2, LSM)
+
+IDREG_FIELD_START(ID_AA64MMFR2, IESB,    12,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR2, IESB)
+
+IDREG_FIELD_START(ID_AA64MMFR2, VARANGE, 16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "48")
+IDREG_FIELD_ARCH_VAL(0b0001, "52")
+IDREG_FIELD_END(ID_AA64MMFR2, VARANGE)
+
+IDREG_FIELD_START(ID_AA64MMFR2, CCIDX,   20,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "32")
+IDREG_FIELD_ARCH_VAL(0b0001, "64")
+IDREG_FIELD_END(ID_AA64MMFR2, CCIDX)
+
+IDREG_FIELD_START(ID_AA64MMFR2, NV,      24,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "nv2")
+IDREG_FIELD_END(ID_AA64MMFR2, NV)
+
+IDREG_FIELD_START(ID_AA64MMFR2, ST,      28,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "39")
+IDREG_FIELD_ARCH_VAL(0b0001, "48_47")
+IDREG_FIELD_END(ID_AA64MMFR2, ST)
+
+IDREG_FIELD_START(ID_AA64MMFR2, AT,      32,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR2, AT)
+
+IDREG_FIELD_START(ID_AA64MMFR2, IDS,     36,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "0x0")
+IDREG_FIELD_ARCH_VAL(0b0001, "0x18")
+IDREG_FIELD_END(ID_AA64MMFR2, IDS)
+
+IDREG_FIELD_START(ID_AA64MMFR2, FWB,     40,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR2, FWB)
+
+IDREG_FIELD_START(ID_AA64MMFR2, RES0_44, 44,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64MMFR2, RES0_44)
+
+IDREG_FIELD_START(ID_AA64MMFR2, TTL,     48,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR2, TTL)
+
+IDREG_FIELD_START(ID_AA64MMFR2, BBM,     52,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "0")
+IDREG_FIELD_ARCH_VAL(0b0001, "1")
+IDREG_FIELD_ARCH_VAL(0b0010, "2")
+IDREG_FIELD_END(ID_AA64MMFR2, BBM)
+
+IDREG_FIELD_START(ID_AA64MMFR2, EVT,     56,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "ttlbxs")
+IDREG_FIELD_END(ID_AA64MMFR2, EVT)
+
+IDREG_FIELD_START(ID_AA64MMFR2, E0PD,    60,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR2, E0PD)
+
+IDREG_END(ID_AA64MMFR2_EL1)
+
+/* ID_AA64MMFR3_EL1  */
+IDREG_START(ID_AA64MMFR3_EL1)
+IDREG_FIELD_START(ID_AA64MMFR3, TCRX,       0,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, TCRX)
+
+IDREG_FIELD_START(ID_AA64MMFR3, SCTLRX,     4,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, SCTLRX)
+
+IDREG_FIELD_START(ID_AA64MMFR3, S1PIE,      8,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, S1PIE)
+
+IDREG_FIELD_START(ID_AA64MMFR3, S2PIE,     12,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, S2PIE)
+
+IDREG_FIELD_START(ID_AA64MMFR3, S1POE,     16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, S1POE)
+
+IDREG_FIELD_START(ID_AA64MMFR3, S2POE,     20,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, S2POE)
+
+IDREG_FIELD_START(ID_AA64MMFR3, AIE,       24,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, AIE)
+
+IDREG_FIELD_START(ID_AA64MMFR3, MEC,       28,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, MEC)
+
+IDREG_FIELD_START(ID_AA64MMFR3, D128,      32,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, D128)
+
+IDREG_FIELD_START(ID_AA64MMFR3, D128_2,    36,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, D128_2)
+
+IDREG_FIELD_START(ID_AA64MMFR3, SNERR,     40,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "sync")
+IDREG_FIELD_ARCH_VAL(0b0010, "ANERR")
+IDREG_FIELD_ARCH_VAL(0b0011, "ANERR_IND")
+IDREG_FIELD_END(ID_AA64MMFR3, SNERR)
+
+IDREG_FIELD_START(ID_AA64MMFR3, ANERR,     44,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "async")
+IDREG_FIELD_ARCH_VAL(0b0010, "ANERR")
+IDREG_FIELD_ARCH_VAL(0b0011, "ANERR_IND")
+IDREG_FIELD_END(ID_AA64MMFR3, ANERR)
+
+IDREG_FIELD_START(ID_AA64MMFR3, RES0_48,   48,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64MMFR3, RES0_48)
+
+IDREG_FIELD_START(ID_AA64MMFR3, SDERR,     52,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "dev_sync")
+IDREG_FIELD_ARCH_VAL(0b0010, "ADERR")
+IDREG_FIELD_ARCH_VAL(0b0011, "ADERR_IND")
+IDREG_FIELD_END(ID_AA64MMFR3, SDERR)
+
+IDREG_FIELD_START(ID_AA64MMFR3, ADERR,     56,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "dev_async")
+IDREG_FIELD_ARCH_VAL(0b0010, "ADERR")
+IDREG_FIELD_ARCH_VAL(0b0011, "ADERR_IND")
+IDREG_FIELD_END(ID_AA64MMFR3, ADERR)
+
+IDREG_FIELD_START(ID_AA64MMFR3, SPEC_FPACC,60,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, SPEC_FPACC)
+
+IDREG_END(ID_AA64MMFR3_EL1)
+
+/* ID_AA64DFR0_EL1 */
+IDREG_START(ID_AA64DFR0_EL1)
+IDREG_FIELD_START(ID_AA64DFR0, DEBUGVER,    0,  4, LOWER,  0x6)
+IDREG_FIELD_ARCH_VAL(0b0110, "on")
+IDREG_FIELD_ARCH_VAL(0b0111, "vhe")
+IDREG_FIELD_ARCH_VAL(0b1000, "v8p2")
+IDREG_FIELD_ARCH_VAL(0b1001, "v8p4")
+IDREG_FIELD_ARCH_VAL(0b1010, "v8p8")
+IDREG_FIELD_ARCH_VAL(0b1011, "v8p9")
+IDREG_FIELD_END(ID_AA64DFR0, DEBUGVER)
+
+IDREG_FIELD_START(ID_AA64DFR0, TRACEVER,    4,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64DFR0, TRACEVER)
+
+IDREG_FIELD_START(ID_AA64DFR0, PMUVER,      8,  4, SIGNED_LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0100, "v3p1")
+IDREG_FIELD_ARCH_VAL(0b0101, "v3p4")
+IDREG_FIELD_ARCH_VAL(0b0110, "v3p5")
+IDREG_FIELD_ARCH_VAL(0b0111, "v3p7")
+IDREG_FIELD_ARCH_VAL(0b1000, "v3p8")
+IDREG_FIELD_ARCH_VAL(0b1001, "v3p9")
+IDREG_FIELD_ARCH_VAL(0b1111, "imp_def")
+IDREG_FIELD_END(ID_AA64DFR0, PMUVER)
+
+IDREG_FIELD_START(ID_AA64DFR0, BRPS,       12,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(ID_AA64DFR0, BRPS)
+
+IDREG_FIELD_START(ID_AA64DFR0, PMSS,       16,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64DFR0, PMSS)
+
+IDREG_FIELD_START(ID_AA64DFR0, WRPS,       20,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(ID_AA64DFR0, WRPS)
+
+IDREG_FIELD_START(ID_AA64DFR0, SEBEP,      24,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64DFR0, SEBEP)
+
+IDREG_FIELD_START(ID_AA64DFR0, CTX_CMPS,   28,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(ID_AA64DFR0, CTX_CMPS)
+
+IDREG_FIELD_START(ID_AA64DFR0, PMSVER,     32,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "v1p1")
+IDREG_FIELD_ARCH_VAL(0b0011, "v1p2")
+IDREG_FIELD_ARCH_VAL(0b0100, "v1p3")
+IDREG_FIELD_ARCH_VAL(0b0101, "v1p4")
+IDREG_FIELD_ARCH_VAL(0b0110, "v1p5")
+IDREG_FIELD_END(ID_AA64DFR0, PMSVER)
+
+IDREG_FIELD_START(ID_AA64DFR0, DOUBLELOCK, 36,  4, SIGNED_LOWER,  0b1111)
+IDREG_FIELD_ARCH_VAL(0b0000, "on")
+IDREG_FIELD_ARCH_VAL(0b1111, "off")
+IDREG_FIELD_END(ID_AA64DFR0, DOUBLELOCK)
+
+IDREG_FIELD_START(ID_AA64DFR0, TRACEFILT,  40,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64DFR0, TRACEFILT)
+
+IDREG_FIELD_START(ID_AA64DFR0, TRACEBUFFER,44,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "trbe_v1p1")
+IDREG_FIELD_END(ID_AA64DFR0, TRACEBUFFER)
+
+IDREG_FIELD_START(ID_AA64DFR0, MTPMU,      48,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "ni_impdef")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b1111, "off")
+IDREG_FIELD_END(ID_AA64DFR0, MTPMU)
+
+IDREG_FIELD_START(ID_AA64DFR0, BRBE,       52,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "brbe_v1p1")
+IDREG_FIELD_END(ID_AA64DFR0, BRBE)
+
+IDREG_FIELD_START(ID_AA64DFR0, EXTTRCBUFF, 56,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64DFR0, EXTTRCBUFF)
+
+IDREG_FIELD_START(ID_AA64DFR0, HPMN0,      60,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "unpredictable")
+IDREG_FIELD_ARCH_VAL(0b0001, "def")
+IDREG_FIELD_END(ID_AA64DFR0, HPMN0)
+
+IDREG_END(ID_AA64DFR0_EL1)
+
+/*  ID_AA64ZFR0_EL1  */
+IDREG_START(ID_AA64ZFR0_EL1)
+IDREG_FIELD_START(ID_AA64ZFR0, SVEVER,      0,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "on")
+IDREG_FIELD_ARCH_VAL(0b0001, "sve2")
+IDREG_FIELD_ARCH_VAL(0b0010, "sve2p1")
+IDREG_FIELD_ARCH_VAL(0b0011, "sve2p2")
+IDREG_FIELD_END(ID_AA64ZFR0, SVEVER)
+
+IDREG_FIELD_START(ID_AA64ZFR0, AES,         4,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "pmull128")
+IDREG_FIELD_ARCH_VAL(0b0011, "aes2")
+IDREG_FIELD_END(ID_AA64ZFR0, AES)
+
+IDREG_FIELD_START(ID_AA64ZFR0, RES0_8,      8,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64ZFR0, RES0_8)
+
+IDREG_FIELD_START(ID_AA64ZFR0, ELTPERM,    12,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ZFR0, ELTPERM)
+
+IDREG_FIELD_START(ID_AA64ZFR0, BITPERM,    16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ZFR0, BITPERM)
+
+IDREG_FIELD_START(ID_AA64ZFR0, BFLOAT16,   20,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "ebf16")
+IDREG_FIELD_END(ID_AA64ZFR0, BFLOAT16)
+
+IDREG_FIELD_START(ID_AA64ZFR0, B16B16,     24,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "bfscale")
+IDREG_FIELD_END(ID_AA64ZFR0, B16B16)
+
+IDREG_FIELD_START(ID_AA64ZFR0, RES0_28,    28,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64ZFR0, RES0_28)
+
+IDREG_FIELD_START(ID_AA64ZFR0, SHA3,       32,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ZFR0, SHA3)
+
+IDREG_FIELD_START(ID_AA64ZFR0, RES0_36,    36,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64ZFR0, RES0_36)
+
+IDREG_FIELD_START(ID_AA64ZFR0, SM4,        40,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ZFR0, SM4)
+
+IDREG_FIELD_START(ID_AA64ZFR0, I8MM,       44,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ZFR0, I8MM)
+
+IDREG_FIELD_START(ID_AA64ZFR0, F16MM,      48,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ZFR0, F16MM)
+
+IDREG_FIELD_START(ID_AA64ZFR0, F32MM,      52,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ZFR0, F32MM)
+
+IDREG_FIELD_START(ID_AA64ZFR0, F64MM,      56,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ZFR0, F64MM)
+
+IDREG_FIELD_START(ID_AA64ZFR0, RES0_60,    60,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64ZFR0, RES0_60)
+
+IDREG_END(ID_AA64ZFR0_EL1)
+
+/*  ID_AA64SMFR0_EL1  */
+IDREG_START(ID_AA64SMFR0_EL1)
+IDREG_FIELD_START(ID_AA64SMFR0, SMOP4,      0,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, SMOP4)
+
+IDREG_FIELD_START(ID_AA64SMFR0, RES0_1,     1, 15, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64SMFR0, RES0_1)
+
+IDREG_FIELD_START(ID_AA64SMFR0, STMOP,     16,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, STMOP)
+
+IDREG_FIELD_START(ID_AA64SMFR0, RES0_17,   17,  6, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64SMFR0, RES0_17)
+
+IDREG_FIELD_START(ID_AA64SMFR0, SFEXPA,    23,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, SFEXPA)
+
+IDREG_FIELD_START(ID_AA64SMFR0, AES,       24,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, AES)
+
+IDREG_FIELD_START(ID_AA64SMFR0, SBITPERM,  25,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, SBITPERM)
+
+IDREG_FIELD_START(ID_AA64SMFR0, RES0_26,   26,  2, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64SMFR0, RES0_26)
+
+IDREG_FIELD_START(ID_AA64SMFR0, SF8DP2,    28,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, SF8DP2)
+
+IDREG_FIELD_START(ID_AA64SMFR0, SF8DP4,    29,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, SF8DP4)
+
+IDREG_FIELD_START(ID_AA64SMFR0, SF8FMA,    30,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, SF8FMA)
+
+IDREG_FIELD_START(ID_AA64SMFR0, RES0_31,   31,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64SMFR0, RES0_31)
+
+IDREG_FIELD_START(ID_AA64SMFR0, F32F32,    32,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, F32F32)
+
+IDREG_FIELD_START(ID_AA64SMFR0, BI32I32,   33,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, BI32I32)
+
+IDREG_FIELD_START(ID_AA64SMFR0, B16F32,    34,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, B16F32)
+
+IDREG_FIELD_START(ID_AA64SMFR0, F16F32,    35,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, F16F32)
+
+IDREG_FIELD_START(ID_AA64SMFR0, I8I32,     36,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b1111, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, I8I32)
+
+IDREG_FIELD_START(ID_AA64SMFR0, F8F32,     40,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, F8F32)
+
+IDREG_FIELD_START(ID_AA64SMFR0, F8F16,     41,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, F8F16)
+
+IDREG_FIELD_START(ID_AA64SMFR0, F16F16,    42,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, F16F16)
+
+IDREG_FIELD_START(ID_AA64SMFR0, B16B16,    43,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, B16B16)
+
+IDREG_FIELD_START(ID_AA64SMFR0, I16I32,    44,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0101, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, I16I32)
+
+IDREG_FIELD_START(ID_AA64SMFR0, F64F64,    48,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, F64F64)
+
+IDREG_FIELD_START(ID_AA64SMFR0, RES0_49,   49,  3, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64SMFR0, RES0_49)
+
+IDREG_FIELD_START(ID_AA64SMFR0, I16I64,    52,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b1111, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, I16I64)
+
+IDREG_FIELD_START(ID_AA64SMFR0, SMEVER,    56,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "sme")
+IDREG_FIELD_ARCH_VAL(0b0001, "sme2")
+IDREG_FIELD_ARCH_VAL(0b0010, "sme2p1")
+IDREG_FIELD_ARCH_VAL(0b0011, "sme2p2")
+IDREG_FIELD_END(ID_AA64SMFR0, SMEVER)
+
+IDREG_FIELD_START(ID_AA64SMFR0, LUTV2,     60,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, LUTV2)
+
+IDREG_FIELD_START(ID_AA64SMFR0, RES0_61,   61,  2, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64SMFR0, RES0_61)
+
+IDREG_FIELD_START(ID_AA64SMFR0, FA64,      63,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, FA64)
+
+IDREG_END(ID_AA64SMFR0_EL1)
+
+/* CTR_EL0 */
+IDREG_START(CTR_EL0)
+IDREG_FIELD_START(CTR_EL0, IMINLINE,    0,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(CTR_EL0, IMINLINE)
+
+IDREG_FIELD_START(CTR_EL0, RES0_4,      4, 10, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(CTR_EL0, RES0_4)
+
+IDREG_FIELD_START(CTR_EL0, L1IP,       14,  2, EXACT,  0b10)
+IDREG_FIELD_ARCH_VAL(0b00, "reserved_vpipt")
+IDREG_FIELD_ARCH_VAL(0b01, "reserved_aivivt")
+IDREG_FIELD_ARCH_VAL(0b10, "vipt")
+IDREG_FIELD_ARCH_VAL(0b11, "pipt")
+IDREG_FIELD_END(CTR_EL0, L1IP)
+
+IDREG_FIELD_START(CTR_EL0, DMINLINE,   16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(CTR_EL0, DMINLINE)
+
+IDREG_FIELD_START(CTR_EL0, ERG,        20,  4, HIGHER_OR_ZERO,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(CTR_EL0, ERG)
+
+IDREG_FIELD_START(CTR_EL0, CWG,        24,  4, HIGHER_OR_ZERO,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(CTR_EL0, CWG)
+
+IDREG_FIELD_START(CTR_EL0, IDC,        28,  1, LOWER,  0b1)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(CTR_EL0, IDC)
+
+IDREG_FIELD_START(CTR_EL0, DIC,        29,  1, LOWER,  0b1)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(CTR_EL0, DIC)
+
+IDREG_FIELD_START(CTR_EL0, RES0_30,    30,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(CTR_EL0, RES0_30)
+
+IDREG_FIELD_START(CTR_EL0, RES1_31,    31,  1, EXACT,  1)
+IDREG_FIELD_ARCH_VAL(1, NULL)
+IDREG_FIELD_END(CTR_EL0, RES1_31)
+
+IDREG_FIELD_START(CTR_EL0, TMINLINE,   32,  6, EXACT,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(CTR_EL0, TMINLINE)
+
+IDREG_FIELD_START(CTR_EL0, RES0_38,    38, 26, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(CTR_EL0, RES0_38)
+
+IDREG_END(CTR_EL0)
+
+/* ID_AA64ISAR3_EL1 */
+IDREG_START(ID_AA64ISAR3_EL1)
+IDREG_FIELD_START(ID_AA64ISAR3, CPA,       0,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "cpa2")
+IDREG_FIELD_END(ID_AA64ISAR3, CPA)
+
+IDREG_FIELD_START(ID_AA64ISAR3, FAMINMAX,  4,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR3, FAMINMAX)
+
+IDREG_FIELD_START(ID_AA64ISAR3, TLBIW,     8,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR3, TLBIW)
+
+IDREG_FIELD_START(ID_AA64ISAR3, PACM,     12,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "trivial_imp")
+IDREG_FIELD_ARCH_VAL(0b0010, "full_imp")
+IDREG_FIELD_END(ID_AA64ISAR3, PACM)
+
+IDREG_FIELD_START(ID_AA64ISAR3, LSFE,     16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR3, LSFE)
+
+IDREG_FIELD_START(ID_AA64ISAR3, OCCMO,    20,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR3, OCCMO)
+
+IDREG_FIELD_START(ID_AA64ISAR3, LSUI,     24,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR3, LSUI)
+
+IDREG_FIELD_START(ID_AA64ISAR3, FPRCVT,   28,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR3, FPRCVT)
+
+IDREG_FIELD_START(ID_AA64ISAR3, RES0_32,  32, 32, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64ISAR3, RES0_32)
+
+IDREG_END(ID_AA64ISAR3_EL1)
+
+/* ID_AA64PFR2_EL1 */
+IDREG_START(ID_AA64PFR2_EL1)
+IDREG_FIELD_START(ID_AA64PFR2, MTEPERM,       0,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR2, MTEPERM)
+
+IDREG_FIELD_START(ID_AA64PFR2, MTESTOREONLY,  4,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR2, MTESTOREONLY)
+
+IDREG_FIELD_START(ID_AA64PFR2, MTEFAR,        8,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR2, MTEFAR)
+
+IDREG_FIELD_START(ID_AA64PFR2, GCIE,         12,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR2, GCIE)
+
+IDREG_FIELD_START(ID_AA64PFR2, UINJ,         16,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR2, UINJ)
+
+IDREG_FIELD_START(ID_AA64PFR2, RES0_20,      20, 12, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64PFR2, RES0_20)
+
+IDREG_FIELD_START(ID_AA64PFR2, FPMR,         32,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR2, FPMR)
+
+IDREG_FIELD_START(ID_AA64PFR2, RES0_36,      36, 28, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64PFR2, RES0_36)
+
+IDREG_END(ID_AA64PFR2_EL1)
+
+/*  ID_AA64FPFR0_EL1  */
+IDREG_START(ID_AA64FPFR0_EL1)
+IDREG_FIELD_START(ID_AA64FPFR0, F8E5M2,    0,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64FPFR0, F8E5M2)
+
+IDREG_FIELD_START(ID_AA64FPFR0, F8E4M3,    1,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64FPFR0, F8E4M3)
+
+IDREG_FIELD_START(ID_AA64FPFR0, RES0_2,    2, 24, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64FPFR0, RES0_2)
+
+IDREG_FIELD_START(ID_AA64FPFR0, F8MM4,    26,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64FPFR0, F8MM4)
+
+IDREG_FIELD_START(ID_AA64FPFR0, F8MM8,    27,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64FPFR0, F8MM8)
+
+IDREG_FIELD_START(ID_AA64FPFR0, F8DP2,    28,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64FPFR0, F8DP2)
+
+IDREG_FIELD_START(ID_AA64FPFR0, F8DP4,    29,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64FPFR0, F8DP4)
+
+IDREG_FIELD_START(ID_AA64FPFR0, F8FMA,    30,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64FPFR0, F8FMA)
+
+IDREG_FIELD_START(ID_AA64FPFR0, F8CVT,    31,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64FPFR0, F8CVT)
+
+IDREG_FIELD_START(ID_AA64FPFR0, RES0_32,  32, 32, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64FPFR0, RES0_32)
+
+IDREG_END(ID_AA64FPFR0_EL1)
+
+
+/*  ID_AA64MMFR4_EL1  */
+IDREG_START(ID_AA64MMFR4_EL1)
+IDREG_FIELD_START(ID_AA64MMFR4, POPS,      0,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR4, POPS)
+
+IDREG_FIELD_START(ID_AA64MMFR4, EIESB,     4,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "toel3")
+IDREG_FIELD_ARCH_VAL(0b0010, "toelx")
+IDREG_FIELD_ARCH_VAL(0b1111, "any")
+IDREG_FIELD_END(ID_AA64MMFR4, EIESB)
+
+IDREG_FIELD_START(ID_AA64MMFR4, ASID2,     8,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR4, ASID2)
+
+IDREG_FIELD_START(ID_AA64MMFR4, HACDBS,   12,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR4, HACDBS)
+
+IDREG_FIELD_START(ID_AA64MMFR4, FGWTE3,   16,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR4, FGWTE3)
+
+IDREG_FIELD_START(ID_AA64MMFR4, NV_FRAC,  20,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "nv_nv2")
+IDREG_FIELD_ARCH_VAL(0b0001, "nv2_only")
+IDREG_FIELD_ARCH_VAL(0b0010, "nv2p1")
+IDREG_FIELD_END(ID_AA64MMFR4, NV_FRAC)
+
+IDREG_FIELD_START(ID_AA64MMFR4, E2H0,     24,  4, SIGNED_LOWER,  0b1111)
+IDREG_FIELD_ARCH_VAL(0b0000, "on")
+IDREG_FIELD_ARCH_VAL(0b1110, "ni_nv1")
+IDREG_FIELD_ARCH_VAL(0b1111, "off")
+IDREG_FIELD_END(ID_AA64MMFR4, E2H0)
+
+IDREG_FIELD_START(ID_AA64MMFR4, RMEGDI,   28,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR4, RMEGDI)
+
+IDREG_FIELD_START(ID_AA64MMFR4, RES0_32,  32,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64MMFR4, RES0_32)
+
+IDREG_FIELD_START(ID_AA64MMFR4, E3DSE,    36,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR4, E3DSE)
+
+IDREG_FIELD_START(ID_AA64MMFR4, RES0_40,  40,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64MMFR4, RES0_40)
+
+IDREG_FIELD_START(ID_AA64MMFR4, SRMASK,   44,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR4, SRMASK)
+
+IDREG_FIELD_START(ID_AA64MMFR4, RES0_48,  48, 16, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64MMFR4, RES0_48)
+
+IDREG_END(ID_AA64MMFR4_EL1)
+
+/*  ID_AA64DFR1_EL1  */
+IDREG_START(ID_AA64DFR1_EL1)
+IDREG_FIELD_START(ID_AA64DFR1, SYSPMUID,    0,  8, EXACT,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(ID_AA64DFR1, SYSPMUID)
+
+IDREG_FIELD_START(ID_AA64DFR1, BRPS,        8,  8, EXACT,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(ID_AA64DFR1, BRPS)
+
+IDREG_FIELD_START(ID_AA64DFR1, WRPS,       16,  8, EXACT,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(ID_AA64DFR1, WRPS)
+
+IDREG_FIELD_START(ID_AA64DFR1, CTX_CMPS,   24,  8, EXACT,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(ID_AA64DFR1, CTX_CMPS)
+
+IDREG_FIELD_START(ID_AA64DFR1, SPMU,       32,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "imp_spmzr")
+IDREG_FIELD_END(ID_AA64DFR1, SPMU)
+
+IDREG_FIELD_START(ID_AA64DFR1, PMICNTR,    36,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64DFR1, PMICNTR)
+
+IDREG_FIELD_START(ID_AA64DFR1, ABLE,       40,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64DFR1, ABLE)
+
+IDREG_FIELD_START(ID_AA64DFR1, ITE,        44,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64DFR1, ITE)
+
+IDREG_FIELD_START(ID_AA64DFR1, EBEP,       48,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64DFR1, EBEP)
+
+IDREG_FIELD_START(ID_AA64DFR1, DPFZS,      52,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "ignr")
+IDREG_FIELD_ARCH_VAL(0b0001, "frzn")
+IDREG_FIELD_END(ID_AA64DFR1, DPFZS)
+
+IDREG_FIELD_START(ID_AA64DFR1, ABL_CMPS,   56,  8, EXACT,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(ID_AA64DFR1, ABL_CMPS)
+
+IDREG_END(ID_AA64DFR1_EL1)
+
+/*  MIDR_EL1  */
+IDREG_START(MIDR_EL1)
+IDREG_FIELD_START(MIDR, REVISION,       0,  4, ANY,  0)
+IDREG_FIELD_END(MIDR, REVISION)
+
+IDREG_FIELD_START(MIDR, PARTNUM,        4, 12, ANY,  0)
+IDREG_FIELD_END(MIDR, PARTNUM)
+
+IDREG_FIELD_START(MIDR, ARCHITECTURE,  16,  4, ANY,  0)
+IDREG_FIELD_END(MIDR, ARCHITECTURE)
+
+IDREG_FIELD_START(MIDR, VARIANT,       20,  4, ANY,  0)
+IDREG_FIELD_END(MIDR, VARIANT)
+
+IDREG_FIELD_START(MIDR, IMPLEMENTER,   24,  8, ANY,  0)
+IDREG_FIELD_END(MIDR, IMPLEMENTER)
+
+IDREG_FIELD_START(MIDR, RES0_32,       32, 32, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(MIDR, RES0_32)
+
+IDREG_END(MIDR_EL1)
+
+/* REVIDR_EL1  */
+IDREG_START(REVIDR_EL1)
+IDREG_FIELD_START(REVIDR, VAL,  0, 64, ANY,  0)
+IDREG_FIELD_END(REVIDR, VAL)
+
+IDREG_END(REVIDR_EL1)
+
+/* AIDR_EL1  */
+IDREG_START(AIDR_EL1)
+IDREG_FIELD_START(AIDR, VAL,  0, 64, ANY,  0)
+IDREG_FIELD_END(AIDR, VAL)
+
+IDREG_END(AIDR_EL1)
+
+/* DCZID_EL0 */
+IDREG_START(DCZID_EL0)
+IDREG_FIELD_START(DCZID_EL0, BS,       0,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(DCZID_EL0, BS)
+
+IDREG_FIELD_START(DCZID_EL0, DZP,      4,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(DCZID_EL0, DZP)
+
+IDREG_FIELD_START(DCZID_EL0, RES0_5,   5, 59, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(DCZID_EL0, RES0_5)
+
+IDREG_END(DCZID_EL0)
+
+
+/*  ID_AA64AFR0_EL1  */
+IDREG_START(ID_AA64AFR0_EL1)
+IDREG_FIELD_START(ID_AA64AFR0, VAL,  0, 64, EXACT,  0)
+IDREG_FIELD_END(ID_AA64AFR0, VAL)
+
+IDREG_END(ID_AA64AFR0_EL1)
+
+/*  ID_AA64AFR1_EL1  */
+IDREG_START(ID_AA64AFR1_EL1)
+IDREG_FIELD_START(ID_AA64AFR1, VAL,  0, 64, EXACT,  0)
+IDREG_FIELD_END(ID_AA64AFR1, VAL)
+
+IDREG_END(ID_AA64AFR1_EL1)
+
+ /* AArch32 ID registers */
+
+/*  ID_PFR0_EL1  */
+IDREG_START(ID_PFR0_EL1)
+IDREG_FIELD_START(ID_PFR0, VAL,  0, 64, EXACT,  0)
+IDREG_FIELD_END(ID_PFR0, VAL)
+
+IDREG_END(ID_PFR0_EL1)
+
+/*  ID_PFR1_EL1  */
+IDREG_START(ID_PFR1_EL1)
+IDREG_FIELD_START(ID_PFR1, VAL_LO,    0, 28, EXACT,  0)
+IDREG_FIELD_END(ID_PFR1, VAL_LO)
+
+IDREG_FIELD_START(ID_PFR1, GIC,      28,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "gicv3")
+IDREG_FIELD_ARCH_VAL(0b0011, "gicv4p1")
+IDREG_FIELD_END(ID_PFR1, GIC)
+
+IDREG_FIELD_START(ID_PFR1, RES0_HI, 32, 32, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_PFR1, RES0_HI)
+
+IDREG_END(ID_PFR1_EL1)
+
+/* ID_DFR0_EL1  */
+IDREG_START(ID_DFR0_EL1)
+IDREG_FIELD_START(ID_DFR0, VAL_LO,    0, 24, EXACT,  0 )
+IDREG_FIELD_END(ID_DFR0, VAL_LO)
+
+IDREG_FIELD_START(ID_DFR0, PMU,      24,  4, LOWER,  0 )
+IDREG_FIELD_END(ID_DFR0, PMU)
+
+IDREG_FIELD_START(ID_DFR0, VAL_HI,   28,  4, EXACT,  0 )
+IDREG_FIELD_END(ID_DFR0, VAL_HI)
+
+IDREG_FIELD_START(ID_DFR0, RES0_HI, 32, 32, EXACT,  0 )
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_DFR0, RES0_HI)
+
+IDREG_END(ID_DFR0_EL1)
+
+/*  ID_AFR0_EL1  */
+IDREG_START(ID_AFR0_EL1)
+IDREG_FIELD_START(ID_AFR0, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_AFR0, VAL)
+
+IDREG_END(ID_AFR0_EL1)
+
+/* ID_MMFR0_EL1  */
+IDREG_START(ID_MMFR0_EL1)
+IDREG_FIELD_START(ID_MMFR0, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_MMFR0, VAL)
+
+IDREG_END(ID_MMFR0_EL1)
+
+/* ID_MMFR1_EL1  */
+IDREG_START(ID_MMFR1_EL1)
+IDREG_FIELD_START(ID_MMFR1, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_MMFR1, VAL)
+
+IDREG_END(ID_MMFR1_EL1)
+
+/* ID_MMFR2_EL1 */
+IDREG_START(ID_MMFR2_EL1)
+IDREG_FIELD_START(ID_MMFR2, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_MMFR2, VAL)
+
+IDREG_END(ID_MMFR2_EL1)
+
+/* ID_MMFR3_EL1  */
+IDREG_START(ID_MMFR3_EL1)
+IDREG_FIELD_START(ID_MMFR3, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_MMFR3, VAL)
+
+IDREG_END(ID_MMFR3_EL1)
+
+/*  ID_MMFR4_EL1  */
+IDREG_START(ID_MMFR4_EL1)
+IDREG_FIELD_START(ID_MMFR4, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_MMFR4, VAL)
+
+IDREG_END(ID_MMFR4_EL1)
+
+/* ID_MMFR5_EL1  */
+IDREG_START(ID_MMFR5_EL1)
+IDREG_FIELD_START(ID_MMFR5, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_MMFR5, VAL)
+
+IDREG_END(ID_MMFR5_EL1)
+
+/* ID_ISAR0_EL1  */
+IDREG_START(ID_ISAR0_EL1)
+IDREG_FIELD_START(ID_ISAR0, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_ISAR0, VAL)
+
+IDREG_END(ID_ISAR0_EL1)
+
+/*  ID_ISAR1_EL1  */
+IDREG_START(ID_ISAR1_EL1)
+IDREG_FIELD_START(ID_ISAR1, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_ISAR1, VAL)
+
+IDREG_END(ID_ISAR1_EL1)
+
+/*  ID_ISAR2_EL1  */
+IDREG_START(ID_ISAR2_EL1)
+IDREG_FIELD_START(ID_ISAR2, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_ISAR2, VAL)
+
+IDREG_END(ID_ISAR2_EL1)
+
+/*  ID_ISAR3_EL1  */
+IDREG_START(ID_ISAR3_EL1)
+IDREG_FIELD_START(ID_ISAR3, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_ISAR3, VAL)
+
+IDREG_END(ID_ISAR3_EL1)
+
+/*  ID_ISAR4_EL1  */
+IDREG_START(ID_ISAR4_EL1)
+IDREG_FIELD_START(ID_ISAR4, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_ISAR4, VAL)
+
+IDREG_END(ID_ISAR4_EL1)
+
+/* ID_ISAR5_EL1  */
+IDREG_START(ID_ISAR5_EL1)
+IDREG_FIELD_START(ID_ISAR5, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_ISAR5, VAL)
+
+IDREG_END(ID_ISAR5_EL1)
+
+/*  ID_ISAR6_EL1  */
+IDREG_START(ID_ISAR6_EL1)
+IDREG_FIELD_START(ID_ISAR6, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_ISAR6, VAL)
+
+IDREG_END(ID_ISAR6_EL1)
+
+/*  ID_PFR2_EL1  */
+IDREG_START(ID_PFR2_EL1)
+IDREG_FIELD_START(ID_PFR2, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_PFR2, VAL)
+
+IDREG_END(ID_PFR2_EL1)
+
+/*  ID_DFR1_EL1 */
+IDREG_START(ID_DFR1_EL1)
+IDREG_FIELD_START(ID_DFR1, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_DFR1, VAL)
+
+IDREG_END(ID_DFR1_EL1)
+
+/*  MVFR0_EL1  */
+IDREG_START(MVFR0_EL1)
+IDREG_FIELD_START(MVFR0, VAL,  0, 64, EXACT,  0)
+IDREG_FIELD_END(MVFR0, VAL)
+
+IDREG_END(MVFR0_EL1)
+
+/*  MVFR1_EL1  */
+IDREG_START(MVFR1_EL1)
+IDREG_FIELD_START(MVFR1, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(MVFR1, VAL)
+
+IDREG_END(MVFR1_EL1)
+
+/* MVFR2_EL1  */
+IDREG_START(MVFR2_EL1)
+IDREG_FIELD_START(MVFR2, VAL,  0, 64, EXACT,  0)
+IDREG_FIELD_END(MVFR2, VAL)
+
+IDREG_END(MVFR2_EL1)
#4 lore raw

Re: [RFC PATCH v1 02/13] target/arm: named_cpu_model: Add ID Register Fields

Quoted 11 lines · Shaju Abraham
Quoted 6 lines

Add a declarative description of every architecturally defined field in the Arm64 ID registers in cpu-idregs.h.inc file. This file will be included multiple times with different definitions to build the per-field arch values, per-register field descriptor arrays, arm-idregs table etc. The architecturely defined values for each ID register field is extracted from kernel's arch/arm64/tools/sysreg file. The safe-value tags and default values are

In the past we were rather advised to use AARCHMRS instead of sysreg. This is what is currently done in [PATCH v4 00/17] kvm/arm: Introduce a customizable aarch64 KVM host model.

I am not sure if we can get safe rules from AARCHMRS. Otherwise it’s fine.

Quoted 6 lines
Quoted 6 lines

derived from the kernel's ftr_bits array. Aarch32 ID registers are added with dummy field so they can be defaulted to 0 by later commits.

X-macro structure:
IDREG_START(REG)
IDREG_FIELD_START(REG, FIELD, SHIFT, LENGTH, SAFE_RULE, DEFAULT_VAL)

Quoted 7 lines

Why do you need SAFE_RULE/DEFAULT_VAL? As far as I understand this is used when we have different flavours of CPUS in SMP and we face mismatches between CPU features. Why do we care here?

I don't see safe_rule used anywhere.
I see arm_idregs_reset_to_defaults() uses the default value though. Should we use the Registers.json reset value instead?

Kernel uses safe_rules to show a common denominator of cpu features in SMP and same rules are used by KVM to verify if certain field value is valid to show to guest on the given host. KVM_SET_ONE_REG validates the writable fields with the SAFE_RULE defined in ftr_bits table.

So, SAFE_RULE will be used in v2 to validate idregs even before we writeback to the KVM, and to pass supported field values for a property on a given host to management stack (libvirt). Something like feat_AES supports (off, aes, pmull) on this host.

Registers.json can probably be used for default_vals, but I will need to check further on this.

In short: default_vals -> show no feature.

               safe_rule -> valid values for guest given host values.
Quoted 7 lines

taking FHM field if I compare with sysreg I have:

UnsignedEnum    51:48   FHM
        0b0000  NI
        0b0001  IMP
        0b0010  F16F32DOT
        0b0011  F16F32MM

So why do we miss some values?

The table was created based on sysreg file in 6.18.
A script added the arch values. Register, Fields, safe values and default values are maintained manually.

Warm Regards,
Khushit

#5 lore raw

Re: [RFC PATCH v1 02/13] target/arm: named_cpu_model: Add ID Register Fields

Quoted 11 lines · Khushit Shah
Quoted 10 lines · Shaju Abraham
Quoted 6 lines

Add a declarative description of every architecturally defined field in the Arm64 ID registers in cpu-idregs.h.inc file. This file will be included multiple times with different definitions to build the per-field arch values, per-register field descriptor arrays, arm-idregs table etc. The architecturely defined values for each ID register field is extracted from kernel's arch/arm64/tools/sysreg file. The safe-value tags and default values are

In the past we were rather advised to use AARCHMRS instead of sysreg. This is what is currently done in [PATCH v4 00/17] kvm/arm: Introduce a customizable aarch64 KVM host model.

I am not sure if we can get safe rules from AARCHMRS. Otherwise it’s fine.

I don't think it is there.

Quoted 11 lines
Quoted 11 lines
Quoted 7 lines

derived from the kernel's ftr_bits array. Aarch32 ID registers are added with dummy field so they can be defaulted to 0 by later commits.

X-macro structure:
IDREG_START(REG)
IDREG_FIELD_START(REG, FIELD, SHIFT, LENGTH, SAFE_RULE, DEFAULT_VAL)

Why do you need SAFE_RULE/DEFAULT_VAL? As far as I understand this is used when we have different flavours of CPUS in SMP and we face mismatches between CPU features. Why do we care here?

Quoted 6 lines
Quoted 3 lines

I don't see safe_rule used anywhere.
I see arm_idregs_reset_to_defaults() uses the default value though. Should we use the Registers.json reset value instead?

Kernel uses safe_rules to show a common denominator of cpu features in SMP and same rules are used by KVM to verify if certain field value is valid to show to guest on the given host. KVM_SET_ONE_REG validates the writable fields with the SAFE_RULE defined in ftr_bits table.

OK so you plan to duplicate the logic at both qemu and KVM level. Can't we simply rely on KVM which already implements that logic. Also if the check is against a given host, is it relevant here? I need to look again at the kernel logic though.

Quoted 6 lines

So, SAFE_RULE will be used in v2 to validate idregs even before we writeback to the KVM, and to pass supported field values for a property on a given host to management stack (libvirt). Something like feat_AES supports (off, aes, pmull) on this host.

Registers.json can probably be used for default_vals, but I will need to check further on this.

Registers.json gives the reset value and not the safe value, as far as I know.

Manual import of those values from the kernel looks tedious and error prone to me.

Eric

Quoted 19 lines

In short: default_vals -> show no feature.

               safe_rule -> valid values for guest given host values.
Quoted 7 lines

taking FHM field if I compare with sysreg I have:

UnsignedEnum    51:48   FHM
        0b0000  NI
        0b0001  IMP
        0b0010  F16F32DOT
        0b0011  F16F32MM

So why do we miss some values?

The table was created based on sysreg file in 6.18.
A script added the arch values. Register, Fields, safe values and default values are maintained manually.

Warm Regards,
Khushit

#6 lore raw

Re: [RFC PATCH v1 02/13] target/arm: named_cpu_model: Add ID Register Fields

In reply to Shaju Abraham
Quoted 9 lines · Shaju Abraham

Add a declarative description of every architecturally defined field in the Arm64 ID registers in cpu-idregs.h.inc file. This file will be included multiple times with different definitions to build the per-field arch values, per-register field descriptor arrays, arm-idregs table etc. The architecturely defined values for each ID register field is extracted from kernel's arch/arm64/tools/sysreg file. The safe-value tags and default values are derived from the kernel's ftr_bits array. Aarch32 ID registers are added with dummy field so they can be defaulted to 0 by later commits.

Quoted 8 lines

X-macro structure:
IDREG_START(REG)
IDREG_FIELD_START(REG, FIELD, SHIFT, LENGTH, SAFE_RULE, DEFAULT_VAL) IDREG_FIELD_ARCH_VAL(VALUE, NAME)
...
IDREG_FIELD_END(REG, FIELD)
...
IDREG_END(REG)

Overall I prefer this representation to the one laid out in

target/arm/cpu-sysreg-properties.c ([PATCH v4 07/17] target/arm/cpu-sysreg-properties.c: Generate code with new script)
all the more so it allows the replace FIELD descriptions in cpu-features.h (what you do in [RFC PATCH v1 05/13] target/arm: named_cpu_model: replace FIELD macro with IDREG_FIELD)

Thanks

Eric

Quoted 1,738 lines
---
 target/arm/cpu-idregs.h.inc | 1724 +++++++++++++++++++++++++++++++++++
 1 file changed, 1724 insertions(+)
 create mode 100644 target/arm/cpu-idregs.h.inc
target/arm/cpu-idregs.h.inc new file +1724 -0
new file mode 100644
index 0000000000..5a627631c9
@@ -0,0 +1,1724 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+/* ID_AA64ISAR0_EL1 */
+IDREG_START(ID_AA64ISAR0_EL1)
+IDREG_FIELD_START(ID_AA64ISAR0, RES0_0,   0,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64ISAR0, RES0_0)
+
+IDREG_FIELD_START(ID_AA64ISAR0, AES,      4,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "aes")
+IDREG_FIELD_ARCH_VAL(0b0010, "pmull")
+IDREG_FIELD_END(ID_AA64ISAR0, AES)
+
+IDREG_FIELD_START(ID_AA64ISAR0, SHA1,     8,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR0, SHA1)
+
+IDREG_FIELD_START(ID_AA64ISAR0, SHA2,    12,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "sha256")
+IDREG_FIELD_ARCH_VAL(0b0010, "sha512")
+IDREG_FIELD_END(ID_AA64ISAR0, SHA2)
+
+IDREG_FIELD_START(ID_AA64ISAR0, CRC32,   16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR0, CRC32)
+
+IDREG_FIELD_START(ID_AA64ISAR0, ATOMIC,  20,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0010, "on")
+IDREG_FIELD_ARCH_VAL(0b0011, "LSE128")
+IDREG_FIELD_END(ID_AA64ISAR0, ATOMIC)
+
+IDREG_FIELD_START(ID_AA64ISAR0, RES0_24, 24,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64ISAR0, RES0_24)
+
+IDREG_FIELD_START(ID_AA64ISAR0, RDM,     28,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR0, RDM)
+
+IDREG_FIELD_START(ID_AA64ISAR0, SHA3,    32,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR0, SHA3)
+
+IDREG_FIELD_START(ID_AA64ISAR0, SM3,     36,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR0, SM3)
+
+IDREG_FIELD_START(ID_AA64ISAR0, SM4,     40,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR0, SM4)
+
+IDREG_FIELD_START(ID_AA64ISAR0, DP,      44,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR0, DP)
+
+IDREG_FIELD_START(ID_AA64ISAR0, FHM,     48,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR0, FHM)
+
+IDREG_FIELD_START(ID_AA64ISAR0, TS,      52,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "flagm")
+IDREG_FIELD_ARCH_VAL(0b0010, "flagm2")
+IDREG_FIELD_END(ID_AA64ISAR0, TS)
+
+IDREG_FIELD_START(ID_AA64ISAR0, TLB,     56,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "os")
+IDREG_FIELD_ARCH_VAL(0b0010, "range")
+IDREG_FIELD_END(ID_AA64ISAR0, TLB)
+
+IDREG_FIELD_START(ID_AA64ISAR0, RNDR,    60,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR0, RNDR)
+
+IDREG_END(ID_AA64ISAR0_EL1)
+
+/* ID_AA64ISAR1_EL1 */
+IDREG_START(ID_AA64ISAR1_EL1)
+IDREG_FIELD_START(ID_AA64ISAR1, DPB,      0,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "dpb2")
+IDREG_FIELD_END(ID_AA64ISAR1, DPB)
+
+IDREG_FIELD_START(ID_AA64ISAR1, APA,      4,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "pauth")
+IDREG_FIELD_ARCH_VAL(0b0010, "epac")
+IDREG_FIELD_ARCH_VAL(0b0011, "pauth2")
+IDREG_FIELD_ARCH_VAL(0b0100, "fpac")
+IDREG_FIELD_ARCH_VAL(0b0101, "fpaccombine")
+IDREG_FIELD_ARCH_VAL(0b0110, "pauth_lr")
+IDREG_FIELD_END(ID_AA64ISAR1, APA)
+
+IDREG_FIELD_START(ID_AA64ISAR1, API,      8,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "pauth")
+IDREG_FIELD_ARCH_VAL(0b0010, "epac")
+IDREG_FIELD_ARCH_VAL(0b0011, "pauth2")
+IDREG_FIELD_ARCH_VAL(0b0100, "fpac")
+IDREG_FIELD_ARCH_VAL(0b0101, "fpaccombine")
+IDREG_FIELD_ARCH_VAL(0b0110, "pauth_lr")
+IDREG_FIELD_END(ID_AA64ISAR1, API)
+
+IDREG_FIELD_START(ID_AA64ISAR1, JSCVT,   12,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR1, JSCVT)
+
+IDREG_FIELD_START(ID_AA64ISAR1, FCMA,    16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR1, FCMA)
+
+IDREG_FIELD_START(ID_AA64ISAR1, LRCPC,   20,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "lrcpc2")
+IDREG_FIELD_ARCH_VAL(0b0011, "lrcpc3")
+IDREG_FIELD_END(ID_AA64ISAR1, LRCPC)
+
+IDREG_FIELD_START(ID_AA64ISAR1, GPA,     24,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR1, GPA)
+
+IDREG_FIELD_START(ID_AA64ISAR1, GPI,     28,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR1, GPI)
+
+IDREG_FIELD_START(ID_AA64ISAR1, FRINTTS, 32,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR1, FRINTTS)
+
+IDREG_FIELD_START(ID_AA64ISAR1, SB,      36,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR1, SB)
+
+IDREG_FIELD_START(ID_AA64ISAR1, SPECRES, 40,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "cosp_rctx")
+IDREG_FIELD_END(ID_AA64ISAR1, SPECRES)
+
+IDREG_FIELD_START(ID_AA64ISAR1, BF16,    44,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "ebf16")
+IDREG_FIELD_END(ID_AA64ISAR1, BF16)
+
+IDREG_FIELD_START(ID_AA64ISAR1, DGH,     48,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR1, DGH)
+
+IDREG_FIELD_START(ID_AA64ISAR1, I8MM,    52,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR1, I8MM)
+
+IDREG_FIELD_START(ID_AA64ISAR1, XS,      56,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR1, XS)
+
+IDREG_FIELD_START(ID_AA64ISAR1, LS64,    60,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "ls64")
+IDREG_FIELD_ARCH_VAL(0b0010, "ls64_v")
+IDREG_FIELD_ARCH_VAL(0b0011, "ls64_accdata")
+IDREG_FIELD_ARCH_VAL(0b0100, "ls64wb")
+IDREG_FIELD_END(ID_AA64ISAR1, LS64)
+
+IDREG_END(ID_AA64ISAR1_EL1)
+
+/*  ID_AA64ISAR2_EL1  */
+IDREG_START(ID_AA64ISAR2_EL1)
+IDREG_FIELD_START(ID_AA64ISAR2, WFXT,          0,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0010, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, WFXT)
+
+IDREG_FIELD_START(ID_AA64ISAR2, RPRES,         4,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, RPRES)
+
+IDREG_FIELD_START(ID_AA64ISAR2, GPA3,          8,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, GPA3)
+
+IDREG_FIELD_START(ID_AA64ISAR2, APA3,         12,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "pauth")
+IDREG_FIELD_ARCH_VAL(0b0010, "epac")
+IDREG_FIELD_ARCH_VAL(0b0011, "pauth2")
+IDREG_FIELD_ARCH_VAL(0b0100, "fpac")
+IDREG_FIELD_ARCH_VAL(0b0101, "fpaccombine")
+IDREG_FIELD_ARCH_VAL(0b0110, "pauth_lr")
+IDREG_FIELD_END(ID_AA64ISAR2, APA3)
+
+IDREG_FIELD_START(ID_AA64ISAR2, MOPS,         16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, MOPS)
+
+IDREG_FIELD_START(ID_AA64ISAR2, BC,           20,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, BC)
+
+IDREG_FIELD_START(ID_AA64ISAR2, PAC_FRAC,     24,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, PAC_FRAC)
+
+IDREG_FIELD_START(ID_AA64ISAR2, CLRBHB,       28,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, CLRBHB)
+
+IDREG_FIELD_START(ID_AA64ISAR2, SYSREG_128,   32,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, SYSREG_128)
+
+IDREG_FIELD_START(ID_AA64ISAR2, SYSINSTR_128, 36,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, SYSINSTR_128)
+
+IDREG_FIELD_START(ID_AA64ISAR2, PRFMSLC,      40,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, PRFMSLC)
+
+IDREG_FIELD_START(ID_AA64ISAR2, PCDPHINT,     44,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, PCDPHINT)
+
+IDREG_FIELD_START(ID_AA64ISAR2, RPRFM,        48,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, RPRFM)
+
+IDREG_FIELD_START(ID_AA64ISAR2, CSSC,         52,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "cmpbr")
+IDREG_FIELD_END(ID_AA64ISAR2, CSSC)
+
+IDREG_FIELD_START(ID_AA64ISAR2, LUT,          56,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, LUT)
+
+IDREG_FIELD_START(ID_AA64ISAR2, ATS1A,        60,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, ATS1A)
+
+IDREG_END(ID_AA64ISAR2_EL1)
+
+/*  ID_AA64PFR0_EL1  */
+IDREG_START(ID_AA64PFR0_EL1)
+IDREG_FIELD_START(ID_AA64PFR0, EL0,     0,  4, LOWER,  0b0001)
+IDREG_FIELD_ARCH_VAL(0b0001, "aarch64")
+IDREG_FIELD_ARCH_VAL(0b0010, "aarch32")
+IDREG_FIELD_END(ID_AA64PFR0, EL0)
+
+IDREG_FIELD_START(ID_AA64PFR0, EL1,     4,  4, LOWER,  0b0001)
+IDREG_FIELD_ARCH_VAL(0b0001, "aarch64")
+IDREG_FIELD_ARCH_VAL(0b0010, "aarch32")
+IDREG_FIELD_END(ID_AA64PFR0, EL1)
+
+IDREG_FIELD_START(ID_AA64PFR0, EL2,     8,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "aarch64")
+IDREG_FIELD_ARCH_VAL(0b0010, "aarch32")
+IDREG_FIELD_END(ID_AA64PFR0, EL2)
+
+IDREG_FIELD_START(ID_AA64PFR0, EL3,    12,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "aarch64")
+IDREG_FIELD_ARCH_VAL(0b0010, "aarch32")
+IDREG_FIELD_END(ID_AA64PFR0, EL3)
+
+IDREG_FIELD_START(ID_AA64PFR0, FP,     16,  4, SIGNED_LOWER,  0b1111)
+IDREG_FIELD_ARCH_VAL(0b0000, "on")
+IDREG_FIELD_ARCH_VAL(0b0001, "fp16")
+IDREG_FIELD_ARCH_VAL(0b1111, "off")
+IDREG_FIELD_END(ID_AA64PFR0, FP)
+
+IDREG_FIELD_START(ID_AA64PFR0, ADVSIMD,20,  4, SIGNED_LOWER,  0b1111)
+IDREG_FIELD_ARCH_VAL(0b0000, "on")
+IDREG_FIELD_ARCH_VAL(0b0001, "fp16")
+IDREG_FIELD_ARCH_VAL(0b1111, "off")
+IDREG_FIELD_END(ID_AA64PFR0, ADVSIMD)
+
+IDREG_FIELD_START(ID_AA64PFR0, GIC,    24,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0011, "v4p1")
+IDREG_FIELD_END(ID_AA64PFR0, GIC)
+
+IDREG_FIELD_START(ID_AA64PFR0, RAS,    28,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "v1p1")
+IDREG_FIELD_ARCH_VAL(0b0011, "v2")
+IDREG_FIELD_END(ID_AA64PFR0, RAS)
+
+IDREG_FIELD_START(ID_AA64PFR0, SVE,    32,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR0, SVE)
+
+IDREG_FIELD_START(ID_AA64PFR0, SEL2,   36,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR0, SEL2)
+
+IDREG_FIELD_START(ID_AA64PFR0, MPAM,   40,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "0")
+IDREG_FIELD_ARCH_VAL(0b0001, "1")
+IDREG_FIELD_END(ID_AA64PFR0, MPAM)
+
+IDREG_FIELD_START(ID_AA64PFR0, AMU,    44,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "v1p1")
+IDREG_FIELD_END(ID_AA64PFR0, AMU)
+
+IDREG_FIELD_START(ID_AA64PFR0, DIT,    48,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR0, DIT)
+
+IDREG_FIELD_START(ID_AA64PFR0, RME,    52,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR0, RME)
+
+IDREG_FIELD_START(ID_AA64PFR0, CSV2,   56,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "csv2_2")
+IDREG_FIELD_ARCH_VAL(0b0011, "csv2_3")
+IDREG_FIELD_END(ID_AA64PFR0, CSV2)
+
+IDREG_FIELD_START(ID_AA64PFR0, CSV3,   60,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR0, CSV3)
+
+IDREG_END(ID_AA64PFR0_EL1)
+
+/*  ID_AA64PFR1_EL1  */
+IDREG_START(ID_AA64PFR1_EL1)
+IDREG_FIELD_START(ID_AA64PFR1, BT,        0,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR1, BT)
+
+IDREG_FIELD_START(ID_AA64PFR1, SSBS,      4,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "ssbs2")
+IDREG_FIELD_END(ID_AA64PFR1, SSBS)
+
+IDREG_FIELD_START(ID_AA64PFR1, MTE,       8,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "mte2")
+IDREG_FIELD_ARCH_VAL(0b0011, "mte3")
+IDREG_FIELD_END(ID_AA64PFR1, MTE)
+
+IDREG_FIELD_START(ID_AA64PFR1, RAS_FRAC, 12,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "rasv1p1")
+IDREG_FIELD_END(ID_AA64PFR1, RAS_FRAC)
+
+IDREG_FIELD_START(ID_AA64PFR1, MPAM_FRAC,16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "minor_0")
+IDREG_FIELD_ARCH_VAL(0b0001, "minor_1")
+IDREG_FIELD_END(ID_AA64PFR1, MPAM_FRAC)
+
+IDREG_FIELD_START(ID_AA64PFR1, RES0_20,  20,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64PFR1, RES0_20)
+
+IDREG_FIELD_START(ID_AA64PFR1, SME,      24,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "sme2")
+IDREG_FIELD_END(ID_AA64PFR1, SME)
+
+IDREG_FIELD_START(ID_AA64PFR1, RNDR_TRAP,28,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR1, RNDR_TRAP)
+
+IDREG_FIELD_START(ID_AA64PFR1, CSV2_FRAC,32,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "csv2_1p1")
+IDREG_FIELD_ARCH_VAL(0b0010, "csv2_1p2")
+IDREG_FIELD_END(ID_AA64PFR1, CSV2_FRAC)
+
+IDREG_FIELD_START(ID_AA64PFR1, NMI,      36,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR1, NMI)
+
+IDREG_FIELD_START(ID_AA64PFR1, MTE_FRAC, 40,  4, SIGNED_LOWER,  0b1111)
+IDREG_FIELD_ARCH_VAL(0b0000, "async")
+IDREG_FIELD_ARCH_VAL(0b1111, "off")
+IDREG_FIELD_END(ID_AA64PFR1, MTE_FRAC)
+
+IDREG_FIELD_START(ID_AA64PFR1, GCS,      44,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR1, GCS)
+
+IDREG_FIELD_START(ID_AA64PFR1, THE,      48,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR1, THE)
+
+IDREG_FIELD_START(ID_AA64PFR1, MTEX,     52,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "mte")
+IDREG_FIELD_ARCH_VAL(0b0001, "mte4")
+IDREG_FIELD_END(ID_AA64PFR1, MTEX)
+
+IDREG_FIELD_START(ID_AA64PFR1, DF2,      56,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR1, DF2)
+
+IDREG_FIELD_START(ID_AA64PFR1, PFAR,     60,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR1, PFAR)
+
+IDREG_END(ID_AA64PFR1_EL1)
+
+/*  ID_AA64MMFR0_EL1 */
+IDREG_START(ID_AA64MMFR0_EL1)
+IDREG_FIELD_START(ID_AA64MMFR0, PARANGE,    0,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "32")
+IDREG_FIELD_ARCH_VAL(0b0001, "36")
+IDREG_FIELD_ARCH_VAL(0b0010, "40")
+IDREG_FIELD_ARCH_VAL(0b0011, "42")
+IDREG_FIELD_ARCH_VAL(0b0100, "44")
+IDREG_FIELD_ARCH_VAL(0b0101, "48")
+IDREG_FIELD_ARCH_VAL(0b0110, "52")
+IDREG_FIELD_ARCH_VAL(0b0111, "56")
+IDREG_FIELD_END(ID_AA64MMFR0, PARANGE)
+
+IDREG_FIELD_START(ID_AA64MMFR0, ASIDBITS,   4,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "8")
+IDREG_FIELD_ARCH_VAL(0b0010, "16")
+IDREG_FIELD_END(ID_AA64MMFR0, ASIDBITS)
+
+IDREG_FIELD_START(ID_AA64MMFR0, BIGEND,     8,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR0, BIGEND)
+
+IDREG_FIELD_START(ID_AA64MMFR0, SNSMEM,    12,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR0, SNSMEM)
+
+IDREG_FIELD_START(ID_AA64MMFR0, BIGENDEL0, 16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR0, BIGENDEL0)
+
+IDREG_FIELD_START(ID_AA64MMFR0, TGRAN16,   20,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "52_bit")
+IDREG_FIELD_END(ID_AA64MMFR0, TGRAN16)
+
+IDREG_FIELD_START(ID_AA64MMFR0, TGRAN64,   24,  4, SIGNED_LOWER,  0b1111)
+IDREG_FIELD_ARCH_VAL(0b0000, "on")
+IDREG_FIELD_ARCH_VAL(0b1111, "off")
+IDREG_FIELD_END(ID_AA64MMFR0, TGRAN64)
+
+IDREG_FIELD_START(ID_AA64MMFR0, TGRAN4,    28,  4, SIGNED_LOWER,  0b1111)
+IDREG_FIELD_ARCH_VAL(0b0000, "on")
+IDREG_FIELD_ARCH_VAL(0b0001, "52_bit")
+IDREG_FIELD_ARCH_VAL(0b1111, "off")
+IDREG_FIELD_END(ID_AA64MMFR0, TGRAN4)
+
+IDREG_FIELD_START(ID_AA64MMFR0, TGRAN16_2, 32,  4, EXACT,  0b0001)
+IDREG_FIELD_ARCH_VAL(0b0000, "tgran16")
+IDREG_FIELD_ARCH_VAL(0b0001, "off")
+IDREG_FIELD_ARCH_VAL(0b0010, "on")
+IDREG_FIELD_ARCH_VAL(0b0011, "52_bit")
+IDREG_FIELD_END(ID_AA64MMFR0, TGRAN16_2)
+
+IDREG_FIELD_START(ID_AA64MMFR0, TGRAN64_2, 36,  4, EXACT,  0b0001)
+IDREG_FIELD_ARCH_VAL(0b0000, "tgran64")
+IDREG_FIELD_ARCH_VAL(0b0001, "off")
+IDREG_FIELD_ARCH_VAL(0b0010, "on")
+IDREG_FIELD_END(ID_AA64MMFR0, TGRAN64_2)
+
+IDREG_FIELD_START(ID_AA64MMFR0, TGRAN4_2,  40,  4, EXACT,  0b0001)
+IDREG_FIELD_ARCH_VAL(0b0000, "tgran4")
+IDREG_FIELD_ARCH_VAL(0b0001, "off")
+IDREG_FIELD_ARCH_VAL(0b0010, "on")
+IDREG_FIELD_ARCH_VAL(0b0011, "52_bit")
+IDREG_FIELD_END(ID_AA64MMFR0, TGRAN4_2)
+
+IDREG_FIELD_START(ID_AA64MMFR0, EXS,       44,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR0, EXS)
+
+IDREG_FIELD_START(ID_AA64MMFR0, RES0_48,   48,  8, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64MMFR0, RES0_48)
+
+IDREG_FIELD_START(ID_AA64MMFR0, FGT,       56,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "fgt2")
+IDREG_FIELD_END(ID_AA64MMFR0, FGT)
+
+IDREG_FIELD_START(ID_AA64MMFR0, ECV,       60,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "cntpoff")
+IDREG_FIELD_END(ID_AA64MMFR0, ECV)
+
+IDREG_END(ID_AA64MMFR0_EL1)
+
+/*  ID_AA64MMFR1_EL1  */
+IDREG_START(ID_AA64MMFR1_EL1)
+IDREG_FIELD_START(ID_AA64MMFR1, HAFDBS,    0,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "af")
+IDREG_FIELD_ARCH_VAL(0b0010, "dbm")
+IDREG_FIELD_ARCH_VAL(0b0011, "haft")
+IDREG_FIELD_ARCH_VAL(0b0100, "hdbss")
+IDREG_FIELD_END(ID_AA64MMFR1, HAFDBS)
+
+IDREG_FIELD_START(ID_AA64MMFR1, VMIDBITS,  4,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "8")
+IDREG_FIELD_ARCH_VAL(0b0010, "16")
+IDREG_FIELD_END(ID_AA64MMFR1, VMIDBITS)
+
+IDREG_FIELD_START(ID_AA64MMFR1, VH,        8,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, VH)
+
+IDREG_FIELD_START(ID_AA64MMFR1, HPDS,     12,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "hpds2")
+IDREG_FIELD_END(ID_AA64MMFR1, HPDS)
+
+IDREG_FIELD_START(ID_AA64MMFR1, LO,       16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, LO)
+
+IDREG_FIELD_START(ID_AA64MMFR1, PAN,      20,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "pan2")
+IDREG_FIELD_ARCH_VAL(0b0011, "pan3")
+IDREG_FIELD_END(ID_AA64MMFR1, PAN)
+
+IDREG_FIELD_START(ID_AA64MMFR1, SPECSEI,  24,  4, HIGHER, 0b0001)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, SPECSEI)
+
+IDREG_FIELD_START(ID_AA64MMFR1, XNX,      28,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, XNX)
+
+IDREG_FIELD_START(ID_AA64MMFR1, TWED,     32,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, TWED)
+
+IDREG_FIELD_START(ID_AA64MMFR1, ETS,      36,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "ets2")
+IDREG_FIELD_ARCH_VAL(0b0011, "ets3")
+IDREG_FIELD_END(ID_AA64MMFR1, ETS)
+
+IDREG_FIELD_START(ID_AA64MMFR1, HCX,      40,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, HCX)
+
+IDREG_FIELD_START(ID_AA64MMFR1, AFP,      44,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, AFP)
+
+IDREG_FIELD_START(ID_AA64MMFR1, NTLBPA,   48,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, NTLBPA)
+
+IDREG_FIELD_START(ID_AA64MMFR1, TIDCP1,   52,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, TIDCP1)
+
+IDREG_FIELD_START(ID_AA64MMFR1, CMOW,     56,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, CMOW)
+
+IDREG_FIELD_START(ID_AA64MMFR1, ECBHB,    60,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, ECBHB)
+
+IDREG_END(ID_AA64MMFR1_EL1)
+
+/*  ID_AA64MMFR2_EL1  */
+IDREG_START(ID_AA64MMFR2_EL1)
+IDREG_FIELD_START(ID_AA64MMFR2, CNP,      0,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR2, CNP)
+
+IDREG_FIELD_START(ID_AA64MMFR2, UAO,      4,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR2, UAO)
+
+IDREG_FIELD_START(ID_AA64MMFR2, LSM,      8,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR2, LSM)
+
+IDREG_FIELD_START(ID_AA64MMFR2, IESB,    12,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR2, IESB)
+
+IDREG_FIELD_START(ID_AA64MMFR2, VARANGE, 16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "48")
+IDREG_FIELD_ARCH_VAL(0b0001, "52")
+IDREG_FIELD_END(ID_AA64MMFR2, VARANGE)
+
+IDREG_FIELD_START(ID_AA64MMFR2, CCIDX,   20,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "32")
+IDREG_FIELD_ARCH_VAL(0b0001, "64")
+IDREG_FIELD_END(ID_AA64MMFR2, CCIDX)
+
+IDREG_FIELD_START(ID_AA64MMFR2, NV,      24,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "nv2")
+IDREG_FIELD_END(ID_AA64MMFR2, NV)
+
+IDREG_FIELD_START(ID_AA64MMFR2, ST,      28,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "39")
+IDREG_FIELD_ARCH_VAL(0b0001, "48_47")
+IDREG_FIELD_END(ID_AA64MMFR2, ST)
+
+IDREG_FIELD_START(ID_AA64MMFR2, AT,      32,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR2, AT)
+
+IDREG_FIELD_START(ID_AA64MMFR2, IDS,     36,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "0x0")
+IDREG_FIELD_ARCH_VAL(0b0001, "0x18")
+IDREG_FIELD_END(ID_AA64MMFR2, IDS)
+
+IDREG_FIELD_START(ID_AA64MMFR2, FWB,     40,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR2, FWB)
+
+IDREG_FIELD_START(ID_AA64MMFR2, RES0_44, 44,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64MMFR2, RES0_44)
+
+IDREG_FIELD_START(ID_AA64MMFR2, TTL,     48,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR2, TTL)
+
+IDREG_FIELD_START(ID_AA64MMFR2, BBM,     52,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "0")
+IDREG_FIELD_ARCH_VAL(0b0001, "1")
+IDREG_FIELD_ARCH_VAL(0b0010, "2")
+IDREG_FIELD_END(ID_AA64MMFR2, BBM)
+
+IDREG_FIELD_START(ID_AA64MMFR2, EVT,     56,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "ttlbxs")
+IDREG_FIELD_END(ID_AA64MMFR2, EVT)
+
+IDREG_FIELD_START(ID_AA64MMFR2, E0PD,    60,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR2, E0PD)
+
+IDREG_END(ID_AA64MMFR2_EL1)
+
+/* ID_AA64MMFR3_EL1  */
+IDREG_START(ID_AA64MMFR3_EL1)
+IDREG_FIELD_START(ID_AA64MMFR3, TCRX,       0,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, TCRX)
+
+IDREG_FIELD_START(ID_AA64MMFR3, SCTLRX,     4,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, SCTLRX)
+
+IDREG_FIELD_START(ID_AA64MMFR3, S1PIE,      8,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, S1PIE)
+
+IDREG_FIELD_START(ID_AA64MMFR3, S2PIE,     12,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, S2PIE)
+
+IDREG_FIELD_START(ID_AA64MMFR3, S1POE,     16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, S1POE)
+
+IDREG_FIELD_START(ID_AA64MMFR3, S2POE,     20,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, S2POE)
+
+IDREG_FIELD_START(ID_AA64MMFR3, AIE,       24,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, AIE)
+
+IDREG_FIELD_START(ID_AA64MMFR3, MEC,       28,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, MEC)
+
+IDREG_FIELD_START(ID_AA64MMFR3, D128,      32,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, D128)
+
+IDREG_FIELD_START(ID_AA64MMFR3, D128_2,    36,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, D128_2)
+
+IDREG_FIELD_START(ID_AA64MMFR3, SNERR,     40,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "sync")
+IDREG_FIELD_ARCH_VAL(0b0010, "ANERR")
+IDREG_FIELD_ARCH_VAL(0b0011, "ANERR_IND")
+IDREG_FIELD_END(ID_AA64MMFR3, SNERR)
+
+IDREG_FIELD_START(ID_AA64MMFR3, ANERR,     44,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "async")
+IDREG_FIELD_ARCH_VAL(0b0010, "ANERR")
+IDREG_FIELD_ARCH_VAL(0b0011, "ANERR_IND")
+IDREG_FIELD_END(ID_AA64MMFR3, ANERR)
+
+IDREG_FIELD_START(ID_AA64MMFR3, RES0_48,   48,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64MMFR3, RES0_48)
+
+IDREG_FIELD_START(ID_AA64MMFR3, SDERR,     52,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "dev_sync")
+IDREG_FIELD_ARCH_VAL(0b0010, "ADERR")
+IDREG_FIELD_ARCH_VAL(0b0011, "ADERR_IND")
+IDREG_FIELD_END(ID_AA64MMFR3, SDERR)
+
+IDREG_FIELD_START(ID_AA64MMFR3, ADERR,     56,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "dev_async")
+IDREG_FIELD_ARCH_VAL(0b0010, "ADERR")
+IDREG_FIELD_ARCH_VAL(0b0011, "ADERR_IND")
+IDREG_FIELD_END(ID_AA64MMFR3, ADERR)
+
+IDREG_FIELD_START(ID_AA64MMFR3, SPEC_FPACC,60,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, SPEC_FPACC)
+
+IDREG_END(ID_AA64MMFR3_EL1)
+
+/* ID_AA64DFR0_EL1 */
+IDREG_START(ID_AA64DFR0_EL1)
+IDREG_FIELD_START(ID_AA64DFR0, DEBUGVER,    0,  4, LOWER,  0x6)
+IDREG_FIELD_ARCH_VAL(0b0110, "on")
+IDREG_FIELD_ARCH_VAL(0b0111, "vhe")
+IDREG_FIELD_ARCH_VAL(0b1000, "v8p2")
+IDREG_FIELD_ARCH_VAL(0b1001, "v8p4")
+IDREG_FIELD_ARCH_VAL(0b1010, "v8p8")
+IDREG_FIELD_ARCH_VAL(0b1011, "v8p9")
+IDREG_FIELD_END(ID_AA64DFR0, DEBUGVER)
+
+IDREG_FIELD_START(ID_AA64DFR0, TRACEVER,    4,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64DFR0, TRACEVER)
+
+IDREG_FIELD_START(ID_AA64DFR0, PMUVER,      8,  4, SIGNED_LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0100, "v3p1")
+IDREG_FIELD_ARCH_VAL(0b0101, "v3p4")
+IDREG_FIELD_ARCH_VAL(0b0110, "v3p5")
+IDREG_FIELD_ARCH_VAL(0b0111, "v3p7")
+IDREG_FIELD_ARCH_VAL(0b1000, "v3p8")
+IDREG_FIELD_ARCH_VAL(0b1001, "v3p9")
+IDREG_FIELD_ARCH_VAL(0b1111, "imp_def")
+IDREG_FIELD_END(ID_AA64DFR0, PMUVER)
+
+IDREG_FIELD_START(ID_AA64DFR0, BRPS,       12,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(ID_AA64DFR0, BRPS)
+
+IDREG_FIELD_START(ID_AA64DFR0, PMSS,       16,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64DFR0, PMSS)
+
+IDREG_FIELD_START(ID_AA64DFR0, WRPS,       20,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(ID_AA64DFR0, WRPS)
+
+IDREG_FIELD_START(ID_AA64DFR0, SEBEP,      24,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64DFR0, SEBEP)
+
+IDREG_FIELD_START(ID_AA64DFR0, CTX_CMPS,   28,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(ID_AA64DFR0, CTX_CMPS)
+
+IDREG_FIELD_START(ID_AA64DFR0, PMSVER,     32,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "v1p1")
+IDREG_FIELD_ARCH_VAL(0b0011, "v1p2")
+IDREG_FIELD_ARCH_VAL(0b0100, "v1p3")
+IDREG_FIELD_ARCH_VAL(0b0101, "v1p4")
+IDREG_FIELD_ARCH_VAL(0b0110, "v1p5")
+IDREG_FIELD_END(ID_AA64DFR0, PMSVER)
+
+IDREG_FIELD_START(ID_AA64DFR0, DOUBLELOCK, 36,  4, SIGNED_LOWER,  0b1111)
+IDREG_FIELD_ARCH_VAL(0b0000, "on")
+IDREG_FIELD_ARCH_VAL(0b1111, "off")
+IDREG_FIELD_END(ID_AA64DFR0, DOUBLELOCK)
+
+IDREG_FIELD_START(ID_AA64DFR0, TRACEFILT,  40,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64DFR0, TRACEFILT)
+
+IDREG_FIELD_START(ID_AA64DFR0, TRACEBUFFER,44,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "trbe_v1p1")
+IDREG_FIELD_END(ID_AA64DFR0, TRACEBUFFER)
+
+IDREG_FIELD_START(ID_AA64DFR0, MTPMU,      48,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "ni_impdef")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b1111, "off")
+IDREG_FIELD_END(ID_AA64DFR0, MTPMU)
+
+IDREG_FIELD_START(ID_AA64DFR0, BRBE,       52,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "brbe_v1p1")
+IDREG_FIELD_END(ID_AA64DFR0, BRBE)
+
+IDREG_FIELD_START(ID_AA64DFR0, EXTTRCBUFF, 56,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64DFR0, EXTTRCBUFF)
+
+IDREG_FIELD_START(ID_AA64DFR0, HPMN0,      60,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "unpredictable")
+IDREG_FIELD_ARCH_VAL(0b0001, "def")
+IDREG_FIELD_END(ID_AA64DFR0, HPMN0)
+
+IDREG_END(ID_AA64DFR0_EL1)
+
+/*  ID_AA64ZFR0_EL1  */
+IDREG_START(ID_AA64ZFR0_EL1)
+IDREG_FIELD_START(ID_AA64ZFR0, SVEVER,      0,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "on")
+IDREG_FIELD_ARCH_VAL(0b0001, "sve2")
+IDREG_FIELD_ARCH_VAL(0b0010, "sve2p1")
+IDREG_FIELD_ARCH_VAL(0b0011, "sve2p2")
+IDREG_FIELD_END(ID_AA64ZFR0, SVEVER)
+
+IDREG_FIELD_START(ID_AA64ZFR0, AES,         4,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "pmull128")
+IDREG_FIELD_ARCH_VAL(0b0011, "aes2")
+IDREG_FIELD_END(ID_AA64ZFR0, AES)
+
+IDREG_FIELD_START(ID_AA64ZFR0, RES0_8,      8,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64ZFR0, RES0_8)
+
+IDREG_FIELD_START(ID_AA64ZFR0, ELTPERM,    12,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ZFR0, ELTPERM)
+
+IDREG_FIELD_START(ID_AA64ZFR0, BITPERM,    16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ZFR0, BITPERM)
+
+IDREG_FIELD_START(ID_AA64ZFR0, BFLOAT16,   20,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "ebf16")
+IDREG_FIELD_END(ID_AA64ZFR0, BFLOAT16)
+
+IDREG_FIELD_START(ID_AA64ZFR0, B16B16,     24,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "bfscale")
+IDREG_FIELD_END(ID_AA64ZFR0, B16B16)
+
+IDREG_FIELD_START(ID_AA64ZFR0, RES0_28,    28,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64ZFR0, RES0_28)
+
+IDREG_FIELD_START(ID_AA64ZFR0, SHA3,       32,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ZFR0, SHA3)
+
+IDREG_FIELD_START(ID_AA64ZFR0, RES0_36,    36,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64ZFR0, RES0_36)
+
+IDREG_FIELD_START(ID_AA64ZFR0, SM4,        40,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ZFR0, SM4)
+
+IDREG_FIELD_START(ID_AA64ZFR0, I8MM,       44,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ZFR0, I8MM)
+
+IDREG_FIELD_START(ID_AA64ZFR0, F16MM,      48,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ZFR0, F16MM)
+
+IDREG_FIELD_START(ID_AA64ZFR0, F32MM,      52,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ZFR0, F32MM)
+
+IDREG_FIELD_START(ID_AA64ZFR0, F64MM,      56,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ZFR0, F64MM)
+
+IDREG_FIELD_START(ID_AA64ZFR0, RES0_60,    60,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64ZFR0, RES0_60)
+
+IDREG_END(ID_AA64ZFR0_EL1)
+
+/*  ID_AA64SMFR0_EL1  */
+IDREG_START(ID_AA64SMFR0_EL1)
+IDREG_FIELD_START(ID_AA64SMFR0, SMOP4,      0,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, SMOP4)
+
+IDREG_FIELD_START(ID_AA64SMFR0, RES0_1,     1, 15, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64SMFR0, RES0_1)
+
+IDREG_FIELD_START(ID_AA64SMFR0, STMOP,     16,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, STMOP)
+
+IDREG_FIELD_START(ID_AA64SMFR0, RES0_17,   17,  6, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64SMFR0, RES0_17)
+
+IDREG_FIELD_START(ID_AA64SMFR0, SFEXPA,    23,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, SFEXPA)
+
+IDREG_FIELD_START(ID_AA64SMFR0, AES,       24,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, AES)
+
+IDREG_FIELD_START(ID_AA64SMFR0, SBITPERM,  25,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, SBITPERM)
+
+IDREG_FIELD_START(ID_AA64SMFR0, RES0_26,   26,  2, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64SMFR0, RES0_26)
+
+IDREG_FIELD_START(ID_AA64SMFR0, SF8DP2,    28,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, SF8DP2)
+
+IDREG_FIELD_START(ID_AA64SMFR0, SF8DP4,    29,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, SF8DP4)
+
+IDREG_FIELD_START(ID_AA64SMFR0, SF8FMA,    30,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, SF8FMA)
+
+IDREG_FIELD_START(ID_AA64SMFR0, RES0_31,   31,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64SMFR0, RES0_31)
+
+IDREG_FIELD_START(ID_AA64SMFR0, F32F32,    32,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, F32F32)
+
+IDREG_FIELD_START(ID_AA64SMFR0, BI32I32,   33,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, BI32I32)
+
+IDREG_FIELD_START(ID_AA64SMFR0, B16F32,    34,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, B16F32)
+
+IDREG_FIELD_START(ID_AA64SMFR0, F16F32,    35,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, F16F32)
+
+IDREG_FIELD_START(ID_AA64SMFR0, I8I32,     36,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b1111, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, I8I32)
+
+IDREG_FIELD_START(ID_AA64SMFR0, F8F32,     40,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, F8F32)
+
+IDREG_FIELD_START(ID_AA64SMFR0, F8F16,     41,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, F8F16)
+
+IDREG_FIELD_START(ID_AA64SMFR0, F16F16,    42,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, F16F16)
+
+IDREG_FIELD_START(ID_AA64SMFR0, B16B16,    43,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, B16B16)
+
+IDREG_FIELD_START(ID_AA64SMFR0, I16I32,    44,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0101, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, I16I32)
+
+IDREG_FIELD_START(ID_AA64SMFR0, F64F64,    48,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, F64F64)
+
+IDREG_FIELD_START(ID_AA64SMFR0, RES0_49,   49,  3, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64SMFR0, RES0_49)
+
+IDREG_FIELD_START(ID_AA64SMFR0, I16I64,    52,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b1111, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, I16I64)
+
+IDREG_FIELD_START(ID_AA64SMFR0, SMEVER,    56,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "sme")
+IDREG_FIELD_ARCH_VAL(0b0001, "sme2")
+IDREG_FIELD_ARCH_VAL(0b0010, "sme2p1")
+IDREG_FIELD_ARCH_VAL(0b0011, "sme2p2")
+IDREG_FIELD_END(ID_AA64SMFR0, SMEVER)
+
+IDREG_FIELD_START(ID_AA64SMFR0, LUTV2,     60,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, LUTV2)
+
+IDREG_FIELD_START(ID_AA64SMFR0, RES0_61,   61,  2, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64SMFR0, RES0_61)
+
+IDREG_FIELD_START(ID_AA64SMFR0, FA64,      63,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, FA64)
+
+IDREG_END(ID_AA64SMFR0_EL1)
+
+/* CTR_EL0 */
+IDREG_START(CTR_EL0)
+IDREG_FIELD_START(CTR_EL0, IMINLINE,    0,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(CTR_EL0, IMINLINE)
+
+IDREG_FIELD_START(CTR_EL0, RES0_4,      4, 10, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(CTR_EL0, RES0_4)
+
+IDREG_FIELD_START(CTR_EL0, L1IP,       14,  2, EXACT,  0b10)
+IDREG_FIELD_ARCH_VAL(0b00, "reserved_vpipt")
+IDREG_FIELD_ARCH_VAL(0b01, "reserved_aivivt")
+IDREG_FIELD_ARCH_VAL(0b10, "vipt")
+IDREG_FIELD_ARCH_VAL(0b11, "pipt")
+IDREG_FIELD_END(CTR_EL0, L1IP)
+
+IDREG_FIELD_START(CTR_EL0, DMINLINE,   16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(CTR_EL0, DMINLINE)
+
+IDREG_FIELD_START(CTR_EL0, ERG,        20,  4, HIGHER_OR_ZERO,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(CTR_EL0, ERG)
+
+IDREG_FIELD_START(CTR_EL0, CWG,        24,  4, HIGHER_OR_ZERO,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(CTR_EL0, CWG)
+
+IDREG_FIELD_START(CTR_EL0, IDC,        28,  1, LOWER,  0b1)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(CTR_EL0, IDC)
+
+IDREG_FIELD_START(CTR_EL0, DIC,        29,  1, LOWER,  0b1)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(CTR_EL0, DIC)
+
+IDREG_FIELD_START(CTR_EL0, RES0_30,    30,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(CTR_EL0, RES0_30)
+
+IDREG_FIELD_START(CTR_EL0, RES1_31,    31,  1, EXACT,  1)
+IDREG_FIELD_ARCH_VAL(1, NULL)
+IDREG_FIELD_END(CTR_EL0, RES1_31)
+
+IDREG_FIELD_START(CTR_EL0, TMINLINE,   32,  6, EXACT,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(CTR_EL0, TMINLINE)
+
+IDREG_FIELD_START(CTR_EL0, RES0_38,    38, 26, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(CTR_EL0, RES0_38)
+
+IDREG_END(CTR_EL0)
+
+/* ID_AA64ISAR3_EL1 */
+IDREG_START(ID_AA64ISAR3_EL1)
+IDREG_FIELD_START(ID_AA64ISAR3, CPA,       0,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "cpa2")
+IDREG_FIELD_END(ID_AA64ISAR3, CPA)
+
+IDREG_FIELD_START(ID_AA64ISAR3, FAMINMAX,  4,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR3, FAMINMAX)
+
+IDREG_FIELD_START(ID_AA64ISAR3, TLBIW,     8,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR3, TLBIW)
+
+IDREG_FIELD_START(ID_AA64ISAR3, PACM,     12,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "trivial_imp")
+IDREG_FIELD_ARCH_VAL(0b0010, "full_imp")
+IDREG_FIELD_END(ID_AA64ISAR3, PACM)
+
+IDREG_FIELD_START(ID_AA64ISAR3, LSFE,     16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR3, LSFE)
+
+IDREG_FIELD_START(ID_AA64ISAR3, OCCMO,    20,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR3, OCCMO)
+
+IDREG_FIELD_START(ID_AA64ISAR3, LSUI,     24,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR3, LSUI)
+
+IDREG_FIELD_START(ID_AA64ISAR3, FPRCVT,   28,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR3, FPRCVT)
+
+IDREG_FIELD_START(ID_AA64ISAR3, RES0_32,  32, 32, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64ISAR3, RES0_32)
+
+IDREG_END(ID_AA64ISAR3_EL1)
+
+/* ID_AA64PFR2_EL1 */
+IDREG_START(ID_AA64PFR2_EL1)
+IDREG_FIELD_START(ID_AA64PFR2, MTEPERM,       0,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR2, MTEPERM)
+
+IDREG_FIELD_START(ID_AA64PFR2, MTESTOREONLY,  4,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR2, MTESTOREONLY)
+
+IDREG_FIELD_START(ID_AA64PFR2, MTEFAR,        8,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR2, MTEFAR)
+
+IDREG_FIELD_START(ID_AA64PFR2, GCIE,         12,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR2, GCIE)
+
+IDREG_FIELD_START(ID_AA64PFR2, UINJ,         16,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR2, UINJ)
+
+IDREG_FIELD_START(ID_AA64PFR2, RES0_20,      20, 12, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64PFR2, RES0_20)
+
+IDREG_FIELD_START(ID_AA64PFR2, FPMR,         32,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR2, FPMR)
+
+IDREG_FIELD_START(ID_AA64PFR2, RES0_36,      36, 28, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64PFR2, RES0_36)
+
+IDREG_END(ID_AA64PFR2_EL1)
+
+/*  ID_AA64FPFR0_EL1  */
+IDREG_START(ID_AA64FPFR0_EL1)
+IDREG_FIELD_START(ID_AA64FPFR0, F8E5M2,    0,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64FPFR0, F8E5M2)
+
+IDREG_FIELD_START(ID_AA64FPFR0, F8E4M3,    1,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64FPFR0, F8E4M3)
+
+IDREG_FIELD_START(ID_AA64FPFR0, RES0_2,    2, 24, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64FPFR0, RES0_2)
+
+IDREG_FIELD_START(ID_AA64FPFR0, F8MM4,    26,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64FPFR0, F8MM4)
+
+IDREG_FIELD_START(ID_AA64FPFR0, F8MM8,    27,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64FPFR0, F8MM8)
+
+IDREG_FIELD_START(ID_AA64FPFR0, F8DP2,    28,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64FPFR0, F8DP2)
+
+IDREG_FIELD_START(ID_AA64FPFR0, F8DP4,    29,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64FPFR0, F8DP4)
+
+IDREG_FIELD_START(ID_AA64FPFR0, F8FMA,    30,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64FPFR0, F8FMA)
+
+IDREG_FIELD_START(ID_AA64FPFR0, F8CVT,    31,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64FPFR0, F8CVT)
+
+IDREG_FIELD_START(ID_AA64FPFR0, RES0_32,  32, 32, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64FPFR0, RES0_32)
+
+IDREG_END(ID_AA64FPFR0_EL1)
+
+
+/*  ID_AA64MMFR4_EL1  */
+IDREG_START(ID_AA64MMFR4_EL1)
+IDREG_FIELD_START(ID_AA64MMFR4, POPS,      0,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR4, POPS)
+
+IDREG_FIELD_START(ID_AA64MMFR4, EIESB,     4,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "toel3")
+IDREG_FIELD_ARCH_VAL(0b0010, "toelx")
+IDREG_FIELD_ARCH_VAL(0b1111, "any")
+IDREG_FIELD_END(ID_AA64MMFR4, EIESB)
+
+IDREG_FIELD_START(ID_AA64MMFR4, ASID2,     8,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR4, ASID2)
+
+IDREG_FIELD_START(ID_AA64MMFR4, HACDBS,   12,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR4, HACDBS)
+
+IDREG_FIELD_START(ID_AA64MMFR4, FGWTE3,   16,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR4, FGWTE3)
+
+IDREG_FIELD_START(ID_AA64MMFR4, NV_FRAC,  20,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "nv_nv2")
+IDREG_FIELD_ARCH_VAL(0b0001, "nv2_only")
+IDREG_FIELD_ARCH_VAL(0b0010, "nv2p1")
+IDREG_FIELD_END(ID_AA64MMFR4, NV_FRAC)
+
+IDREG_FIELD_START(ID_AA64MMFR4, E2H0,     24,  4, SIGNED_LOWER,  0b1111)
+IDREG_FIELD_ARCH_VAL(0b0000, "on")
+IDREG_FIELD_ARCH_VAL(0b1110, "ni_nv1")
+IDREG_FIELD_ARCH_VAL(0b1111, "off")
+IDREG_FIELD_END(ID_AA64MMFR4, E2H0)
+
+IDREG_FIELD_START(ID_AA64MMFR4, RMEGDI,   28,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR4, RMEGDI)
+
+IDREG_FIELD_START(ID_AA64MMFR4, RES0_32,  32,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64MMFR4, RES0_32)
+
+IDREG_FIELD_START(ID_AA64MMFR4, E3DSE,    36,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR4, E3DSE)
+
+IDREG_FIELD_START(ID_AA64MMFR4, RES0_40,  40,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64MMFR4, RES0_40)
+
+IDREG_FIELD_START(ID_AA64MMFR4, SRMASK,   44,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR4, SRMASK)
+
+IDREG_FIELD_START(ID_AA64MMFR4, RES0_48,  48, 16, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64MMFR4, RES0_48)
+
+IDREG_END(ID_AA64MMFR4_EL1)
+
+/*  ID_AA64DFR1_EL1  */
+IDREG_START(ID_AA64DFR1_EL1)
+IDREG_FIELD_START(ID_AA64DFR1, SYSPMUID,    0,  8, EXACT,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(ID_AA64DFR1, SYSPMUID)
+
+IDREG_FIELD_START(ID_AA64DFR1, BRPS,        8,  8, EXACT,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(ID_AA64DFR1, BRPS)
+
+IDREG_FIELD_START(ID_AA64DFR1, WRPS,       16,  8, EXACT,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(ID_AA64DFR1, WRPS)
+
+IDREG_FIELD_START(ID_AA64DFR1, CTX_CMPS,   24,  8, EXACT,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(ID_AA64DFR1, CTX_CMPS)
+
+IDREG_FIELD_START(ID_AA64DFR1, SPMU,       32,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "imp_spmzr")
+IDREG_FIELD_END(ID_AA64DFR1, SPMU)
+
+IDREG_FIELD_START(ID_AA64DFR1, PMICNTR,    36,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64DFR1, PMICNTR)
+
+IDREG_FIELD_START(ID_AA64DFR1, ABLE,       40,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64DFR1, ABLE)
+
+IDREG_FIELD_START(ID_AA64DFR1, ITE,        44,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64DFR1, ITE)
+
+IDREG_FIELD_START(ID_AA64DFR1, EBEP,       48,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64DFR1, EBEP)
+
+IDREG_FIELD_START(ID_AA64DFR1, DPFZS,      52,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "ignr")
+IDREG_FIELD_ARCH_VAL(0b0001, "frzn")
+IDREG_FIELD_END(ID_AA64DFR1, DPFZS)
+
+IDREG_FIELD_START(ID_AA64DFR1, ABL_CMPS,   56,  8, EXACT,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(ID_AA64DFR1, ABL_CMPS)
+
+IDREG_END(ID_AA64DFR1_EL1)
+
+/*  MIDR_EL1  */
+IDREG_START(MIDR_EL1)
+IDREG_FIELD_START(MIDR, REVISION,       0,  4, ANY,  0)
+IDREG_FIELD_END(MIDR, REVISION)
+
+IDREG_FIELD_START(MIDR, PARTNUM,        4, 12, ANY,  0)
+IDREG_FIELD_END(MIDR, PARTNUM)
+
+IDREG_FIELD_START(MIDR, ARCHITECTURE,  16,  4, ANY,  0)
+IDREG_FIELD_END(MIDR, ARCHITECTURE)
+
+IDREG_FIELD_START(MIDR, VARIANT,       20,  4, ANY,  0)
+IDREG_FIELD_END(MIDR, VARIANT)
+
+IDREG_FIELD_START(MIDR, IMPLEMENTER,   24,  8, ANY,  0)
+IDREG_FIELD_END(MIDR, IMPLEMENTER)
+
+IDREG_FIELD_START(MIDR, RES0_32,       32, 32, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(MIDR, RES0_32)
+
+IDREG_END(MIDR_EL1)
+
+/* REVIDR_EL1  */
+IDREG_START(REVIDR_EL1)
+IDREG_FIELD_START(REVIDR, VAL,  0, 64, ANY,  0)
+IDREG_FIELD_END(REVIDR, VAL)
+
+IDREG_END(REVIDR_EL1)
+
+/* AIDR_EL1  */
+IDREG_START(AIDR_EL1)
+IDREG_FIELD_START(AIDR, VAL,  0, 64, ANY,  0)
+IDREG_FIELD_END(AIDR, VAL)
+
+IDREG_END(AIDR_EL1)
+
+/* DCZID_EL0 */
+IDREG_START(DCZID_EL0)
+IDREG_FIELD_START(DCZID_EL0, BS,       0,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(DCZID_EL0, BS)
+
+IDREG_FIELD_START(DCZID_EL0, DZP,      4,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(DCZID_EL0, DZP)
+
+IDREG_FIELD_START(DCZID_EL0, RES0_5,   5, 59, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(DCZID_EL0, RES0_5)
+
+IDREG_END(DCZID_EL0)
+
+
+/*  ID_AA64AFR0_EL1  */
+IDREG_START(ID_AA64AFR0_EL1)
+IDREG_FIELD_START(ID_AA64AFR0, VAL,  0, 64, EXACT,  0)
+IDREG_FIELD_END(ID_AA64AFR0, VAL)
+
+IDREG_END(ID_AA64AFR0_EL1)
+
+/*  ID_AA64AFR1_EL1  */
+IDREG_START(ID_AA64AFR1_EL1)
+IDREG_FIELD_START(ID_AA64AFR1, VAL,  0, 64, EXACT,  0)
+IDREG_FIELD_END(ID_AA64AFR1, VAL)
+
+IDREG_END(ID_AA64AFR1_EL1)
+
+ /* AArch32 ID registers */
+
+/*  ID_PFR0_EL1  */
+IDREG_START(ID_PFR0_EL1)
+IDREG_FIELD_START(ID_PFR0, VAL,  0, 64, EXACT,  0)
+IDREG_FIELD_END(ID_PFR0, VAL)
+
+IDREG_END(ID_PFR0_EL1)
+
+/*  ID_PFR1_EL1  */
+IDREG_START(ID_PFR1_EL1)
+IDREG_FIELD_START(ID_PFR1, VAL_LO,    0, 28, EXACT,  0)
+IDREG_FIELD_END(ID_PFR1, VAL_LO)
+
+IDREG_FIELD_START(ID_PFR1, GIC,      28,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "gicv3")
+IDREG_FIELD_ARCH_VAL(0b0011, "gicv4p1")
+IDREG_FIELD_END(ID_PFR1, GIC)
+
+IDREG_FIELD_START(ID_PFR1, RES0_HI, 32, 32, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_PFR1, RES0_HI)
+
+IDREG_END(ID_PFR1_EL1)
+
+/* ID_DFR0_EL1  */
+IDREG_START(ID_DFR0_EL1)
+IDREG_FIELD_START(ID_DFR0, VAL_LO,    0, 24, EXACT,  0 )
+IDREG_FIELD_END(ID_DFR0, VAL_LO)
+
+IDREG_FIELD_START(ID_DFR0, PMU,      24,  4, LOWER,  0 )
+IDREG_FIELD_END(ID_DFR0, PMU)
+
+IDREG_FIELD_START(ID_DFR0, VAL_HI,   28,  4, EXACT,  0 )
+IDREG_FIELD_END(ID_DFR0, VAL_HI)
+
+IDREG_FIELD_START(ID_DFR0, RES0_HI, 32, 32, EXACT,  0 )
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_DFR0, RES0_HI)
+
+IDREG_END(ID_DFR0_EL1)
+
+/*  ID_AFR0_EL1  */
+IDREG_START(ID_AFR0_EL1)
+IDREG_FIELD_START(ID_AFR0, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_AFR0, VAL)
+
+IDREG_END(ID_AFR0_EL1)
+
+/* ID_MMFR0_EL1  */
+IDREG_START(ID_MMFR0_EL1)
+IDREG_FIELD_START(ID_MMFR0, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_MMFR0, VAL)
+
+IDREG_END(ID_MMFR0_EL1)
+
+/* ID_MMFR1_EL1  */
+IDREG_START(ID_MMFR1_EL1)
+IDREG_FIELD_START(ID_MMFR1, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_MMFR1, VAL)
+
+IDREG_END(ID_MMFR1_EL1)
+
+/* ID_MMFR2_EL1 */
+IDREG_START(ID_MMFR2_EL1)
+IDREG_FIELD_START(ID_MMFR2, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_MMFR2, VAL)
+
+IDREG_END(ID_MMFR2_EL1)
+
+/* ID_MMFR3_EL1  */
+IDREG_START(ID_MMFR3_EL1)
+IDREG_FIELD_START(ID_MMFR3, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_MMFR3, VAL)
+
+IDREG_END(ID_MMFR3_EL1)
+
+/*  ID_MMFR4_EL1  */
+IDREG_START(ID_MMFR4_EL1)
+IDREG_FIELD_START(ID_MMFR4, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_MMFR4, VAL)
+
+IDREG_END(ID_MMFR4_EL1)
+
+/* ID_MMFR5_EL1  */
+IDREG_START(ID_MMFR5_EL1)
+IDREG_FIELD_START(ID_MMFR5, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_MMFR5, VAL)
+
+IDREG_END(ID_MMFR5_EL1)
+
+/* ID_ISAR0_EL1  */
+IDREG_START(ID_ISAR0_EL1)
+IDREG_FIELD_START(ID_ISAR0, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_ISAR0, VAL)
+
+IDREG_END(ID_ISAR0_EL1)
+
+/*  ID_ISAR1_EL1  */
+IDREG_START(ID_ISAR1_EL1)
+IDREG_FIELD_START(ID_ISAR1, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_ISAR1, VAL)
+
+IDREG_END(ID_ISAR1_EL1)
+
+/*  ID_ISAR2_EL1  */
+IDREG_START(ID_ISAR2_EL1)
+IDREG_FIELD_START(ID_ISAR2, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_ISAR2, VAL)
+
+IDREG_END(ID_ISAR2_EL1)
+
+/*  ID_ISAR3_EL1  */
+IDREG_START(ID_ISAR3_EL1)
+IDREG_FIELD_START(ID_ISAR3, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_ISAR3, VAL)
+
+IDREG_END(ID_ISAR3_EL1)
+
+/*  ID_ISAR4_EL1  */
+IDREG_START(ID_ISAR4_EL1)
+IDREG_FIELD_START(ID_ISAR4, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_ISAR4, VAL)
+
+IDREG_END(ID_ISAR4_EL1)
+
+/* ID_ISAR5_EL1  */
+IDREG_START(ID_ISAR5_EL1)
+IDREG_FIELD_START(ID_ISAR5, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_ISAR5, VAL)
+
+IDREG_END(ID_ISAR5_EL1)
+
+/*  ID_ISAR6_EL1  */
+IDREG_START(ID_ISAR6_EL1)
+IDREG_FIELD_START(ID_ISAR6, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_ISAR6, VAL)
+
+IDREG_END(ID_ISAR6_EL1)
+
+/*  ID_PFR2_EL1  */
+IDREG_START(ID_PFR2_EL1)
+IDREG_FIELD_START(ID_PFR2, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_PFR2, VAL)
+
+IDREG_END(ID_PFR2_EL1)
+
+/*  ID_DFR1_EL1 */
+IDREG_START(ID_DFR1_EL1)
+IDREG_FIELD_START(ID_DFR1, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_DFR1, VAL)
+
+IDREG_END(ID_DFR1_EL1)
+
+/*  MVFR0_EL1  */
+IDREG_START(MVFR0_EL1)
+IDREG_FIELD_START(MVFR0, VAL,  0, 64, EXACT,  0)
+IDREG_FIELD_END(MVFR0, VAL)
+
+IDREG_END(MVFR0_EL1)
+
+/*  MVFR1_EL1  */
+IDREG_START(MVFR1_EL1)
+IDREG_FIELD_START(MVFR1, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(MVFR1, VAL)
+
+IDREG_END(MVFR1_EL1)
+
+/* MVFR2_EL1  */
+IDREG_START(MVFR2_EL1)
+IDREG_FIELD_START(MVFR2, VAL,  0, 64, EXACT,  0)
+IDREG_FIELD_END(MVFR2, VAL)
+
+IDREG_END(MVFR2_EL1)
#7 lore raw

Re: [RFC PATCH v1 02/13] target/arm: named_cpu_model: Add ID Register Fields

In reply to Shaju Abraham
Quoted 1,745 lines · Shaju Abraham

Add a declarative description of every architecturally defined field in the Arm64 ID registers in cpu-idregs.h.inc file. This file will be included multiple times with different definitions to build the per-field arch values, per-register field descriptor arrays, arm-idregs table etc. The architecturely defined values for each ID register field is extracted from kernel's arch/arm64/tools/sysreg file. The safe-value tags and default values are derived from the kernel's ftr_bits array. Aarch32 ID registers are added with dummy field so they can be defaulted to 0 by later commits.

X-macro structure:
IDREG_START(REG)
IDREG_FIELD_START(REG, FIELD, SHIFT, LENGTH, SAFE_RULE, DEFAULT_VAL) IDREG_FIELD_ARCH_VAL(VALUE, NAME)
...
IDREG_FIELD_END(REG, FIELD)
...
IDREG_END(REG)

---
 target/arm/cpu-idregs.h.inc | 1724 +++++++++++++++++++++++++++++++++++
 1 file changed, 1724 insertions(+)
 create mode 100644 target/arm/cpu-idregs.h.inc
target/arm/cpu-idregs.h.inc new file +1714 -0
new file mode 100644
index 0000000000..5a627631c9
@@ -0,0 +1,1724 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+/* ID_AA64ISAR0_EL1 */
+IDREG_START(ID_AA64ISAR0_EL1)
+IDREG_FIELD_START(ID_AA64ISAR0, RES0_0,   0,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64ISAR0, RES0_0)
+
+IDREG_FIELD_START(ID_AA64ISAR0, AES,      4,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "aes")
+IDREG_FIELD_ARCH_VAL(0b0010, "pmull")
+IDREG_FIELD_END(ID_AA64ISAR0, AES)
+
+IDREG_FIELD_START(ID_AA64ISAR0, SHA1,     8,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR0, SHA1)
+
+IDREG_FIELD_START(ID_AA64ISAR0, SHA2,    12,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "sha256")
+IDREG_FIELD_ARCH_VAL(0b0010, "sha512")
+IDREG_FIELD_END(ID_AA64ISAR0, SHA2)
+
+IDREG_FIELD_START(ID_AA64ISAR0, CRC32,   16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR0, CRC32)
+
+IDREG_FIELD_START(ID_AA64ISAR0, ATOMIC,  20,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0010, "on")
+IDREG_FIELD_ARCH_VAL(0b0011, "LSE128")
+IDREG_FIELD_END(ID_AA64ISAR0, ATOMIC)
+
+IDREG_FIELD_START(ID_AA64ISAR0, RES0_24, 24,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64ISAR0, RES0_24)
+
+IDREG_FIELD_START(ID_AA64ISAR0, RDM,     28,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR0, RDM)
+
+IDREG_FIELD_START(ID_AA64ISAR0, SHA3,    32,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR0, SHA3)
+
+IDREG_FIELD_START(ID_AA64ISAR0, SM3,     36,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR0, SM3)
+
+IDREG_FIELD_START(ID_AA64ISAR0, SM4,     40,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR0, SM4)
+
+IDREG_FIELD_START(ID_AA64ISAR0, DP,      44,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR0, DP)
+
+IDREG_FIELD_START(ID_AA64ISAR0, FHM,     48,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR0, FHM)
+
+IDREG_FIELD_START(ID_AA64ISAR0, TS,      52,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "flagm")
+IDREG_FIELD_ARCH_VAL(0b0010, "flagm2")
+IDREG_FIELD_END(ID_AA64ISAR0, TS)
+
+IDREG_FIELD_START(ID_AA64ISAR0, TLB,     56,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "os")
+IDREG_FIELD_ARCH_VAL(0b0010, "range")
+IDREG_FIELD_END(ID_AA64ISAR0, TLB)
+
+IDREG_FIELD_START(ID_AA64ISAR0, RNDR,    60,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR0, RNDR)
+
+IDREG_END(ID_AA64ISAR0_EL1)
+
+/* ID_AA64ISAR1_EL1 */
+IDREG_START(ID_AA64ISAR1_EL1)
+IDREG_FIELD_START(ID_AA64ISAR1, DPB,      0,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "dpb2")
+IDREG_FIELD_END(ID_AA64ISAR1, DPB)
+
+IDREG_FIELD_START(ID_AA64ISAR1, APA,      4,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "pauth")
+IDREG_FIELD_ARCH_VAL(0b0010, "epac")
+IDREG_FIELD_ARCH_VAL(0b0011, "pauth2")
+IDREG_FIELD_ARCH_VAL(0b0100, "fpac")
+IDREG_FIELD_ARCH_VAL(0b0101, "fpaccombine")
+IDREG_FIELD_ARCH_VAL(0b0110, "pauth_lr")
+IDREG_FIELD_END(ID_AA64ISAR1, APA)
+
+IDREG_FIELD_START(ID_AA64ISAR1, API,      8,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "pauth")
+IDREG_FIELD_ARCH_VAL(0b0010, "epac")
+IDREG_FIELD_ARCH_VAL(0b0011, "pauth2")
+IDREG_FIELD_ARCH_VAL(0b0100, "fpac")
+IDREG_FIELD_ARCH_VAL(0b0101, "fpaccombine")
+IDREG_FIELD_ARCH_VAL(0b0110, "pauth_lr")
+IDREG_FIELD_END(ID_AA64ISAR1, API)
+
+IDREG_FIELD_START(ID_AA64ISAR1, JSCVT,   12,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR1, JSCVT)
+
+IDREG_FIELD_START(ID_AA64ISAR1, FCMA,    16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR1, FCMA)
+
+IDREG_FIELD_START(ID_AA64ISAR1, LRCPC,   20,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "lrcpc2")
+IDREG_FIELD_ARCH_VAL(0b0011, "lrcpc3")
+IDREG_FIELD_END(ID_AA64ISAR1, LRCPC)
+
+IDREG_FIELD_START(ID_AA64ISAR1, GPA,     24,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR1, GPA)
+
+IDREG_FIELD_START(ID_AA64ISAR1, GPI,     28,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR1, GPI)
+
+IDREG_FIELD_START(ID_AA64ISAR1, FRINTTS, 32,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR1, FRINTTS)
+
+IDREG_FIELD_START(ID_AA64ISAR1, SB,      36,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR1, SB)
+
+IDREG_FIELD_START(ID_AA64ISAR1, SPECRES, 40,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "cosp_rctx")
+IDREG_FIELD_END(ID_AA64ISAR1, SPECRES)
+
+IDREG_FIELD_START(ID_AA64ISAR1, BF16,    44,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "ebf16")
+IDREG_FIELD_END(ID_AA64ISAR1, BF16)
+
+IDREG_FIELD_START(ID_AA64ISAR1, DGH,     48,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR1, DGH)
+
+IDREG_FIELD_START(ID_AA64ISAR1, I8MM,    52,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR1, I8MM)
+
+IDREG_FIELD_START(ID_AA64ISAR1, XS,      56,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR1, XS)
+
+IDREG_FIELD_START(ID_AA64ISAR1, LS64,    60,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "ls64")
+IDREG_FIELD_ARCH_VAL(0b0010, "ls64_v")
+IDREG_FIELD_ARCH_VAL(0b0011, "ls64_accdata")
+IDREG_FIELD_ARCH_VAL(0b0100, "ls64wb")
+IDREG_FIELD_END(ID_AA64ISAR1, LS64)
+
+IDREG_END(ID_AA64ISAR1_EL1)
+
+/*  ID_AA64ISAR2_EL1  */
+IDREG_START(ID_AA64ISAR2_EL1)
+IDREG_FIELD_START(ID_AA64ISAR2, WFXT,          0,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0010, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, WFXT)
+
+IDREG_FIELD_START(ID_AA64ISAR2, RPRES,         4,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, RPRES)
+
+IDREG_FIELD_START(ID_AA64ISAR2, GPA3,          8,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, GPA3)
+
+IDREG_FIELD_START(ID_AA64ISAR2, APA3,         12,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "pauth")
+IDREG_FIELD_ARCH_VAL(0b0010, "epac")
+IDREG_FIELD_ARCH_VAL(0b0011, "pauth2")
+IDREG_FIELD_ARCH_VAL(0b0100, "fpac")
+IDREG_FIELD_ARCH_VAL(0b0101, "fpaccombine")
+IDREG_FIELD_ARCH_VAL(0b0110, "pauth_lr")
+IDREG_FIELD_END(ID_AA64ISAR2, APA3)
+
+IDREG_FIELD_START(ID_AA64ISAR2, MOPS,         16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, MOPS)
+
+IDREG_FIELD_START(ID_AA64ISAR2, BC,           20,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, BC)
+
+IDREG_FIELD_START(ID_AA64ISAR2, PAC_FRAC,     24,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, PAC_FRAC)
+
+IDREG_FIELD_START(ID_AA64ISAR2, CLRBHB,       28,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, CLRBHB)
+
+IDREG_FIELD_START(ID_AA64ISAR2, SYSREG_128,   32,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, SYSREG_128)
+
+IDREG_FIELD_START(ID_AA64ISAR2, SYSINSTR_128, 36,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, SYSINSTR_128)
+
+IDREG_FIELD_START(ID_AA64ISAR2, PRFMSLC,      40,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, PRFMSLC)
+
+IDREG_FIELD_START(ID_AA64ISAR2, PCDPHINT,     44,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, PCDPHINT)
+
+IDREG_FIELD_START(ID_AA64ISAR2, RPRFM,        48,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, RPRFM)
+
+IDREG_FIELD_START(ID_AA64ISAR2, CSSC,         52,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "cmpbr")
+IDREG_FIELD_END(ID_AA64ISAR2, CSSC)
+
+IDREG_FIELD_START(ID_AA64ISAR2, LUT,          56,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, LUT)
+
+IDREG_FIELD_START(ID_AA64ISAR2, ATS1A,        60,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR2, ATS1A)
+
+IDREG_END(ID_AA64ISAR2_EL1)
+
+/*  ID_AA64PFR0_EL1  */
+IDREG_START(ID_AA64PFR0_EL1)
+IDREG_FIELD_START(ID_AA64PFR0, EL0,     0,  4, LOWER,  0b0001)
+IDREG_FIELD_ARCH_VAL(0b0001, "aarch64")
+IDREG_FIELD_ARCH_VAL(0b0010, "aarch32")
+IDREG_FIELD_END(ID_AA64PFR0, EL0)
+
+IDREG_FIELD_START(ID_AA64PFR0, EL1,     4,  4, LOWER,  0b0001)
+IDREG_FIELD_ARCH_VAL(0b0001, "aarch64")
+IDREG_FIELD_ARCH_VAL(0b0010, "aarch32")
+IDREG_FIELD_END(ID_AA64PFR0, EL1)
+
+IDREG_FIELD_START(ID_AA64PFR0, EL2,     8,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "aarch64")
+IDREG_FIELD_ARCH_VAL(0b0010, "aarch32")
+IDREG_FIELD_END(ID_AA64PFR0, EL2)
+
+IDREG_FIELD_START(ID_AA64PFR0, EL3,    12,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "aarch64")
+IDREG_FIELD_ARCH_VAL(0b0010, "aarch32")
+IDREG_FIELD_END(ID_AA64PFR0, EL3)
+
+IDREG_FIELD_START(ID_AA64PFR0, FP,     16,  4, SIGNED_LOWER,  0b1111)
+IDREG_FIELD_ARCH_VAL(0b0000, "on")
+IDREG_FIELD_ARCH_VAL(0b0001, "fp16")
+IDREG_FIELD_ARCH_VAL(0b1111, "off")
+IDREG_FIELD_END(ID_AA64PFR0, FP)
+
+IDREG_FIELD_START(ID_AA64PFR0, ADVSIMD,20,  4, SIGNED_LOWER,  0b1111)
+IDREG_FIELD_ARCH_VAL(0b0000, "on")
+IDREG_FIELD_ARCH_VAL(0b0001, "fp16")
+IDREG_FIELD_ARCH_VAL(0b1111, "off")
+IDREG_FIELD_END(ID_AA64PFR0, ADVSIMD)
+
+IDREG_FIELD_START(ID_AA64PFR0, GIC,    24,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0011, "v4p1")
+IDREG_FIELD_END(ID_AA64PFR0, GIC)
+
+IDREG_FIELD_START(ID_AA64PFR0, RAS,    28,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "v1p1")
+IDREG_FIELD_ARCH_VAL(0b0011, "v2")
+IDREG_FIELD_END(ID_AA64PFR0, RAS)
+
+IDREG_FIELD_START(ID_AA64PFR0, SVE,    32,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR0, SVE)
+
+IDREG_FIELD_START(ID_AA64PFR0, SEL2,   36,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR0, SEL2)
+
+IDREG_FIELD_START(ID_AA64PFR0, MPAM,   40,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "0")
+IDREG_FIELD_ARCH_VAL(0b0001, "1")
+IDREG_FIELD_END(ID_AA64PFR0, MPAM)
+
+IDREG_FIELD_START(ID_AA64PFR0, AMU,    44,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "v1p1")
+IDREG_FIELD_END(ID_AA64PFR0, AMU)
+
+IDREG_FIELD_START(ID_AA64PFR0, DIT,    48,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR0, DIT)
+
+IDREG_FIELD_START(ID_AA64PFR0, RME,    52,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR0, RME)
+
+IDREG_FIELD_START(ID_AA64PFR0, CSV2,   56,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "csv2_2")
+IDREG_FIELD_ARCH_VAL(0b0011, "csv2_3")
+IDREG_FIELD_END(ID_AA64PFR0, CSV2)
+
+IDREG_FIELD_START(ID_AA64PFR0, CSV3,   60,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR0, CSV3)
+
+IDREG_END(ID_AA64PFR0_EL1)
+
+/*  ID_AA64PFR1_EL1  */
+IDREG_START(ID_AA64PFR1_EL1)
+IDREG_FIELD_START(ID_AA64PFR1, BT,        0,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR1, BT)
+
+IDREG_FIELD_START(ID_AA64PFR1, SSBS,      4,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "ssbs2")
+IDREG_FIELD_END(ID_AA64PFR1, SSBS)
+
+IDREG_FIELD_START(ID_AA64PFR1, MTE,       8,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "mte2")
+IDREG_FIELD_ARCH_VAL(0b0011, "mte3")
+IDREG_FIELD_END(ID_AA64PFR1, MTE)
+
+IDREG_FIELD_START(ID_AA64PFR1, RAS_FRAC, 12,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "rasv1p1")
+IDREG_FIELD_END(ID_AA64PFR1, RAS_FRAC)
+
+IDREG_FIELD_START(ID_AA64PFR1, MPAM_FRAC,16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "minor_0")
+IDREG_FIELD_ARCH_VAL(0b0001, "minor_1")
+IDREG_FIELD_END(ID_AA64PFR1, MPAM_FRAC)
+
+IDREG_FIELD_START(ID_AA64PFR1, RES0_20,  20,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64PFR1, RES0_20)
+
+IDREG_FIELD_START(ID_AA64PFR1, SME,      24,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "sme2")
+IDREG_FIELD_END(ID_AA64PFR1, SME)
+
+IDREG_FIELD_START(ID_AA64PFR1, RNDR_TRAP,28,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR1, RNDR_TRAP)
+
+IDREG_FIELD_START(ID_AA64PFR1, CSV2_FRAC,32,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "csv2_1p1")
+IDREG_FIELD_ARCH_VAL(0b0010, "csv2_1p2")
+IDREG_FIELD_END(ID_AA64PFR1, CSV2_FRAC)
+
+IDREG_FIELD_START(ID_AA64PFR1, NMI,      36,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR1, NMI)
+
+IDREG_FIELD_START(ID_AA64PFR1, MTE_FRAC, 40,  4, SIGNED_LOWER,  0b1111)
+IDREG_FIELD_ARCH_VAL(0b0000, "async")
+IDREG_FIELD_ARCH_VAL(0b1111, "off")
+IDREG_FIELD_END(ID_AA64PFR1, MTE_FRAC)
+
+IDREG_FIELD_START(ID_AA64PFR1, GCS,      44,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR1, GCS)
+
+IDREG_FIELD_START(ID_AA64PFR1, THE,      48,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR1, THE)
+
+IDREG_FIELD_START(ID_AA64PFR1, MTEX,     52,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "mte")
+IDREG_FIELD_ARCH_VAL(0b0001, "mte4")
+IDREG_FIELD_END(ID_AA64PFR1, MTEX)
+
+IDREG_FIELD_START(ID_AA64PFR1, DF2,      56,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR1, DF2)
+
+IDREG_FIELD_START(ID_AA64PFR1, PFAR,     60,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR1, PFAR)
+
+IDREG_END(ID_AA64PFR1_EL1)
+
+/*  ID_AA64MMFR0_EL1 */
+IDREG_START(ID_AA64MMFR0_EL1)
+IDREG_FIELD_START(ID_AA64MMFR0, PARANGE,    0,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "32")
+IDREG_FIELD_ARCH_VAL(0b0001, "36")
+IDREG_FIELD_ARCH_VAL(0b0010, "40")
+IDREG_FIELD_ARCH_VAL(0b0011, "42")
+IDREG_FIELD_ARCH_VAL(0b0100, "44")
+IDREG_FIELD_ARCH_VAL(0b0101, "48")
+IDREG_FIELD_ARCH_VAL(0b0110, "52")
+IDREG_FIELD_ARCH_VAL(0b0111, "56")
+IDREG_FIELD_END(ID_AA64MMFR0, PARANGE)
+
+IDREG_FIELD_START(ID_AA64MMFR0, ASIDBITS,   4,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "8")
+IDREG_FIELD_ARCH_VAL(0b0010, "16")
+IDREG_FIELD_END(ID_AA64MMFR0, ASIDBITS)
+
+IDREG_FIELD_START(ID_AA64MMFR0, BIGEND,     8,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR0, BIGEND)
+
+IDREG_FIELD_START(ID_AA64MMFR0, SNSMEM,    12,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR0, SNSMEM)
+
+IDREG_FIELD_START(ID_AA64MMFR0, BIGENDEL0, 16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR0, BIGENDEL0)
+
+IDREG_FIELD_START(ID_AA64MMFR0, TGRAN16,   20,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "52_bit")
+IDREG_FIELD_END(ID_AA64MMFR0, TGRAN16)
+
+IDREG_FIELD_START(ID_AA64MMFR0, TGRAN64,   24,  4, SIGNED_LOWER,  0b1111)
+IDREG_FIELD_ARCH_VAL(0b0000, "on")
+IDREG_FIELD_ARCH_VAL(0b1111, "off")
+IDREG_FIELD_END(ID_AA64MMFR0, TGRAN64)
+
+IDREG_FIELD_START(ID_AA64MMFR0, TGRAN4,    28,  4, SIGNED_LOWER,  0b1111)
+IDREG_FIELD_ARCH_VAL(0b0000, "on")
+IDREG_FIELD_ARCH_VAL(0b0001, "52_bit")
+IDREG_FIELD_ARCH_VAL(0b1111, "off")
+IDREG_FIELD_END(ID_AA64MMFR0, TGRAN4)
+
+IDREG_FIELD_START(ID_AA64MMFR0, TGRAN16_2, 32,  4, EXACT,  0b0001)
+IDREG_FIELD_ARCH_VAL(0b0000, "tgran16")
+IDREG_FIELD_ARCH_VAL(0b0001, "off")
+IDREG_FIELD_ARCH_VAL(0b0010, "on")
+IDREG_FIELD_ARCH_VAL(0b0011, "52_bit")
+IDREG_FIELD_END(ID_AA64MMFR0, TGRAN16_2)
+
+IDREG_FIELD_START(ID_AA64MMFR0, TGRAN64_2, 36,  4, EXACT,  0b0001)
+IDREG_FIELD_ARCH_VAL(0b0000, "tgran64")
+IDREG_FIELD_ARCH_VAL(0b0001, "off")
+IDREG_FIELD_ARCH_VAL(0b0010, "on")
+IDREG_FIELD_END(ID_AA64MMFR0, TGRAN64_2)
+
+IDREG_FIELD_START(ID_AA64MMFR0, TGRAN4_2,  40,  4, EXACT,  0b0001)
+IDREG_FIELD_ARCH_VAL(0b0000, "tgran4")
+IDREG_FIELD_ARCH_VAL(0b0001, "off")
+IDREG_FIELD_ARCH_VAL(0b0010, "on")
+IDREG_FIELD_ARCH_VAL(0b0011, "52_bit")
+IDREG_FIELD_END(ID_AA64MMFR0, TGRAN4_2)
+
+IDREG_FIELD_START(ID_AA64MMFR0, EXS,       44,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR0, EXS)
+
+IDREG_FIELD_START(ID_AA64MMFR0, RES0_48,   48,  8, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64MMFR0, RES0_48)
+
+IDREG_FIELD_START(ID_AA64MMFR0, FGT,       56,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "fgt2")
+IDREG_FIELD_END(ID_AA64MMFR0, FGT)
+
+IDREG_FIELD_START(ID_AA64MMFR0, ECV,       60,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "cntpoff")
+IDREG_FIELD_END(ID_AA64MMFR0, ECV)
+
+IDREG_END(ID_AA64MMFR0_EL1)
+
+/*  ID_AA64MMFR1_EL1  */
+IDREG_START(ID_AA64MMFR1_EL1)
+IDREG_FIELD_START(ID_AA64MMFR1, HAFDBS,    0,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "af")
+IDREG_FIELD_ARCH_VAL(0b0010, "dbm")
+IDREG_FIELD_ARCH_VAL(0b0011, "haft")
+IDREG_FIELD_ARCH_VAL(0b0100, "hdbss")
+IDREG_FIELD_END(ID_AA64MMFR1, HAFDBS)
+
+IDREG_FIELD_START(ID_AA64MMFR1, VMIDBITS,  4,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "8")
+IDREG_FIELD_ARCH_VAL(0b0010, "16")
+IDREG_FIELD_END(ID_AA64MMFR1, VMIDBITS)
+
+IDREG_FIELD_START(ID_AA64MMFR1, VH,        8,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, VH)
+
+IDREG_FIELD_START(ID_AA64MMFR1, HPDS,     12,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "hpds2")
+IDREG_FIELD_END(ID_AA64MMFR1, HPDS)
+
+IDREG_FIELD_START(ID_AA64MMFR1, LO,       16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, LO)
+
+IDREG_FIELD_START(ID_AA64MMFR1, PAN,      20,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "pan2")
+IDREG_FIELD_ARCH_VAL(0b0011, "pan3")
+IDREG_FIELD_END(ID_AA64MMFR1, PAN)
+
+IDREG_FIELD_START(ID_AA64MMFR1, SPECSEI,  24,  4, HIGHER, 0b0001)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, SPECSEI)
+
+IDREG_FIELD_START(ID_AA64MMFR1, XNX,      28,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, XNX)
+
+IDREG_FIELD_START(ID_AA64MMFR1, TWED,     32,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, TWED)
+
+IDREG_FIELD_START(ID_AA64MMFR1, ETS,      36,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "ets2")
+IDREG_FIELD_ARCH_VAL(0b0011, "ets3")
+IDREG_FIELD_END(ID_AA64MMFR1, ETS)
+
+IDREG_FIELD_START(ID_AA64MMFR1, HCX,      40,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, HCX)
+
+IDREG_FIELD_START(ID_AA64MMFR1, AFP,      44,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, AFP)
+
+IDREG_FIELD_START(ID_AA64MMFR1, NTLBPA,   48,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, NTLBPA)
+
+IDREG_FIELD_START(ID_AA64MMFR1, TIDCP1,   52,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, TIDCP1)
+
+IDREG_FIELD_START(ID_AA64MMFR1, CMOW,     56,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, CMOW)
+
+IDREG_FIELD_START(ID_AA64MMFR1, ECBHB,    60,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR1, ECBHB)
+
+IDREG_END(ID_AA64MMFR1_EL1)
+
+/*  ID_AA64MMFR2_EL1  */
+IDREG_START(ID_AA64MMFR2_EL1)
+IDREG_FIELD_START(ID_AA64MMFR2, CNP,      0,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR2, CNP)
+
+IDREG_FIELD_START(ID_AA64MMFR2, UAO,      4,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR2, UAO)
+
+IDREG_FIELD_START(ID_AA64MMFR2, LSM,      8,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR2, LSM)
+
+IDREG_FIELD_START(ID_AA64MMFR2, IESB,    12,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR2, IESB)
+
+IDREG_FIELD_START(ID_AA64MMFR2, VARANGE, 16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "48")
+IDREG_FIELD_ARCH_VAL(0b0001, "52")
+IDREG_FIELD_END(ID_AA64MMFR2, VARANGE)
+
+IDREG_FIELD_START(ID_AA64MMFR2, CCIDX,   20,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "32")
+IDREG_FIELD_ARCH_VAL(0b0001, "64")
+IDREG_FIELD_END(ID_AA64MMFR2, CCIDX)
+
+IDREG_FIELD_START(ID_AA64MMFR2, NV,      24,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "nv2")
+IDREG_FIELD_END(ID_AA64MMFR2, NV)
+
+IDREG_FIELD_START(ID_AA64MMFR2, ST,      28,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "39")
+IDREG_FIELD_ARCH_VAL(0b0001, "48_47")
+IDREG_FIELD_END(ID_AA64MMFR2, ST)
+
+IDREG_FIELD_START(ID_AA64MMFR2, AT,      32,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR2, AT)
+
+IDREG_FIELD_START(ID_AA64MMFR2, IDS,     36,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "0x0")
+IDREG_FIELD_ARCH_VAL(0b0001, "0x18")
+IDREG_FIELD_END(ID_AA64MMFR2, IDS)
+
+IDREG_FIELD_START(ID_AA64MMFR2, FWB,     40,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR2, FWB)
+
+IDREG_FIELD_START(ID_AA64MMFR2, RES0_44, 44,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64MMFR2, RES0_44)
+
+IDREG_FIELD_START(ID_AA64MMFR2, TTL,     48,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR2, TTL)
+
+IDREG_FIELD_START(ID_AA64MMFR2, BBM,     52,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "0")
+IDREG_FIELD_ARCH_VAL(0b0001, "1")
+IDREG_FIELD_ARCH_VAL(0b0010, "2")
+IDREG_FIELD_END(ID_AA64MMFR2, BBM)
+
+IDREG_FIELD_START(ID_AA64MMFR2, EVT,     56,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "ttlbxs")
+IDREG_FIELD_END(ID_AA64MMFR2, EVT)
+
+IDREG_FIELD_START(ID_AA64MMFR2, E0PD,    60,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR2, E0PD)
+
+IDREG_END(ID_AA64MMFR2_EL1)
+
+/* ID_AA64MMFR3_EL1  */
+IDREG_START(ID_AA64MMFR3_EL1)
+IDREG_FIELD_START(ID_AA64MMFR3, TCRX,       0,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, TCRX)
+
+IDREG_FIELD_START(ID_AA64MMFR3, SCTLRX,     4,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, SCTLRX)
+
+IDREG_FIELD_START(ID_AA64MMFR3, S1PIE,      8,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, S1PIE)
+
+IDREG_FIELD_START(ID_AA64MMFR3, S2PIE,     12,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, S2PIE)
+
+IDREG_FIELD_START(ID_AA64MMFR3, S1POE,     16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, S1POE)
+
+IDREG_FIELD_START(ID_AA64MMFR3, S2POE,     20,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, S2POE)
+
+IDREG_FIELD_START(ID_AA64MMFR3, AIE,       24,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, AIE)
+
+IDREG_FIELD_START(ID_AA64MMFR3, MEC,       28,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, MEC)
+
+IDREG_FIELD_START(ID_AA64MMFR3, D128,      32,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, D128)
+
+IDREG_FIELD_START(ID_AA64MMFR3, D128_2,    36,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, D128_2)
+
+IDREG_FIELD_START(ID_AA64MMFR3, SNERR,     40,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "sync")
+IDREG_FIELD_ARCH_VAL(0b0010, "ANERR")
+IDREG_FIELD_ARCH_VAL(0b0011, "ANERR_IND")
+IDREG_FIELD_END(ID_AA64MMFR3, SNERR)
+
+IDREG_FIELD_START(ID_AA64MMFR3, ANERR,     44,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "async")
+IDREG_FIELD_ARCH_VAL(0b0010, "ANERR")
+IDREG_FIELD_ARCH_VAL(0b0011, "ANERR_IND")
+IDREG_FIELD_END(ID_AA64MMFR3, ANERR)
+
+IDREG_FIELD_START(ID_AA64MMFR3, RES0_48,   48,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64MMFR3, RES0_48)
+
+IDREG_FIELD_START(ID_AA64MMFR3, SDERR,     52,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "dev_sync")
+IDREG_FIELD_ARCH_VAL(0b0010, "ADERR")
+IDREG_FIELD_ARCH_VAL(0b0011, "ADERR_IND")
+IDREG_FIELD_END(ID_AA64MMFR3, SDERR)
+
+IDREG_FIELD_START(ID_AA64MMFR3, ADERR,     56,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "dev_async")
+IDREG_FIELD_ARCH_VAL(0b0010, "ADERR")
+IDREG_FIELD_ARCH_VAL(0b0011, "ADERR_IND")
+IDREG_FIELD_END(ID_AA64MMFR3, ADERR)
+
+IDREG_FIELD_START(ID_AA64MMFR3, SPEC_FPACC,60,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR3, SPEC_FPACC)
+
+IDREG_END(ID_AA64MMFR3_EL1)
+
+/* ID_AA64DFR0_EL1 */
+IDREG_START(ID_AA64DFR0_EL1)
+IDREG_FIELD_START(ID_AA64DFR0, DEBUGVER,    0,  4, LOWER,  0x6)
+IDREG_FIELD_ARCH_VAL(0b0110, "on")
+IDREG_FIELD_ARCH_VAL(0b0111, "vhe")
+IDREG_FIELD_ARCH_VAL(0b1000, "v8p2")
+IDREG_FIELD_ARCH_VAL(0b1001, "v8p4")
+IDREG_FIELD_ARCH_VAL(0b1010, "v8p8")
+IDREG_FIELD_ARCH_VAL(0b1011, "v8p9")
+IDREG_FIELD_END(ID_AA64DFR0, DEBUGVER)
+
+IDREG_FIELD_START(ID_AA64DFR0, TRACEVER,    4,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64DFR0, TRACEVER)
+
+IDREG_FIELD_START(ID_AA64DFR0, PMUVER,      8,  4, SIGNED_LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0100, "v3p1")
+IDREG_FIELD_ARCH_VAL(0b0101, "v3p4")
+IDREG_FIELD_ARCH_VAL(0b0110, "v3p5")
+IDREG_FIELD_ARCH_VAL(0b0111, "v3p7")
+IDREG_FIELD_ARCH_VAL(0b1000, "v3p8")
+IDREG_FIELD_ARCH_VAL(0b1001, "v3p9")
+IDREG_FIELD_ARCH_VAL(0b1111, "imp_def")
+IDREG_FIELD_END(ID_AA64DFR0, PMUVER)
+
+IDREG_FIELD_START(ID_AA64DFR0, BRPS,       12,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(ID_AA64DFR0, BRPS)
+
+IDREG_FIELD_START(ID_AA64DFR0, PMSS,       16,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64DFR0, PMSS)
+
+IDREG_FIELD_START(ID_AA64DFR0, WRPS,       20,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(ID_AA64DFR0, WRPS)
+
+IDREG_FIELD_START(ID_AA64DFR0, SEBEP,      24,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64DFR0, SEBEP)
+
+IDREG_FIELD_START(ID_AA64DFR0, CTX_CMPS,   28,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(ID_AA64DFR0, CTX_CMPS)
+
+IDREG_FIELD_START(ID_AA64DFR0, PMSVER,     32,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "v1p1")
+IDREG_FIELD_ARCH_VAL(0b0011, "v1p2")
+IDREG_FIELD_ARCH_VAL(0b0100, "v1p3")
+IDREG_FIELD_ARCH_VAL(0b0101, "v1p4")
+IDREG_FIELD_ARCH_VAL(0b0110, "v1p5")
+IDREG_FIELD_END(ID_AA64DFR0, PMSVER)
+
+IDREG_FIELD_START(ID_AA64DFR0, DOUBLELOCK, 36,  4, SIGNED_LOWER,  0b1111)
+IDREG_FIELD_ARCH_VAL(0b0000, "on")
+IDREG_FIELD_ARCH_VAL(0b1111, "off")
+IDREG_FIELD_END(ID_AA64DFR0, DOUBLELOCK)
+
+IDREG_FIELD_START(ID_AA64DFR0, TRACEFILT,  40,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64DFR0, TRACEFILT)
+
+IDREG_FIELD_START(ID_AA64DFR0, TRACEBUFFER,44,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "trbe_v1p1")
+IDREG_FIELD_END(ID_AA64DFR0, TRACEBUFFER)
+
+IDREG_FIELD_START(ID_AA64DFR0, MTPMU,      48,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "ni_impdef")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b1111, "off")
+IDREG_FIELD_END(ID_AA64DFR0, MTPMU)
+
+IDREG_FIELD_START(ID_AA64DFR0, BRBE,       52,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "brbe_v1p1")
+IDREG_FIELD_END(ID_AA64DFR0, BRBE)
+
+IDREG_FIELD_START(ID_AA64DFR0, EXTTRCBUFF, 56,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64DFR0, EXTTRCBUFF)
+
+IDREG_FIELD_START(ID_AA64DFR0, HPMN0,      60,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "unpredictable")
+IDREG_FIELD_ARCH_VAL(0b0001, "def")
+IDREG_FIELD_END(ID_AA64DFR0, HPMN0)
+
+IDREG_END(ID_AA64DFR0_EL1)
+
+/*  ID_AA64ZFR0_EL1  */
+IDREG_START(ID_AA64ZFR0_EL1)
+IDREG_FIELD_START(ID_AA64ZFR0, SVEVER,      0,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "on")
+IDREG_FIELD_ARCH_VAL(0b0001, "sve2")
+IDREG_FIELD_ARCH_VAL(0b0010, "sve2p1")
+IDREG_FIELD_ARCH_VAL(0b0011, "sve2p2")
+IDREG_FIELD_END(ID_AA64ZFR0, SVEVER)
+
+IDREG_FIELD_START(ID_AA64ZFR0, AES,         4,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "pmull128")
+IDREG_FIELD_ARCH_VAL(0b0011, "aes2")
+IDREG_FIELD_END(ID_AA64ZFR0, AES)
+
+IDREG_FIELD_START(ID_AA64ZFR0, RES0_8,      8,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64ZFR0, RES0_8)
+
+IDREG_FIELD_START(ID_AA64ZFR0, ELTPERM,    12,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ZFR0, ELTPERM)
+
+IDREG_FIELD_START(ID_AA64ZFR0, BITPERM,    16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ZFR0, BITPERM)
+
+IDREG_FIELD_START(ID_AA64ZFR0, BFLOAT16,   20,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "ebf16")
+IDREG_FIELD_END(ID_AA64ZFR0, BFLOAT16)
+
+IDREG_FIELD_START(ID_AA64ZFR0, B16B16,     24,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "bfscale")
+IDREG_FIELD_END(ID_AA64ZFR0, B16B16)
+
+IDREG_FIELD_START(ID_AA64ZFR0, RES0_28,    28,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64ZFR0, RES0_28)
+
+IDREG_FIELD_START(ID_AA64ZFR0, SHA3,       32,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ZFR0, SHA3)
+
+IDREG_FIELD_START(ID_AA64ZFR0, RES0_36,    36,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64ZFR0, RES0_36)
+
+IDREG_FIELD_START(ID_AA64ZFR0, SM4,        40,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ZFR0, SM4)
+
+IDREG_FIELD_START(ID_AA64ZFR0, I8MM,       44,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ZFR0, I8MM)
+
+IDREG_FIELD_START(ID_AA64ZFR0, F16MM,      48,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ZFR0, F16MM)
+
+IDREG_FIELD_START(ID_AA64ZFR0, F32MM,      52,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ZFR0, F32MM)
+
+IDREG_FIELD_START(ID_AA64ZFR0, F64MM,      56,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ZFR0, F64MM)
+
+IDREG_FIELD_START(ID_AA64ZFR0, RES0_60,    60,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64ZFR0, RES0_60)
+
+IDREG_END(ID_AA64ZFR0_EL1)
+
+/*  ID_AA64SMFR0_EL1  */
+IDREG_START(ID_AA64SMFR0_EL1)
+IDREG_FIELD_START(ID_AA64SMFR0, SMOP4,      0,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, SMOP4)
+
+IDREG_FIELD_START(ID_AA64SMFR0, RES0_1,     1, 15, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64SMFR0, RES0_1)
+
+IDREG_FIELD_START(ID_AA64SMFR0, STMOP,     16,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, STMOP)
+
+IDREG_FIELD_START(ID_AA64SMFR0, RES0_17,   17,  6, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64SMFR0, RES0_17)
+
+IDREG_FIELD_START(ID_AA64SMFR0, SFEXPA,    23,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, SFEXPA)
+
+IDREG_FIELD_START(ID_AA64SMFR0, AES,       24,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, AES)
+
+IDREG_FIELD_START(ID_AA64SMFR0, SBITPERM,  25,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, SBITPERM)
+
+IDREG_FIELD_START(ID_AA64SMFR0, RES0_26,   26,  2, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64SMFR0, RES0_26)
+
+IDREG_FIELD_START(ID_AA64SMFR0, SF8DP2,    28,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, SF8DP2)
+
+IDREG_FIELD_START(ID_AA64SMFR0, SF8DP4,    29,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, SF8DP4)
+
+IDREG_FIELD_START(ID_AA64SMFR0, SF8FMA,    30,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, SF8FMA)
+
+IDREG_FIELD_START(ID_AA64SMFR0, RES0_31,   31,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64SMFR0, RES0_31)
+
+IDREG_FIELD_START(ID_AA64SMFR0, F32F32,    32,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, F32F32)
+
+IDREG_FIELD_START(ID_AA64SMFR0, BI32I32,   33,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, BI32I32)
+
+IDREG_FIELD_START(ID_AA64SMFR0, B16F32,    34,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, B16F32)
+
+IDREG_FIELD_START(ID_AA64SMFR0, F16F32,    35,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, F16F32)
+
+IDREG_FIELD_START(ID_AA64SMFR0, I8I32,     36,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b1111, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, I8I32)
+
+IDREG_FIELD_START(ID_AA64SMFR0, F8F32,     40,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, F8F32)
+
+IDREG_FIELD_START(ID_AA64SMFR0, F8F16,     41,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, F8F16)
+
+IDREG_FIELD_START(ID_AA64SMFR0, F16F16,    42,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, F16F16)
+
+IDREG_FIELD_START(ID_AA64SMFR0, B16B16,    43,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, B16B16)
+
+IDREG_FIELD_START(ID_AA64SMFR0, I16I32,    44,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0101, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, I16I32)
+
+IDREG_FIELD_START(ID_AA64SMFR0, F64F64,    48,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, F64F64)
+
+IDREG_FIELD_START(ID_AA64SMFR0, RES0_49,   49,  3, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64SMFR0, RES0_49)
+
+IDREG_FIELD_START(ID_AA64SMFR0, I16I64,    52,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b1111, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, I16I64)
+
+IDREG_FIELD_START(ID_AA64SMFR0, SMEVER,    56,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "sme")
+IDREG_FIELD_ARCH_VAL(0b0001, "sme2")
+IDREG_FIELD_ARCH_VAL(0b0010, "sme2p1")
+IDREG_FIELD_ARCH_VAL(0b0011, "sme2p2")
+IDREG_FIELD_END(ID_AA64SMFR0, SMEVER)
+
+IDREG_FIELD_START(ID_AA64SMFR0, LUTV2,     60,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, LUTV2)
+
+IDREG_FIELD_START(ID_AA64SMFR0, RES0_61,   61,  2, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64SMFR0, RES0_61)
+
+IDREG_FIELD_START(ID_AA64SMFR0, FA64,      63,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64SMFR0, FA64)
+
+IDREG_END(ID_AA64SMFR0_EL1)
+
+/* CTR_EL0 */
+IDREG_START(CTR_EL0)
+IDREG_FIELD_START(CTR_EL0, IMINLINE,    0,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(CTR_EL0, IMINLINE)
+
+IDREG_FIELD_START(CTR_EL0, RES0_4,      4, 10, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(CTR_EL0, RES0_4)
+
+IDREG_FIELD_START(CTR_EL0, L1IP,       14,  2, EXACT,  0b10)
+IDREG_FIELD_ARCH_VAL(0b00, "reserved_vpipt")
+IDREG_FIELD_ARCH_VAL(0b01, "reserved_aivivt")
+IDREG_FIELD_ARCH_VAL(0b10, "vipt")
+IDREG_FIELD_ARCH_VAL(0b11, "pipt")
+IDREG_FIELD_END(CTR_EL0, L1IP)
+
+IDREG_FIELD_START(CTR_EL0, DMINLINE,   16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(CTR_EL0, DMINLINE)
+
+IDREG_FIELD_START(CTR_EL0, ERG,        20,  4, HIGHER_OR_ZERO,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(CTR_EL0, ERG)
+
+IDREG_FIELD_START(CTR_EL0, CWG,        24,  4, HIGHER_OR_ZERO,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(CTR_EL0, CWG)
+
+IDREG_FIELD_START(CTR_EL0, IDC,        28,  1, LOWER,  0b1)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(CTR_EL0, IDC)
+
+IDREG_FIELD_START(CTR_EL0, DIC,        29,  1, LOWER,  0b1)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(CTR_EL0, DIC)
+
+IDREG_FIELD_START(CTR_EL0, RES0_30,    30,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(CTR_EL0, RES0_30)
+
+IDREG_FIELD_START(CTR_EL0, RES1_31,    31,  1, EXACT,  1)
+IDREG_FIELD_ARCH_VAL(1, NULL)
+IDREG_FIELD_END(CTR_EL0, RES1_31)
+
+IDREG_FIELD_START(CTR_EL0, TMINLINE,   32,  6, EXACT,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(CTR_EL0, TMINLINE)
+
+IDREG_FIELD_START(CTR_EL0, RES0_38,    38, 26, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(CTR_EL0, RES0_38)
+
+IDREG_END(CTR_EL0)
+
+/* ID_AA64ISAR3_EL1 */
+IDREG_START(ID_AA64ISAR3_EL1)
+IDREG_FIELD_START(ID_AA64ISAR3, CPA,       0,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "cpa2")
+IDREG_FIELD_END(ID_AA64ISAR3, CPA)
+
+IDREG_FIELD_START(ID_AA64ISAR3, FAMINMAX,  4,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR3, FAMINMAX)
+
+IDREG_FIELD_START(ID_AA64ISAR3, TLBIW,     8,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR3, TLBIW)
+
+IDREG_FIELD_START(ID_AA64ISAR3, PACM,     12,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "trivial_imp")
+IDREG_FIELD_ARCH_VAL(0b0010, "full_imp")
+IDREG_FIELD_END(ID_AA64ISAR3, PACM)
+
+IDREG_FIELD_START(ID_AA64ISAR3, LSFE,     16,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR3, LSFE)
+
+IDREG_FIELD_START(ID_AA64ISAR3, OCCMO,    20,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR3, OCCMO)
+
+IDREG_FIELD_START(ID_AA64ISAR3, LSUI,     24,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR3, LSUI)
+
+IDREG_FIELD_START(ID_AA64ISAR3, FPRCVT,   28,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64ISAR3, FPRCVT)
+
+IDREG_FIELD_START(ID_AA64ISAR3, RES0_32,  32, 32, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64ISAR3, RES0_32)
+
+IDREG_END(ID_AA64ISAR3_EL1)
+
+/* ID_AA64PFR2_EL1 */
+IDREG_START(ID_AA64PFR2_EL1)
+IDREG_FIELD_START(ID_AA64PFR2, MTEPERM,       0,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR2, MTEPERM)
+
+IDREG_FIELD_START(ID_AA64PFR2, MTESTOREONLY,  4,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR2, MTESTOREONLY)
+
+IDREG_FIELD_START(ID_AA64PFR2, MTEFAR,        8,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR2, MTEFAR)
+
+IDREG_FIELD_START(ID_AA64PFR2, GCIE,         12,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR2, GCIE)
+
+IDREG_FIELD_START(ID_AA64PFR2, UINJ,         16,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR2, UINJ)
+
+IDREG_FIELD_START(ID_AA64PFR2, RES0_20,      20, 12, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64PFR2, RES0_20)
+
+IDREG_FIELD_START(ID_AA64PFR2, FPMR,         32,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64PFR2, FPMR)
+
+IDREG_FIELD_START(ID_AA64PFR2, RES0_36,      36, 28, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64PFR2, RES0_36)
+
+IDREG_END(ID_AA64PFR2_EL1)
+
+/*  ID_AA64FPFR0_EL1  */
+IDREG_START(ID_AA64FPFR0_EL1)
+IDREG_FIELD_START(ID_AA64FPFR0, F8E5M2,    0,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64FPFR0, F8E5M2)
+
+IDREG_FIELD_START(ID_AA64FPFR0, F8E4M3,    1,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64FPFR0, F8E4M3)
+
+IDREG_FIELD_START(ID_AA64FPFR0, RES0_2,    2, 24, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64FPFR0, RES0_2)
+
+IDREG_FIELD_START(ID_AA64FPFR0, F8MM4,    26,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64FPFR0, F8MM4)
+
+IDREG_FIELD_START(ID_AA64FPFR0, F8MM8,    27,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64FPFR0, F8MM8)
+
+IDREG_FIELD_START(ID_AA64FPFR0, F8DP2,    28,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64FPFR0, F8DP2)
+
+IDREG_FIELD_START(ID_AA64FPFR0, F8DP4,    29,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64FPFR0, F8DP4)
+
+IDREG_FIELD_START(ID_AA64FPFR0, F8FMA,    30,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64FPFR0, F8FMA)
+
+IDREG_FIELD_START(ID_AA64FPFR0, F8CVT,    31,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0, "off")
+IDREG_FIELD_ARCH_VAL(0b1, "on")
+IDREG_FIELD_END(ID_AA64FPFR0, F8CVT)
+
+IDREG_FIELD_START(ID_AA64FPFR0, RES0_32,  32, 32, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64FPFR0, RES0_32)
+
+IDREG_END(ID_AA64FPFR0_EL1)
+
+
+/*  ID_AA64MMFR4_EL1  */
+IDREG_START(ID_AA64MMFR4_EL1)
+IDREG_FIELD_START(ID_AA64MMFR4, POPS,      0,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR4, POPS)
+
+IDREG_FIELD_START(ID_AA64MMFR4, EIESB,     4,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "toel3")
+IDREG_FIELD_ARCH_VAL(0b0010, "toelx")
+IDREG_FIELD_ARCH_VAL(0b1111, "any")
+IDREG_FIELD_END(ID_AA64MMFR4, EIESB)
+
+IDREG_FIELD_START(ID_AA64MMFR4, ASID2,     8,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR4, ASID2)
+
+IDREG_FIELD_START(ID_AA64MMFR4, HACDBS,   12,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR4, HACDBS)
+
+IDREG_FIELD_START(ID_AA64MMFR4, FGWTE3,   16,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR4, FGWTE3)
+
+IDREG_FIELD_START(ID_AA64MMFR4, NV_FRAC,  20,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "nv_nv2")
+IDREG_FIELD_ARCH_VAL(0b0001, "nv2_only")
+IDREG_FIELD_ARCH_VAL(0b0010, "nv2p1")
+IDREG_FIELD_END(ID_AA64MMFR4, NV_FRAC)
+
+IDREG_FIELD_START(ID_AA64MMFR4, E2H0,     24,  4, SIGNED_LOWER,  0b1111)
+IDREG_FIELD_ARCH_VAL(0b0000, "on")
+IDREG_FIELD_ARCH_VAL(0b1110, "ni_nv1")
+IDREG_FIELD_ARCH_VAL(0b1111, "off")
+IDREG_FIELD_END(ID_AA64MMFR4, E2H0)
+
+IDREG_FIELD_START(ID_AA64MMFR4, RMEGDI,   28,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR4, RMEGDI)
+
+IDREG_FIELD_START(ID_AA64MMFR4, RES0_32,  32,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64MMFR4, RES0_32)
+
+IDREG_FIELD_START(ID_AA64MMFR4, E3DSE,    36,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR4, E3DSE)
+
+IDREG_FIELD_START(ID_AA64MMFR4, RES0_40,  40,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64MMFR4, RES0_40)
+
+IDREG_FIELD_START(ID_AA64MMFR4, SRMASK,   44,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64MMFR4, SRMASK)
+
+IDREG_FIELD_START(ID_AA64MMFR4, RES0_48,  48, 16, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_AA64MMFR4, RES0_48)
+
+IDREG_END(ID_AA64MMFR4_EL1)
+
+/*  ID_AA64DFR1_EL1  */
+IDREG_START(ID_AA64DFR1_EL1)
+IDREG_FIELD_START(ID_AA64DFR1, SYSPMUID,    0,  8, EXACT,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(ID_AA64DFR1, SYSPMUID)
+
+IDREG_FIELD_START(ID_AA64DFR1, BRPS,        8,  8, EXACT,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(ID_AA64DFR1, BRPS)
+
+IDREG_FIELD_START(ID_AA64DFR1, WRPS,       16,  8, EXACT,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(ID_AA64DFR1, WRPS)
+
+IDREG_FIELD_START(ID_AA64DFR1, CTX_CMPS,   24,  8, EXACT,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(ID_AA64DFR1, CTX_CMPS)
+
+IDREG_FIELD_START(ID_AA64DFR1, SPMU,       32,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_ARCH_VAL(0b0010, "imp_spmzr")
+IDREG_FIELD_END(ID_AA64DFR1, SPMU)
+
+IDREG_FIELD_START(ID_AA64DFR1, PMICNTR,    36,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64DFR1, PMICNTR)
+
+IDREG_FIELD_START(ID_AA64DFR1, ABLE,       40,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64DFR1, ABLE)
+
+IDREG_FIELD_START(ID_AA64DFR1, ITE,        44,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64DFR1, ITE)
+
+IDREG_FIELD_START(ID_AA64DFR1, EBEP,       48,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "on")
+IDREG_FIELD_END(ID_AA64DFR1, EBEP)
+
+IDREG_FIELD_START(ID_AA64DFR1, DPFZS,      52,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "ignr")
+IDREG_FIELD_ARCH_VAL(0b0001, "frzn")
+IDREG_FIELD_END(ID_AA64DFR1, DPFZS)
+
+IDREG_FIELD_START(ID_AA64DFR1, ABL_CMPS,   56,  8, EXACT,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(ID_AA64DFR1, ABL_CMPS)
+
+IDREG_END(ID_AA64DFR1_EL1)
+
+/*  MIDR_EL1  */
+IDREG_START(MIDR_EL1)
+IDREG_FIELD_START(MIDR, REVISION,       0,  4, ANY,  0)
+IDREG_FIELD_END(MIDR, REVISION)
+
+IDREG_FIELD_START(MIDR, PARTNUM,        4, 12, ANY,  0)
+IDREG_FIELD_END(MIDR, PARTNUM)
+
+IDREG_FIELD_START(MIDR, ARCHITECTURE,  16,  4, ANY,  0)
+IDREG_FIELD_END(MIDR, ARCHITECTURE)
+
+IDREG_FIELD_START(MIDR, VARIANT,       20,  4, ANY,  0)
+IDREG_FIELD_END(MIDR, VARIANT)
+
+IDREG_FIELD_START(MIDR, IMPLEMENTER,   24,  8, ANY,  0)
+IDREG_FIELD_END(MIDR, IMPLEMENTER)
+
+IDREG_FIELD_START(MIDR, RES0_32,       32, 32, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(MIDR, RES0_32)
+
+IDREG_END(MIDR_EL1)
+
+/* REVIDR_EL1  */
+IDREG_START(REVIDR_EL1)
+IDREG_FIELD_START(REVIDR, VAL,  0, 64, ANY,  0)
+IDREG_FIELD_END(REVIDR, VAL)
+
+IDREG_END(REVIDR_EL1)
+
+/* AIDR_EL1  */
+IDREG_START(AIDR_EL1)
+IDREG_FIELD_START(AIDR, VAL,  0, 64, ANY,  0)
+IDREG_FIELD_END(AIDR, VAL)
+
+IDREG_END(AIDR_EL1)
+
+/* DCZID_EL0 */
+IDREG_START(DCZID_EL0)
+IDREG_FIELD_START(DCZID_EL0, BS,       0,  4, EXACT,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(DCZID_EL0, BS)
+
+IDREG_FIELD_START(DCZID_EL0, DZP,      4,  1, EXACT,  0)
+IDREG_FIELD_ARCH_VAL_ANY
+IDREG_FIELD_END(DCZID_EL0, DZP)
+
+IDREG_FIELD_START(DCZID_EL0, RES0_5,   5, 59, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(DCZID_EL0, RES0_5)
+
+IDREG_END(DCZID_EL0)
+
+
+/*  ID_AA64AFR0_EL1  */
+IDREG_START(ID_AA64AFR0_EL1)
+IDREG_FIELD_START(ID_AA64AFR0, VAL,  0, 64, EXACT,  0)
+IDREG_FIELD_END(ID_AA64AFR0, VAL)
+
+IDREG_END(ID_AA64AFR0_EL1)
+
+/*  ID_AA64AFR1_EL1  */
+IDREG_START(ID_AA64AFR1_EL1)
+IDREG_FIELD_START(ID_AA64AFR1, VAL,  0, 64, EXACT,  0)
+IDREG_FIELD_END(ID_AA64AFR1, VAL)
+
+IDREG_END(ID_AA64AFR1_EL1)
+
+ /* AArch32 ID registers */
+
+/*  ID_PFR0_EL1  */
+IDREG_START(ID_PFR0_EL1)
+IDREG_FIELD_START(ID_PFR0, VAL,  0, 64, EXACT,  0)
+IDREG_FIELD_END(ID_PFR0, VAL)
+
+IDREG_END(ID_PFR0_EL1)
+
+/*  ID_PFR1_EL1  */
+IDREG_START(ID_PFR1_EL1)
+IDREG_FIELD_START(ID_PFR1, VAL_LO,    0, 28, EXACT,  0)
+IDREG_FIELD_END(ID_PFR1, VAL_LO)
+
+IDREG_FIELD_START(ID_PFR1, GIC,      28,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "gicv3")
+IDREG_FIELD_ARCH_VAL(0b0011, "gicv4p1")
+IDREG_FIELD_END(ID_PFR1, GIC)
+
+IDREG_FIELD_START(ID_PFR1, RES0_HI, 32, 32, EXACT,  0)
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_PFR1, RES0_HI)
+
+IDREG_END(ID_PFR1_EL1)
+
+/* ID_DFR0_EL1  */
+IDREG_START(ID_DFR0_EL1)
+IDREG_FIELD_START(ID_DFR0, VAL_LO,    0, 24, EXACT,  0 )
+IDREG_FIELD_END(ID_DFR0, VAL_LO)
+
+IDREG_FIELD_START(ID_DFR0, PMU,      24,  4, LOWER,  0 )
+IDREG_FIELD_END(ID_DFR0, PMU)
+
+IDREG_FIELD_START(ID_DFR0, VAL_HI,   28,  4, EXACT,  0 )
+IDREG_FIELD_END(ID_DFR0, VAL_HI)
+
+IDREG_FIELD_START(ID_DFR0, RES0_HI, 32, 32, EXACT,  0 )
+IDREG_FIELD_ARCH_VAL(0, NULL)
+IDREG_FIELD_END(ID_DFR0, RES0_HI)
+
+IDREG_END(ID_DFR0_EL1)
+
+/*  ID_AFR0_EL1  */
+IDREG_START(ID_AFR0_EL1)
+IDREG_FIELD_START(ID_AFR0, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_AFR0, VAL)
+
+IDREG_END(ID_AFR0_EL1)
+
+/* ID_MMFR0_EL1  */
+IDREG_START(ID_MMFR0_EL1)
+IDREG_FIELD_START(ID_MMFR0, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_MMFR0, VAL)
+
+IDREG_END(ID_MMFR0_EL1)
+
+/* ID_MMFR1_EL1  */
+IDREG_START(ID_MMFR1_EL1)
+IDREG_FIELD_START(ID_MMFR1, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_MMFR1, VAL)
+
+IDREG_END(ID_MMFR1_EL1)
+
+/* ID_MMFR2_EL1 */
+IDREG_START(ID_MMFR2_EL1)
+IDREG_FIELD_START(ID_MMFR2, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_MMFR2, VAL)
+
+IDREG_END(ID_MMFR2_EL1)
+
+/* ID_MMFR3_EL1  */
+IDREG_START(ID_MMFR3_EL1)
+IDREG_FIELD_START(ID_MMFR3, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_MMFR3, VAL)
+
+IDREG_END(ID_MMFR3_EL1)
+
+/*  ID_MMFR4_EL1  */
+IDREG_START(ID_MMFR4_EL1)
+IDREG_FIELD_START(ID_MMFR4, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_MMFR4, VAL)
+
+IDREG_END(ID_MMFR4_EL1)
+
+/* ID_MMFR5_EL1  */
+IDREG_START(ID_MMFR5_EL1)
+IDREG_FIELD_START(ID_MMFR5, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_MMFR5, VAL)
+
+IDREG_END(ID_MMFR5_EL1)
+
+/* ID_ISAR0_EL1  */
+IDREG_START(ID_ISAR0_EL1)
+IDREG_FIELD_START(ID_ISAR0, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_ISAR0, VAL)
+
+IDREG_END(ID_ISAR0_EL1)
+
+/*  ID_ISAR1_EL1  */
+IDREG_START(ID_ISAR1_EL1)
+IDREG_FIELD_START(ID_ISAR1, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_ISAR1, VAL)
+
+IDREG_END(ID_ISAR1_EL1)
+
+/*  ID_ISAR2_EL1  */
+IDREG_START(ID_ISAR2_EL1)
+IDREG_FIELD_START(ID_ISAR2, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_ISAR2, VAL)
+
+IDREG_END(ID_ISAR2_EL1)
+
+/*  ID_ISAR3_EL1  */
+IDREG_START(ID_ISAR3_EL1)
+IDREG_FIELD_START(ID_ISAR3, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_ISAR3, VAL)
+
+IDREG_END(ID_ISAR3_EL1)
+
+/*  ID_ISAR4_EL1  */
+IDREG_START(ID_ISAR4_EL1)
+IDREG_FIELD_START(ID_ISAR4, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_ISAR4, VAL)
+
+IDREG_END(ID_ISAR4_EL1)
+
+/* ID_ISAR5_EL1  */
+IDREG_START(ID_ISAR5_EL1)
+IDREG_FIELD_START(ID_ISAR5, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_ISAR5, VAL)
+
+IDREG_END(ID_ISAR5_EL1)
+
+/*  ID_ISAR6_EL1  */
+IDREG_START(ID_ISAR6_EL1)
+IDREG_FIELD_START(ID_ISAR6, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_ISAR6, VAL)
+
+IDREG_END(ID_ISAR6_EL1)
+
+/*  ID_PFR2_EL1  */
+IDREG_START(ID_PFR2_EL1)
+IDREG_FIELD_START(ID_PFR2, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_PFR2, VAL)
+
+IDREG_END(ID_PFR2_EL1)
+
+/*  ID_DFR1_EL1 */
+IDREG_START(ID_DFR1_EL1)
+IDREG_FIELD_START(ID_DFR1, VAL,  0, 64, EXACT,  0 )
+IDREG_FIELD_END(ID_DFR1, VAL)
+
+IDREG_END(ID_DFR1_EL1)
+
+/*  MVFR0_EL1  */
+IDREG_START(MVFR0_EL1)
+IDREG_FIELD_START(MVFR0, VAL,  0, 64, EXACT,  0)
+IDREG_FIELD_END(MVFR0, VAL)
+
+IDREG_END(MVFR0_EL1)
+
+/*  MVFR1_EL1  */
+IDREG_START(MVFR1_EL1)
+IDREG_FIELD_START(MVFR1, VAL,  0, 64, EXACT,  0 )

target/arm/cpu-idregs.h.inc line 1724

Quoted 10 lines
target/arm/cpu-idregs.h.inc new file +10 -0
+IDREG_FIELD_END(MVFR1, VAL)
+
+IDREG_END(MVFR1_EL1)
+
+/* MVFR2_EL1  */
+IDREG_START(MVFR2_EL1)
+IDREG_FIELD_START(MVFR2, VAL,  0, 64, EXACT,  0)
+IDREG_FIELD_END(MVFR2, VAL)
+
+IDREG_END(MVFR2_EL1)

I don't see CLIDR_EL1 for instance while some fields are writable.

As a record here is the list of writable fields I can collect on a Grace-Hopper machine.

(QEMU) query-cpu-model-expansion type=full model={"name":"host"} {"return": {"model": {"name": "host", "props":
{"SYSREG_ID_AA64PFR0_EL1_EL3": 1, "SYSREG_ID_AA64ISAR2_EL1_CLRBHB": 0, "SYSREG_CTR_EL0_L1Ip": 3, "SYSREG_MIDR_EL1_PartNum": 3407, "SYSREG_CTR_EL0_DminLine": 4, "SYSREG_ID_AA64MMFR0_EL1_PARange": 5, "SYSREG_ID_AA64MMFR1_EL1_ECBHB": 0, "SYSREG_ID_AA64MMFR2_EL1_CnP": 1, "SYSREG_ID_AA64PFR1_EL1_DF2": 0, "SYSREG_ID_AA64PFR0_EL1_DIT": 1, "SYSREG_ID_AA64MMFR1_EL1_HAFDBS": 2, "SYSREG_ID_AA64ISAR0_EL1_FHM": 1, "SYSREG_ID_AA64ISAR2_EL1_CSSC": 0, "SYSREG_ID_AA64ISAR0_EL1_DP": 1, "sve768": false, "sve128": true, "SYSREG_ID_AA64FPFR0_EL1_F8E4M3": 0, "SYSREG_ID_AA64MMFR3_EL1_TCRX": 0, "SYSREG_ID_AA64ISAR2_EL1_SYSINSTR_128": 0, "SYSREG_ID_AA64MMFR1_EL1_AFP": 0, "SYSREG_CLIDR_EL1_ICB": 0, "SYSREG_CLIDR_EL1_LoC": 0, "SYSREG_ID_AA64MMFR0_EL1_TGran64": 0, "sve1024": false, "SYSREG_ID_AA64ISAR1_EL1_DPB": 2, "SYSREG_ID_AA64MMFR0_EL1_SNSMem": 1, "sve1280": false, "SYSREG_ID_AA64MMFR2_EL1_IESB": 1, "SYSREG_ID_AA64ISAR3_EL1_FAMINMAX":
0, "SYSREG_ID_AA64ZFR0_EL1_EltPerm": 0, "SYSREG_ID_AA64ISAR2_EL1_PRFMSLC": 0, "SYSREG_ID_AA64ZFR0_EL1_F32MM": 0, "SYSREG_ID_AA64ZFR0_EL1_F64MM": 0, "SYSREG_ID_AA64ISAR2_EL1_RPRFM": 0, "SYSREG_ID_AA64ISAR2_EL1_RPRES": 0, "SYSREG_ID_AA64ISAR0_EL1_SM4": 1, "SYSREG_ID_AA64ISAR0_EL1_SM3": 1, "SYSREG_ID_AA64PFR2_EL1_MTESTOREONLY":
0, "sve896": false, "sve256": false, "SYSREG_ID_AA64DFR0_EL1_WRPs": 3, "SYSREG_ID_AA64PFR2_EL1_MTEFAR": 0, "SYSREG_ID_AA64MMFR1_EL1_SpecSEI":
0, "SYSREG_ID_AA64ISAR2_EL1_LUT": 0, "SYSREG_ID_AA64MMFR0_EL1_TGran64_2": 2, "SYSREG_ID_AA64ISAR2_EL1_SYSREG_128": 0, "SYSREG_ID_AA64MMFR2_EL1_VARange": 0, "SYSREG_ID_AA64PFR0_EL1_EL2": 1, "sve1536": false, "SYSREG_ID_AA64ISAR2_EL1_WFxT": 0, "SYSREG_ID_AA64ISAR1_EL1_XS": 0, "sve1792": false, "SYSREG_ID_AA64MMFR0_EL1_ExS": 0, "SYSREG_ID_AA64ISAR1_EL1_LRCPC": 2, "SYSREG_ID_AA64MMFR2_EL1_LSM": 0, "SYSREG_ID_AA64PFR0_EL1_GIC": 1, "SYSREG_CLIDR_EL1_LoUIS": 0, "SYSREG_CTR_EL0_IminLine": 4, "SYSREG_MIDR_EL1_Implementer": 65, "SYSREG_ID_AA64MMFR0_EL1_BigEnd": 1, "sve384": false, "SYSREG_ID_AA64ISAR2_EL1_MOPS": 0, "SYSREG_ID_AA64ISAR2_EL1_ATS1A": 0, "SYSREG_CLIDR_EL1_LoUU": 0, "SYSREG_ID_AA64MMFR1_EL1_CMOW": 0, "SYSREG_ID_AA64ZFR0_EL1_BF16": 1, "SYSREG_CTR_EL0_IDC": 1, "SYSREG_ID_AA64MMFR2_EL1_ST": 1, "sve": true, "SYSREG_ID_AA64ISAR0_EL1_CRC32": 1, "SYSREG_ID_AA64ISAR1_EL1_FRINTTS":
1, "sve2048": false, "SYSREG_ID_AA64ISAR0_EL1_TS": 2, "SYSREG_ID_AA64MMFR0_EL1_BigEndEL0": 0, "SYSREG_ID_AA64MMFR0_EL1_TGran4_2": 2, "SYSREG_ID_AA64MMFR1_EL1_HCX": 0, "SYSREG_ID_AA64ZFR0_EL1_AES": 2, "SYSREG_ID_AA64PFR1_EL1_BT": 1, "SYSREG_ID_AA64MMFR1_EL1_HPDS": 2, "SYSREG_ID_AA64MMFR1_EL1_LO": 1, "SYSREG_ID_AA64MMFR1_EL1_nTLBPA": 0, "SYSREG_ID_AA64ISAR1_EL1_SPECRES":
1, "pauth": true, "SYSREG_ID_AA64ZFR0_EL1_F16MM": 0, "SYSREG_MIDR_EL1_Variant": 0, "kvm-no-adjvtime": false, "SYSREG_ID_AA64PFR0_EL1_RME": 0, "SYSREG_ID_AA64DFR0_EL1_DoubleLock":
15, "SYSREG_CTR_EL0_DIC": 1, "sve512": false, "SYSREG_ID_AA64MMFR2_EL1_BBM": 2, "SYSREG_ID_AA64MMFR1_EL1_ETS": 0, "SYSREG_ID_AA64ZFR0_EL1_BitPerm": 1, "SYSREG_ID_AA64PFR0_EL1_CSV3": 1, "SYSREG_ID_AA64PFR0_EL1_CSV2": 1, "SYSREG_ID_AA64MMFR3_EL1_S1PIE": 0, "SYSREG_ID_AA64MMFR3_EL1_S1POE": 0, "SYSREG_ID_AA64ISAR1_EL1_SB": 1, "SYSREG_ID_AA64PFR0_EL1_EL1": 1, "SYSREG_ID_AA64ISAR1_EL1_JSCVT": 1, "aarch64": true, "SYSREG_ID_AA64ZFR0_EL1_B16B16": 0, "pmu": true, "sve1920": false, "sve1152": false, "kvm-steal-time": true, "SYSREG_ID_AA64ZFR0_EL1_SVEver": 1, "SYSREG_ID_AA64FPFR0_EL1_F8E5M2": 0, "SYSREG_ID_AA64MMFR2_EL1_AT": 1, "SYSREG_ID_AA64PFR0_EL1_RAS": 2, "SYSREG_ID_AA64FPFR0_EL1_F8DP4": 0, "SYSREG_ID_AA64FPFR0_EL1_F8DP2": 0, "SYSREG_ID_AA64FPFR0_EL1_F8FMA": 0, "SYSREG_ID_AA64FPFR0_EL1_F8MM8": 0, "SYSREG_ID_AA64FPFR0_EL1_F8CVT": 0, "SYSREG_ID_AA64FPFR0_EL1_F8MM4": 0, "SYSREG_ID_AA64ISAR1_EL1_FCMA": 1, "SYSREG_ID_AA64MMFR2_EL1_TTL": 1, "SYSREG_ID_AA64PFR1_EL1_RAS_frac": 0, "SYSREG_ID_AA64ISAR2_EL1_BC": 0, "SYSREG_ID_AA64MMFR0_EL1_TGran4": 0, "SYSREG_ID_AA64ISAR2_EL1_PAC_frac":
0, "sve640": false, "SYSREG_ID_AA64ISAR0_EL1_TLB": 2, "SYSREG_ID_AA64ZFR0_EL1_I8MM": 1, "SYSREG_ID_AA64ISAR1_EL1_I8MM": 1, "SYSREG_ID_AA64PFR2_EL1_FPMR": 0, "SYSREG_ID_AA64ISAR0_EL1_RNDR": 0, "SYSREG_ID_AA64PFR0_EL1_SEL2": 1, "SYSREG_ID_AA64DFR0_EL1_PMUVer": 6, "SYSREG_ID_AA64MMFR4_EL1_NV_frac": 0, "SYSREG_ID_AA64MMFR0_EL1_TGran16":
1, "SYSREG_MIDR_EL1_Revision": 0, "sve1408": false, "SYSREG_ID_AA64MMFR1_EL1_PAN": 3, "SYSREG_ID_AA64MMFR3_EL1_SCTLRX": 0, "sve1664": false, "SYSREG_ID_AA64ISAR0_EL1_RDM": 1, "SYSREG_ID_AA64PFR1_EL1_SSBS": 2, "SYSREG_MIDR_EL1_Architecture": 15, "SYSREG_ID_AA64ISAR2_EL1_PCDPHINT": 0, "SYSREG_CLIDR_EL1_Ctype5": 0, "SYSREG_CLIDR_EL1_Ctype7": 0, "SYSREG_ID_AA64ZFR0_EL1_SHA3": 1, "SYSREG_CLIDR_EL1_Ctype6": 0, "SYSREG_CLIDR_EL1_Ctype3": 0, "SYSREG_CLIDR_EL1_Ctype4": 0, "SYSREG_CLIDR_EL1_Ctype2": 0, "SYSREG_CLIDR_EL1_Ctype1": 0, "SYSREG_CLIDR_EL1_Ttype4": 0, "SYSREG_CLIDR_EL1_Ttype7": 0, "SYSREG_CLIDR_EL1_Ttype6": 0, "SYSREG_CLIDR_EL1_Ttype5": 0, "SYSREG_CLIDR_EL1_Ttype3": 0, "SYSREG_CLIDR_EL1_Ttype2": 0, "SYSREG_CLIDR_EL1_Ttype1": 0, "SYSREG_ID_AA64MMFR1_EL1_TWED": 0, "SYSREG_ID_AA64DFR0_EL1_DebugVer": 9, "SYSREG_ID_AA64MMFR1_EL1_TIDCP1": 0, "SYSREG_ID_AA64MMFR0_EL1_FGT": 0, "SYSREG_ID_AA64ISAR0_EL1_SHA3": 1, "SYSREG_ID_AA64ISAR0_EL1_SHA2": 2, "SYSREG_ID_AA64ISAR0_EL1_SHA1": 1, "SYSREG_ID_AA64MMFR2_EL1_UAO": 1, "SYSREG_ID_AA64ISAR0_EL1_Atomic": 2, "SYSREG_ID_AA64ZFR0_EL1_SM4": 1, "SYSREG_ID_AA64MMFR0_EL1_ECV": 0, "SYSREG_ID_AA64ISAR3_EL1_FPRCVT": 0, "SYSREG_ID_AA64MMFR2_EL1_E0PD": 1, "SYSREG_ID_AA64PFR0_EL1_EL0": 1, "SYSREG_ID_AA64ISAR1_EL1_BF16": 1, "SYSREG_ID_AA64MMFR0_EL1_TGran16_2":
2, "SYSREG_ID_AA64ISAR1_EL1_LS64": 0, "SYSREG_ID_AA64ISAR3_EL1_LSFE": 0, "SYSREG_ID_AA64ISAR0_EL1_AES": 2, "SYSREG_ID_AA64ISAR1_EL1_DGH": 1, "SYSREG_ID_AA64PFR1_EL1_CSV2_frac": 0}}}}

Eric

#8 lore raw

Re: [RFC PATCH v1 02/13] target/arm: named_cpu_model: Add ID Register Fields

On 15 May 2026, at 8:55 PM, Eric Auger <[email protected]> wrote:

I don't see CLIDR_EL1 for instance while some fields are writable.

As a record here is the list of writable fields I can collect on a Grace-Hopper machine.

Yes, CLIDR_EL1 is missing is known. Will be added in v2, with proper handling for CCSIDR_EL1.

Warm Regards,
Khushit

#9 lore raw

Re: [RFC PATCH v1 02/13] target/arm: named_cpu_model: Add ID Register Fields

In reply to Eric Auger
Quoted 5 lines · Eric Auger

I don't see CLIDR_EL1 for instance while some fields are writable.

Yes, CLIDR_EL1 is missing is known. Will be added in v2, along with proper handling for CCSIDR_EL1.

Warm Regards,
Khushit

#10 lore raw

RFC PATCH 3/13 target/arm: named_cpu_model: initialise additional sysregs

In reply to Shaju Abraham

Add entries for sysregs MIDR_EL1, REVIDR_EL1, AIDR_EL1, ID_AA64PFR0_EL1, and ID_AA64ISAR3_EL1 to cpu-sysregs.h.inc.

---
 target/arm/cpu-sysregs.h.inc | 5 +++++
 1 file changed, 5 insertions(+)
target/arm/cpu-sysregs.h.inc +5 -0
index 3d1ed40f04..82a83d9d5c 100644
@@ -41,3 +41,8 @@ DEF(CLIDR_EL1, 3, 1, 0, 0, 1)
 DEF(ID_AA64ZFR0_EL1, 3, 0, 0, 4, 4)
 DEF(CTR_EL0, 3, 3, 0, 0, 1)
 DEF(DCZID_EL0, 3, 3, 0, 0, 7)
+DEF(MIDR_EL1, 3, 0, 0, 0, 0)
+DEF(REVIDR_EL1, 3, 0, 0, 0, 6)
+DEF(AIDR_EL1, 3, 1, 0, 0, 7)
+DEF(ID_AA64FPFR0_EL1, 3, 0, 0, 4, 7)
+DEF(ID_AA64ISAR3_EL1, 3, 0, 0, 6, 3)
Signature · 1 line
2.52.0
#11 lore raw

Re: [RFC PATCH v1 03/13] target/arm: named_cpu_model: initialise additional sysregs

Quoted 2 lines · Shaju Abraham

Add entries for sysregs MIDR_EL1, REVIDR_EL1, AIDR_EL1, ID_AA64PFR0_EL1, and ID_AA64ISAR3_EL1 to cpu-sysregs.h.inc.

Can't you reuse
[PATCH v4 03/17] target/arm/cpu-sysregs.h.inc: Update with automatic generation

and associated python script to automate this. I think it contains all the additions you bring here + some others.
for
Eric

Quoted 20 lines
---
 target/arm/cpu-sysregs.h.inc | 5 +++++
 1 file changed, 5 insertions(+)
target/arm/cpu-sysregs.h.inc +5 -0
index 3d1ed40f04..82a83d9d5c 100644
@@ -41,3 +41,8 @@ DEF(CLIDR_EL1, 3, 1, 0, 0, 1)
 DEF(ID_AA64ZFR0_EL1, 3, 0, 0, 4, 4)
 DEF(CTR_EL0, 3, 3, 0, 0, 1)
 DEF(DCZID_EL0, 3, 3, 0, 0, 7)
+DEF(MIDR_EL1, 3, 0, 0, 0, 0)
+DEF(REVIDR_EL1, 3, 0, 0, 0, 6)
+DEF(AIDR_EL1, 3, 1, 0, 0, 7)
+DEF(ID_AA64FPFR0_EL1, 3, 0, 0, 4, 7)
+DEF(ID_AA64ISAR3_EL1, 3, 0, 0, 6, 3)
#12 lore raw

RFC PATCH 4/13 target/arm: named_cpu_model: generate tables for Arm64 ID registers and fields

In reply to Shaju Abraham

Include cpu-idregs.h.inc multiple times with different definitions for the X-macros. This will generate tables for all Arm64 ID registers and their fields. Additionally, initialize the tables with all architecturally defined values. These tables will be consumed by the property layer in future patches.

---
 target/arm/cpu-idregs.c | 124 ++++++++++++++++++++++++++++++++++++++++
 target/arm/cpu-idregs.h |  81 ++++++++++++++++++++++++++
 target/arm/meson.build  |   1 +
 3 files changed, 206 insertions(+)
 create mode 100644 target/arm/cpu-idregs.c
target/arm/cpu-idregs.c new file +124 -0
new file mode 100644
index 0000000000..8fced7d8d7
@@ -0,0 +1,124 @@
+/*
+ *   ARM ID register field table.
+ *
+ *   Builds the per-id-register field descriptor arrays and the global
+ *   arm_idregs[] table.
+ *
+ *  SPDX-License-Identifier: GPL-2.0-or-later
+ */
+#include "qemu/osdep.h"
+#include "qemu/error-report.h"
+#include "qapi/error.h"
+#include "cpu.h"
+#include "cpu-idregs.h"
+
+/* generate an array of architecturely defined values for bitfields
+ * in arch-value format*/
+#define IDREG_START(reg)
+#define IDREG_END(reg)
+#define IDREG_FIELD_START(reg, field, shift, length, safe, defval) \
+    static const ArmIdRegArchVal reg##_##field##_arch_vals[] = {
+#define IDREG_FIELD_ARCH_VAL(v, n) { (v), (n) },
+#define IDREG_FIELD_ARCH_VAL_ANY   { 0xffffffffUL, NULL },
+#define IDREG_FIELD_END(reg, field) \
+    };
+#include "cpu-idregs.h.inc"
+#undef IDREG_START
+#undef IDREG_END
+#undef IDREG_FIELD_START
+#undef IDREG_FIELD_ARCH_VAL
+#undef IDREG_FIELD_ARCH_VAL_ANY
+#undef IDREG_FIELD_END
+/* generate an array of per-register ArmIdRegField[] descriptors */
+#define IDREG_FIELD_ARCH_VAL(v, n)
+#define IDREG_FIELD_ARCH_VAL_ANY
+#define IDREG_FIELD_END(reg, field)
+#define IDREG_START(reg) \
+    static ArmIdRegField reg##_fields[] = {
+
+#define IDREG_END(reg) \
+    };
+
+#define IDREG_FIELD_START(reg, field, _shift, _length, safe, defval) \
+    { \
+        .name = #field, \
+        .shift = (_shift), \
+        .length = (_length), \
+        .safe_rule = IDREG_SAFE_##safe, \
+        .default_val = (defval), \
+        .arch_vals = (ArmIdRegArchVal *)reg##_##field##_arch_vals, \
+        .arch_vals_count = ARRAY_SIZE(reg##_##field##_arch_vals), \
+    },
+#include "cpu-idregs.h.inc"
+#undef IDREG_START
+#undef IDREG_END
+#undef IDREG_FIELD_START
+#undef IDREG_FIELD_ARCH_VAL
+#undef IDREG_FIELD_END
+
+/* generate an array of top level ID registers */
+#define IDREG_END(reg)
+#define IDREG_FIELD_START(reg, field, shift, length, safe, defval)
+#define IDREG_FIELD_ARCH_VAL(v, n)
+#define IDREG_FIELD_ARCH_VAL_ANY
+#define IDREG_FIELD_END(reg, field)
+
+#define IDREG_START(reg) \
+    [reg##_IDX] = { \
+        .name = #reg, \
+        .fields = reg##_fields, \
+        .fields_count = ARRAY_SIZE(reg##_fields), \
+    },
+
+ArmIdReg arm_idregs[NUM_ID_IDX] = {
+#include "cpu-idregs.h.inc"
+};
+#undef IDREG_START
+#undef IDREG_END
+#undef IDREG_FIELD_START
+#undef IDREG_FIELD_ARCH_VAL
+#undef IDREG_FIELD_END
+
+
+/* Per-register field position enums (0..N-1 inside each register). */
+#define IDREG_START(reg) enum {
+#define IDREG_END(reg)   reg##_FIELD_POS__MAX };
+#define IDREG_FIELD_START(reg, field, shift, length, safe, defval) \
+    reg##_FIELD_POS_##field,
+#define IDREG_FIELD_ARCH_VAL(v, n)
+#define IDREG_FIELD_ARCH_VAL_ANY
+#define IDREG_FIELD_END(reg, field)
+
+#include "cpu-idregs.h.inc"
+
+#undef IDREG_FIELD_END
+#undef IDREG_FIELD_ARCH_VAL_ANY
+#undef IDREG_FIELD_ARCH_VAL
+#undef IDREG_FIELD_START
+#undef IDREG_END
+#undef IDREG_START
+
+/* Flat ArmFieldIdx -> {reg, field slot, shift, length}. */
+#define IDREG_START(reg)
+#define IDREG_END(reg)
+#define IDREG_FIELD_START(reg, field, _shift, _length, safe, defval) \
+    [ARM_FIELD_##reg##_##field] = {                                \
+        .reg_idx = reg##_IDX,                                  \
+        .field_idx = reg##_FIELD_POS_##field,                      \
+        .shift = (_shift),                                          \
+        .length = (_length),                                        \
+    },
+#define IDREG_FIELD_ARCH_VAL(v, n)
+#define IDREG_FIELD_ARCH_VAL_ANY
+#define IDREG_FIELD_END(reg, field)
+
+const ArmIdRegFieldLoc arm_field_locs[ARM_FIELD__MAX] = {
+#include "cpu-idregs.h.inc"
+};
+
+#undef IDREG_FIELD_END
+#undef IDREG_FIELD_ARCH_VAL_ANY
+#undef IDREG_FIELD_ARCH_VAL
+#undef IDREG_FIELD_START
+#undef IDREG_END
+#undef IDREG_START
target/arm/cpu-idregs.h +81 -0

92 lines not on this page · raw message

target/arm/meson.build +1 -0
index 4723f9f170..64d1ec63ab 100644
@@ -19,6 +19,7 @@ arm_common_ss.add(files(
 
 arm_common_system_ss.add(files(
   'arm-qmp-cmds.c',
+  'cpu-idregs.c',
 ))
 arm_system_ss.add(when: 'CONFIG_KVM', if_true: files('hyp_gdbstub.c', 'kvm.c'))
 arm_system_ss.add(when: 'CONFIG_HVF', if_true: files('hyp_gdbstub.c'))
Signature · 1 line
2.52.0
#13 lore raw

RFC PATCH 5/13 target/arm: named_cpu_model: replace FIELD macro with IDREG_FIELD

In reply to Shaju Abraham

Replace the existing FIELD() macro with the newly introduced IDREG_FIELD() macro to remove deduplication. All definitions for TCG remains the same.

---
 target/arm/cpu-features.h | 232 +++-----------------------------------
 1 file changed, 18 insertions(+), 214 deletions(-)
target/arm/cpu-features.h +18 -214
index 4e44245a8b..782850ccec 100644
@@ -50,14 +50,6 @@ FIELD(CCSIDR_EL1, LINESIZE, 0, 3)
 FIELD(CCSIDR_EL1, ASSOCIATIVITY, 3, 10)
 FIELD(CCSIDR_EL1, NUMSETS, 13, 15)
 
-FIELD(CTR_EL0,  IMINLINE, 0, 4)
-FIELD(CTR_EL0,  L1IP, 14, 2)
-FIELD(CTR_EL0,  DMINLINE, 16, 4)
-FIELD(CTR_EL0,  ERG, 20, 4)
-FIELD(CTR_EL0,  CWG, 24, 4)
-FIELD(CTR_EL0,  IDC, 28, 1)
-FIELD(CTR_EL0,  DIC, 29, 1)
-FIELD(CTR_EL0,  TMINLINE, 32, 6)
 
 FIELD(MIDR_EL1, REVISION, 0, 4)
 FIELD(MIDR_EL1, PARTNUM, 4, 12)
@@ -189,217 +181,29 @@ FIELD(ID_PFR1, VIRTUALIZATION, 12, 4)
 FIELD(ID_PFR1, GENTIMER, 16, 4)
 FIELD(ID_PFR1, SEC_FRAC, 20, 4)
 FIELD(ID_PFR1, VIRT_FRAC, 24, 4)
-FIELD(ID_PFR1, GIC, 28, 4)
 
 FIELD(ID_PFR2, CSV3, 0, 4)
 FIELD(ID_PFR2, SSBS, 4, 4)
 FIELD(ID_PFR2, RAS_FRAC, 8, 4)
 
-FIELD(ID_AA64ISAR0, AES, 4, 4)
-FIELD(ID_AA64ISAR0, SHA1, 8, 4)
-FIELD(ID_AA64ISAR0, SHA2, 12, 4)
-FIELD(ID_AA64ISAR0, CRC32, 16, 4)
-FIELD(ID_AA64ISAR0, ATOMIC, 20, 4)
-FIELD(ID_AA64ISAR0, TME, 24, 4)
-FIELD(ID_AA64ISAR0, RDM, 28, 4)
-FIELD(ID_AA64ISAR0, SHA3, 32, 4)
-FIELD(ID_AA64ISAR0, SM3, 36, 4)
-FIELD(ID_AA64ISAR0, SM4, 40, 4)
-FIELD(ID_AA64ISAR0, DP, 44, 4)
-FIELD(ID_AA64ISAR0, FHM, 48, 4)
-FIELD(ID_AA64ISAR0, TS, 52, 4)
-FIELD(ID_AA64ISAR0, TLB, 56, 4)
-FIELD(ID_AA64ISAR0, RNDR, 60, 4)
-
-FIELD(ID_AA64ISAR1, DPB, 0, 4)
-FIELD(ID_AA64ISAR1, APA, 4, 4)
-FIELD(ID_AA64ISAR1, API, 8, 4)
-FIELD(ID_AA64ISAR1, JSCVT, 12, 4)
-FIELD(ID_AA64ISAR1, FCMA, 16, 4)
-FIELD(ID_AA64ISAR1, LRCPC, 20, 4)
-FIELD(ID_AA64ISAR1, GPA, 24, 4)
-FIELD(ID_AA64ISAR1, GPI, 28, 4)
-FIELD(ID_AA64ISAR1, FRINTTS, 32, 4)
-FIELD(ID_AA64ISAR1, SB, 36, 4)
-FIELD(ID_AA64ISAR1, SPECRES, 40, 4)
-FIELD(ID_AA64ISAR1, BF16, 44, 4)
-FIELD(ID_AA64ISAR1, DGH, 48, 4)
-FIELD(ID_AA64ISAR1, I8MM, 52, 4)
-FIELD(ID_AA64ISAR1, XS, 56, 4)
-FIELD(ID_AA64ISAR1, LS64, 60, 4)
-
-FIELD(ID_AA64ISAR2, WFXT, 0, 4)
-FIELD(ID_AA64ISAR2, RPRES, 4, 4)
-FIELD(ID_AA64ISAR2, GPA3, 8, 4)
-FIELD(ID_AA64ISAR2, APA3, 12, 4)
-FIELD(ID_AA64ISAR2, MOPS, 16, 4)
-FIELD(ID_AA64ISAR2, BC, 20, 4)
-FIELD(ID_AA64ISAR2, PAC_FRAC, 24, 4)
-FIELD(ID_AA64ISAR2, CLRBHB, 28, 4)
-FIELD(ID_AA64ISAR2, SYSREG_128, 32, 4)
-FIELD(ID_AA64ISAR2, SYSINSTR_128, 36, 4)
-FIELD(ID_AA64ISAR2, PRFMSLC, 40, 4)
-FIELD(ID_AA64ISAR2, RPRFM, 48, 4)
-FIELD(ID_AA64ISAR2, CSSC, 52, 4)
-FIELD(ID_AA64ISAR2, LUT, 56, 4)
-FIELD(ID_AA64ISAR2, ATS1A, 60, 4)
-
-FIELD(ID_AA64PFR0, EL0, 0, 4)
-FIELD(ID_AA64PFR0, EL1, 4, 4)
-FIELD(ID_AA64PFR0, EL2, 8, 4)
-FIELD(ID_AA64PFR0, EL3, 12, 4)
-FIELD(ID_AA64PFR0, FP, 16, 4)
-FIELD(ID_AA64PFR0, ADVSIMD, 20, 4)
-FIELD(ID_AA64PFR0, GIC, 24, 4)
-FIELD(ID_AA64PFR0, RAS, 28, 4)
-FIELD(ID_AA64PFR0, SVE, 32, 4)
-FIELD(ID_AA64PFR0, SEL2, 36, 4)
-FIELD(ID_AA64PFR0, MPAM, 40, 4)
-FIELD(ID_AA64PFR0, AMU, 44, 4)
-FIELD(ID_AA64PFR0, DIT, 48, 4)
-FIELD(ID_AA64PFR0, RME, 52, 4)
-FIELD(ID_AA64PFR0, CSV2, 56, 4)
-FIELD(ID_AA64PFR0, CSV3, 60, 4)
-
-FIELD(ID_AA64PFR1, BT, 0, 4)
-FIELD(ID_AA64PFR1, SSBS, 4, 4)
-FIELD(ID_AA64PFR1, MTE, 8, 4)
-FIELD(ID_AA64PFR1, RAS_FRAC, 12, 4)
-FIELD(ID_AA64PFR1, MPAM_FRAC, 16, 4)
-FIELD(ID_AA64PFR1, SME, 24, 4)
-FIELD(ID_AA64PFR1, RNDR_TRAP, 28, 4)
-FIELD(ID_AA64PFR1, CSV2_FRAC, 32, 4)
-FIELD(ID_AA64PFR1, NMI, 36, 4)
-FIELD(ID_AA64PFR1, MTE_FRAC, 40, 4)
-FIELD(ID_AA64PFR1, GCS, 44, 4)
-FIELD(ID_AA64PFR1, THE, 48, 4)
-FIELD(ID_AA64PFR1, MTEX, 52, 4)
-FIELD(ID_AA64PFR1, DF2, 56, 4)
-FIELD(ID_AA64PFR1, PFAR, 60, 4)
-
-FIELD(ID_AA64PFR2, MTEPERM, 0, 4)
-FIELD(ID_AA64PFR2, MTESTOREONLY, 4, 4)
-FIELD(ID_AA64PFR2, MTEFAR, 8, 4)
-FIELD(ID_AA64PFR2, GCIE, 12, 4)
-FIELD(ID_AA64PFR2, FPMR, 32, 4)
-
-FIELD(ID_AA64MMFR0, PARANGE, 0, 4)
-FIELD(ID_AA64MMFR0, ASIDBITS, 4, 4)
-FIELD(ID_AA64MMFR0, BIGEND, 8, 4)
-FIELD(ID_AA64MMFR0, SNSMEM, 12, 4)
-FIELD(ID_AA64MMFR0, BIGENDEL0, 16, 4)
-FIELD(ID_AA64MMFR0, TGRAN16, 20, 4)
-FIELD(ID_AA64MMFR0, TGRAN64, 24, 4)
-FIELD(ID_AA64MMFR0, TGRAN4, 28, 4)
-FIELD(ID_AA64MMFR0, TGRAN16_2, 32, 4)
-FIELD(ID_AA64MMFR0, TGRAN64_2, 36, 4)
-FIELD(ID_AA64MMFR0, TGRAN4_2, 40, 4)
-FIELD(ID_AA64MMFR0, EXS, 44, 4)
-FIELD(ID_AA64MMFR0, FGT, 56, 4)
-FIELD(ID_AA64MMFR0, ECV, 60, 4)
-
-FIELD(ID_AA64MMFR1, HAFDBS, 0, 4)
-FIELD(ID_AA64MMFR1, VMIDBITS, 4, 4)
-FIELD(ID_AA64MMFR1, VH, 8, 4)
-FIELD(ID_AA64MMFR1, HPDS, 12, 4)
-FIELD(ID_AA64MMFR1, LO, 16, 4)
-FIELD(ID_AA64MMFR1, PAN, 20, 4)
-FIELD(ID_AA64MMFR1, SPECSEI, 24, 4)
-FIELD(ID_AA64MMFR1, XNX, 28, 4)
-FIELD(ID_AA64MMFR1, TWED, 32, 4)
-FIELD(ID_AA64MMFR1, ETS, 36, 4)
-FIELD(ID_AA64MMFR1, HCX, 40, 4)
-FIELD(ID_AA64MMFR1, AFP, 44, 4)
-FIELD(ID_AA64MMFR1, NTLBPA, 48, 4)
-FIELD(ID_AA64MMFR1, TIDCP1, 52, 4)
-FIELD(ID_AA64MMFR1, CMOW, 56, 4)
-FIELD(ID_AA64MMFR1, ECBHB, 60, 4)
-
-FIELD(ID_AA64MMFR2, CNP, 0, 4)
-FIELD(ID_AA64MMFR2, UAO, 4, 4)
-FIELD(ID_AA64MMFR2, LSM, 8, 4)
-FIELD(ID_AA64MMFR2, IESB, 12, 4)
-FIELD(ID_AA64MMFR2, VARANGE, 16, 4)
-FIELD(ID_AA64MMFR2, CCIDX, 20, 4)
-FIELD(ID_AA64MMFR2, NV, 24, 4)
-FIELD(ID_AA64MMFR2, ST, 28, 4)
-FIELD(ID_AA64MMFR2, AT, 32, 4)
-FIELD(ID_AA64MMFR2, IDS, 36, 4)
-FIELD(ID_AA64MMFR2, FWB, 40, 4)
-FIELD(ID_AA64MMFR2, TTL, 48, 4)
-FIELD(ID_AA64MMFR2, BBM, 52, 4)
-FIELD(ID_AA64MMFR2, EVT, 56, 4)
-FIELD(ID_AA64MMFR2, E0PD, 60, 4)
-
-FIELD(ID_AA64MMFR3, TCRX, 0, 4)
-FIELD(ID_AA64MMFR3, SCTLRX, 4, 4)
-FIELD(ID_AA64MMFR3, S1PIE, 8, 4)
-FIELD(ID_AA64MMFR3, S2PIE, 12, 4)
-FIELD(ID_AA64MMFR3, S1POE, 16, 4)
-FIELD(ID_AA64MMFR3, S2POE, 20, 4)
-FIELD(ID_AA64MMFR3, AIE, 24, 4)
-FIELD(ID_AA64MMFR3, MEC, 28, 4)
-FIELD(ID_AA64MMFR3, D128, 32, 4)
-FIELD(ID_AA64MMFR3, D128_2, 36, 4)
-FIELD(ID_AA64MMFR3, SNERR, 40, 4)
-FIELD(ID_AA64MMFR3, ANERR, 44, 4)
-FIELD(ID_AA64MMFR3, SDERR, 52, 4)
-FIELD(ID_AA64MMFR3, ADERR, 56, 4)
-FIELD(ID_AA64MMFR3, SPEC_FPACC, 60, 4)
-
-FIELD(ID_AA64MMFR4, POPS, 0, 4)
-FIELD(ID_AA64MMFR4, EIESB, 4, 4)
-FIELD(ID_AA64MMFR4, ASID2, 8, 4)
-FIELD(ID_AA64MMFR4, HACDBS, 12, 4)
-FIELD(ID_AA64MMFR4, FGWTE3, 16, 4)
-FIELD(ID_AA64MMFR4, NV_FRAC, 20, 4)
-FIELD(ID_AA64MMFR4, E2H0, 24, 4)
-FIELD(ID_AA64MMFR4, RMEGDI, 28, 4)
-FIELD(ID_AA64MMFR4, E3DSE, 36, 4)
-FIELD(ID_AA64MMFR4, SRMASK, 44, 4)
-
-FIELD(ID_AA64DFR0, DEBUGVER, 0, 4)
-FIELD(ID_AA64DFR0, TRACEVER, 4, 4)
-FIELD(ID_AA64DFR0, PMUVER, 8, 4)
-FIELD(ID_AA64DFR0, BRPS, 12, 4)
-FIELD(ID_AA64DFR0, PMSS, 16, 4)
-FIELD(ID_AA64DFR0, WRPS, 20, 4)
-FIELD(ID_AA64DFR0, SEBEP, 24, 4)
-FIELD(ID_AA64DFR0, CTX_CMPS, 28, 4)
-FIELD(ID_AA64DFR0, PMSVER, 32, 4)
-FIELD(ID_AA64DFR0, DOUBLELOCK, 36, 4)
-FIELD(ID_AA64DFR0, TRACEFILT, 40, 4)
-FIELD(ID_AA64DFR0, TRACEBUFFER, 44, 4)
-FIELD(ID_AA64DFR0, MTPMU, 48, 4)
-FIELD(ID_AA64DFR0, BRBE, 52, 4)
-FIELD(ID_AA64DFR0, EXTTRCBUFF, 56, 4)
-FIELD(ID_AA64DFR0, HPMN0, 60, 4)
-
-FIELD(ID_AA64ZFR0, SVEVER, 0, 4)
-FIELD(ID_AA64ZFR0, AES, 4, 4)
-FIELD(ID_AA64ZFR0, ELTPERM, 12, 4)
-FIELD(ID_AA64ZFR0, BITPERM, 16, 4)
-FIELD(ID_AA64ZFR0, BFLOAT16, 20, 4)
-FIELD(ID_AA64ZFR0, B16B16, 24, 4)
-FIELD(ID_AA64ZFR0, SHA3, 32, 4)
-FIELD(ID_AA64ZFR0, SM4, 40, 4)
-FIELD(ID_AA64ZFR0, I8MM, 44, 4)
-FIELD(ID_AA64ZFR0, F16MM, 48, 4)
-FIELD(ID_AA64ZFR0, F32MM, 52, 4)
-FIELD(ID_AA64ZFR0, F64MM, 56, 4)
-
-FIELD(ID_AA64SMFR0, F32F32, 32, 1)
-FIELD(ID_AA64SMFR0, BI32I32, 33, 1)
-FIELD(ID_AA64SMFR0, B16F32, 34, 1)
-FIELD(ID_AA64SMFR0, F16F32, 35, 1)
-FIELD(ID_AA64SMFR0, I8I32, 36, 4)
-FIELD(ID_AA64SMFR0, F16F16, 42, 1)
-FIELD(ID_AA64SMFR0, B16B16, 43, 1)
-FIELD(ID_AA64SMFR0, I16I32, 44, 4)
-FIELD(ID_AA64SMFR0, F64F64, 48, 1)
-FIELD(ID_AA64SMFR0, I16I64, 52, 4)
-FIELD(ID_AA64SMFR0, SMEVER, 56, 4)
-FIELD(ID_AA64SMFR0, FA64, 63, 1)
+/*
+ * Expand FIELD() declarations for every ID register field listed in
+ * cpu-idregs.h.inc .
+ */
+#define IDREG_START(reg)
+#define IDREG_END(reg)
+#define IDREG_FIELD_ARCH_VAL(v, n)
+#define IDREG_FIELD_ARCH_VAL_ANY
+#define IDREG_FIELD_END(reg, field)
+#define IDREG_FIELD_START(reg, field, _shift, _length, safe, defval) \
+    FIELD(reg, field, _shift, _length)
+#include "cpu-idregs.h.inc"
+#undef IDREG_FIELD_START
+#undef IDREG_FIELD_END
+#undef IDREG_FIELD_ARCH_VAL_ANY
+#undef IDREG_FIELD_ARCH_VAL
+#undef IDREG_END
+#undef IDREG_START
 
 FIELD(ID_DFR0, COPDBG, 0, 4)
 FIELD(ID_DFR0, COPSDBG, 4, 4)
Signature · 1 line
2.52.0
#14 lore raw

Re: [RFC PATCH v1 05/13] target/arm: named_cpu_model: replace FIELD macro with IDREG_FIELD

Quoted 16 lines · Shaju Abraham

Replace the existing FIELD() macro with the newly introduced IDREG_FIELD() macro to remove deduplication. All definitions for TCG remains the same.

---
 target/arm/cpu-features.h | 232 +++-----------------------------------
 1 file changed, 18 insertions(+), 214 deletions(-)
target/arm/cpu-features.h +0 -0
index 4e44245a8b..782850ccec 100644
@@ -50,14 +50,6 @@ FIELD(CCSIDR_EL1, LINESIZE, 0, 3)
 FIELD(CCSIDR_EL1, ASSOCIATIVITY, 3, 10)
 FIELD(CCSIDR_EL1, NUMSETS, 13, 15)

target/arm/cpu-features.h FIELD(CCSIDR_EL1, LINESIZE, 0, 3) · line 53

Quoted 10 lines
target/arm/cpu-features.h +0 -8
 
-FIELD(CTR_EL0,  IMINLINE, 0, 4)
-FIELD(CTR_EL0,  L1IP, 14, 2)
-FIELD(CTR_EL0,  DMINLINE, 16, 4)
-FIELD(CTR_EL0,  ERG, 20, 4)
-FIELD(CTR_EL0,  CWG, 24, 4)
-FIELD(CTR_EL0,  IDC, 28, 1)
-FIELD(CTR_EL0,  DIC, 29, 1)
-FIELD(CTR_EL0,  TMINLINE, 32, 6)
 

MIDR_EL1 is also described in

target/arm/cpu-idregs.h.inc
so it could be removed I guess. Please check others

target/arm/cpu-features.h FIELD(ID_PFR1, VIRTUALIZATION, 12, 4) · line 192

Quoted 7 lines
target/arm/cpu-features.h +0 -1
 FIELD(MIDR_EL1, REVISION, 0, 4)
 FIELD(MIDR_EL1, PARTNUM, 4, 12)
@@ -189,217 +181,29 @@ FIELD(ID_PFR1, VIRTUALIZATION, 12, 4)
 FIELD(ID_PFR1, GENTIMER, 16, 4)
 FIELD(ID_PFR1, SEC_FRAC, 20, 4)
 FIELD(ID_PFR1, VIRT_FRAC, 24, 4)
-FIELD(ID_PFR1, GIC, 28, 4)

in 02/13 you seem to have a partial description of ID_PFR1 and you miss many other fields. Any reason?

Eric

Quoted 231 lines
target/arm/cpu-features.h +18 -205
 FIELD(ID_PFR2, CSV3, 0, 4)
 FIELD(ID_PFR2, SSBS, 4, 4)
 FIELD(ID_PFR2, RAS_FRAC, 8, 4)
 
-FIELD(ID_AA64ISAR0, AES, 4, 4)
-FIELD(ID_AA64ISAR0, SHA1, 8, 4)
-FIELD(ID_AA64ISAR0, SHA2, 12, 4)
-FIELD(ID_AA64ISAR0, CRC32, 16, 4)
-FIELD(ID_AA64ISAR0, ATOMIC, 20, 4)
-FIELD(ID_AA64ISAR0, TME, 24, 4)
-FIELD(ID_AA64ISAR0, RDM, 28, 4)
-FIELD(ID_AA64ISAR0, SHA3, 32, 4)
-FIELD(ID_AA64ISAR0, SM3, 36, 4)
-FIELD(ID_AA64ISAR0, SM4, 40, 4)
-FIELD(ID_AA64ISAR0, DP, 44, 4)
-FIELD(ID_AA64ISAR0, FHM, 48, 4)
-FIELD(ID_AA64ISAR0, TS, 52, 4)
-FIELD(ID_AA64ISAR0, TLB, 56, 4)
-FIELD(ID_AA64ISAR0, RNDR, 60, 4)
-
-FIELD(ID_AA64ISAR1, DPB, 0, 4)
-FIELD(ID_AA64ISAR1, APA, 4, 4)
-FIELD(ID_AA64ISAR1, API, 8, 4)
-FIELD(ID_AA64ISAR1, JSCVT, 12, 4)
-FIELD(ID_AA64ISAR1, FCMA, 16, 4)
-FIELD(ID_AA64ISAR1, LRCPC, 20, 4)
-FIELD(ID_AA64ISAR1, GPA, 24, 4)
-FIELD(ID_AA64ISAR1, GPI, 28, 4)
-FIELD(ID_AA64ISAR1, FRINTTS, 32, 4)
-FIELD(ID_AA64ISAR1, SB, 36, 4)
-FIELD(ID_AA64ISAR1, SPECRES, 40, 4)
-FIELD(ID_AA64ISAR1, BF16, 44, 4)
-FIELD(ID_AA64ISAR1, DGH, 48, 4)
-FIELD(ID_AA64ISAR1, I8MM, 52, 4)
-FIELD(ID_AA64ISAR1, XS, 56, 4)
-FIELD(ID_AA64ISAR1, LS64, 60, 4)
-
-FIELD(ID_AA64ISAR2, WFXT, 0, 4)
-FIELD(ID_AA64ISAR2, RPRES, 4, 4)
-FIELD(ID_AA64ISAR2, GPA3, 8, 4)
-FIELD(ID_AA64ISAR2, APA3, 12, 4)
-FIELD(ID_AA64ISAR2, MOPS, 16, 4)
-FIELD(ID_AA64ISAR2, BC, 20, 4)
-FIELD(ID_AA64ISAR2, PAC_FRAC, 24, 4)
-FIELD(ID_AA64ISAR2, CLRBHB, 28, 4)
-FIELD(ID_AA64ISAR2, SYSREG_128, 32, 4)
-FIELD(ID_AA64ISAR2, SYSINSTR_128, 36, 4)
-FIELD(ID_AA64ISAR2, PRFMSLC, 40, 4)
-FIELD(ID_AA64ISAR2, RPRFM, 48, 4)
-FIELD(ID_AA64ISAR2, CSSC, 52, 4)
-FIELD(ID_AA64ISAR2, LUT, 56, 4)
-FIELD(ID_AA64ISAR2, ATS1A, 60, 4)
-
-FIELD(ID_AA64PFR0, EL0, 0, 4)
-FIELD(ID_AA64PFR0, EL1, 4, 4)
-FIELD(ID_AA64PFR0, EL2, 8, 4)
-FIELD(ID_AA64PFR0, EL3, 12, 4)
-FIELD(ID_AA64PFR0, FP, 16, 4)
-FIELD(ID_AA64PFR0, ADVSIMD, 20, 4)
-FIELD(ID_AA64PFR0, GIC, 24, 4)
-FIELD(ID_AA64PFR0, RAS, 28, 4)
-FIELD(ID_AA64PFR0, SVE, 32, 4)
-FIELD(ID_AA64PFR0, SEL2, 36, 4)
-FIELD(ID_AA64PFR0, MPAM, 40, 4)
-FIELD(ID_AA64PFR0, AMU, 44, 4)
-FIELD(ID_AA64PFR0, DIT, 48, 4)
-FIELD(ID_AA64PFR0, RME, 52, 4)
-FIELD(ID_AA64PFR0, CSV2, 56, 4)
-FIELD(ID_AA64PFR0, CSV3, 60, 4)
-
-FIELD(ID_AA64PFR1, BT, 0, 4)
-FIELD(ID_AA64PFR1, SSBS, 4, 4)
-FIELD(ID_AA64PFR1, MTE, 8, 4)
-FIELD(ID_AA64PFR1, RAS_FRAC, 12, 4)
-FIELD(ID_AA64PFR1, MPAM_FRAC, 16, 4)
-FIELD(ID_AA64PFR1, SME, 24, 4)
-FIELD(ID_AA64PFR1, RNDR_TRAP, 28, 4)
-FIELD(ID_AA64PFR1, CSV2_FRAC, 32, 4)
-FIELD(ID_AA64PFR1, NMI, 36, 4)
-FIELD(ID_AA64PFR1, MTE_FRAC, 40, 4)
-FIELD(ID_AA64PFR1, GCS, 44, 4)
-FIELD(ID_AA64PFR1, THE, 48, 4)
-FIELD(ID_AA64PFR1, MTEX, 52, 4)
-FIELD(ID_AA64PFR1, DF2, 56, 4)
-FIELD(ID_AA64PFR1, PFAR, 60, 4)
-
-FIELD(ID_AA64PFR2, MTEPERM, 0, 4)
-FIELD(ID_AA64PFR2, MTESTOREONLY, 4, 4)
-FIELD(ID_AA64PFR2, MTEFAR, 8, 4)
-FIELD(ID_AA64PFR2, GCIE, 12, 4)
-FIELD(ID_AA64PFR2, FPMR, 32, 4)
-
-FIELD(ID_AA64MMFR0, PARANGE, 0, 4)
-FIELD(ID_AA64MMFR0, ASIDBITS, 4, 4)
-FIELD(ID_AA64MMFR0, BIGEND, 8, 4)
-FIELD(ID_AA64MMFR0, SNSMEM, 12, 4)
-FIELD(ID_AA64MMFR0, BIGENDEL0, 16, 4)
-FIELD(ID_AA64MMFR0, TGRAN16, 20, 4)
-FIELD(ID_AA64MMFR0, TGRAN64, 24, 4)
-FIELD(ID_AA64MMFR0, TGRAN4, 28, 4)
-FIELD(ID_AA64MMFR0, TGRAN16_2, 32, 4)
-FIELD(ID_AA64MMFR0, TGRAN64_2, 36, 4)
-FIELD(ID_AA64MMFR0, TGRAN4_2, 40, 4)
-FIELD(ID_AA64MMFR0, EXS, 44, 4)
-FIELD(ID_AA64MMFR0, FGT, 56, 4)
-FIELD(ID_AA64MMFR0, ECV, 60, 4)
-
-FIELD(ID_AA64MMFR1, HAFDBS, 0, 4)
-FIELD(ID_AA64MMFR1, VMIDBITS, 4, 4)
-FIELD(ID_AA64MMFR1, VH, 8, 4)
-FIELD(ID_AA64MMFR1, HPDS, 12, 4)
-FIELD(ID_AA64MMFR1, LO, 16, 4)
-FIELD(ID_AA64MMFR1, PAN, 20, 4)
-FIELD(ID_AA64MMFR1, SPECSEI, 24, 4)
-FIELD(ID_AA64MMFR1, XNX, 28, 4)
-FIELD(ID_AA64MMFR1, TWED, 32, 4)
-FIELD(ID_AA64MMFR1, ETS, 36, 4)
-FIELD(ID_AA64MMFR1, HCX, 40, 4)
-FIELD(ID_AA64MMFR1, AFP, 44, 4)
-FIELD(ID_AA64MMFR1, NTLBPA, 48, 4)
-FIELD(ID_AA64MMFR1, TIDCP1, 52, 4)
-FIELD(ID_AA64MMFR1, CMOW, 56, 4)
-FIELD(ID_AA64MMFR1, ECBHB, 60, 4)
-
-FIELD(ID_AA64MMFR2, CNP, 0, 4)
-FIELD(ID_AA64MMFR2, UAO, 4, 4)
-FIELD(ID_AA64MMFR2, LSM, 8, 4)
-FIELD(ID_AA64MMFR2, IESB, 12, 4)
-FIELD(ID_AA64MMFR2, VARANGE, 16, 4)
-FIELD(ID_AA64MMFR2, CCIDX, 20, 4)
-FIELD(ID_AA64MMFR2, NV, 24, 4)
-FIELD(ID_AA64MMFR2, ST, 28, 4)
-FIELD(ID_AA64MMFR2, AT, 32, 4)
-FIELD(ID_AA64MMFR2, IDS, 36, 4)
-FIELD(ID_AA64MMFR2, FWB, 40, 4)
-FIELD(ID_AA64MMFR2, TTL, 48, 4)
-FIELD(ID_AA64MMFR2, BBM, 52, 4)
-FIELD(ID_AA64MMFR2, EVT, 56, 4)
-FIELD(ID_AA64MMFR2, E0PD, 60, 4)
-
-FIELD(ID_AA64MMFR3, TCRX, 0, 4)
-FIELD(ID_AA64MMFR3, SCTLRX, 4, 4)
-FIELD(ID_AA64MMFR3, S1PIE, 8, 4)
-FIELD(ID_AA64MMFR3, S2PIE, 12, 4)
-FIELD(ID_AA64MMFR3, S1POE, 16, 4)
-FIELD(ID_AA64MMFR3, S2POE, 20, 4)
-FIELD(ID_AA64MMFR3, AIE, 24, 4)
-FIELD(ID_AA64MMFR3, MEC, 28, 4)
-FIELD(ID_AA64MMFR3, D128, 32, 4)
-FIELD(ID_AA64MMFR3, D128_2, 36, 4)
-FIELD(ID_AA64MMFR3, SNERR, 40, 4)
-FIELD(ID_AA64MMFR3, ANERR, 44, 4)
-FIELD(ID_AA64MMFR3, SDERR, 52, 4)
-FIELD(ID_AA64MMFR3, ADERR, 56, 4)
-FIELD(ID_AA64MMFR3, SPEC_FPACC, 60, 4)
-
-FIELD(ID_AA64MMFR4, POPS, 0, 4)
-FIELD(ID_AA64MMFR4, EIESB, 4, 4)
-FIELD(ID_AA64MMFR4, ASID2, 8, 4)
-FIELD(ID_AA64MMFR4, HACDBS, 12, 4)
-FIELD(ID_AA64MMFR4, FGWTE3, 16, 4)
-FIELD(ID_AA64MMFR4, NV_FRAC, 20, 4)
-FIELD(ID_AA64MMFR4, E2H0, 24, 4)
-FIELD(ID_AA64MMFR4, RMEGDI, 28, 4)
-FIELD(ID_AA64MMFR4, E3DSE, 36, 4)
-FIELD(ID_AA64MMFR4, SRMASK, 44, 4)
-
-FIELD(ID_AA64DFR0, DEBUGVER, 0, 4)
-FIELD(ID_AA64DFR0, TRACEVER, 4, 4)
-FIELD(ID_AA64DFR0, PMUVER, 8, 4)
-FIELD(ID_AA64DFR0, BRPS, 12, 4)
-FIELD(ID_AA64DFR0, PMSS, 16, 4)
-FIELD(ID_AA64DFR0, WRPS, 20, 4)
-FIELD(ID_AA64DFR0, SEBEP, 24, 4)
-FIELD(ID_AA64DFR0, CTX_CMPS, 28, 4)
-FIELD(ID_AA64DFR0, PMSVER, 32, 4)
-FIELD(ID_AA64DFR0, DOUBLELOCK, 36, 4)
-FIELD(ID_AA64DFR0, TRACEFILT, 40, 4)
-FIELD(ID_AA64DFR0, TRACEBUFFER, 44, 4)
-FIELD(ID_AA64DFR0, MTPMU, 48, 4)
-FIELD(ID_AA64DFR0, BRBE, 52, 4)
-FIELD(ID_AA64DFR0, EXTTRCBUFF, 56, 4)
-FIELD(ID_AA64DFR0, HPMN0, 60, 4)
-
-FIELD(ID_AA64ZFR0, SVEVER, 0, 4)
-FIELD(ID_AA64ZFR0, AES, 4, 4)
-FIELD(ID_AA64ZFR0, ELTPERM, 12, 4)
-FIELD(ID_AA64ZFR0, BITPERM, 16, 4)
-FIELD(ID_AA64ZFR0, BFLOAT16, 20, 4)
-FIELD(ID_AA64ZFR0, B16B16, 24, 4)
-FIELD(ID_AA64ZFR0, SHA3, 32, 4)
-FIELD(ID_AA64ZFR0, SM4, 40, 4)
-FIELD(ID_AA64ZFR0, I8MM, 44, 4)
-FIELD(ID_AA64ZFR0, F16MM, 48, 4)
-FIELD(ID_AA64ZFR0, F32MM, 52, 4)
-FIELD(ID_AA64ZFR0, F64MM, 56, 4)
-
-FIELD(ID_AA64SMFR0, F32F32, 32, 1)
-FIELD(ID_AA64SMFR0, BI32I32, 33, 1)
-FIELD(ID_AA64SMFR0, B16F32, 34, 1)
-FIELD(ID_AA64SMFR0, F16F32, 35, 1)
-FIELD(ID_AA64SMFR0, I8I32, 36, 4)
-FIELD(ID_AA64SMFR0, F16F16, 42, 1)
-FIELD(ID_AA64SMFR0, B16B16, 43, 1)
-FIELD(ID_AA64SMFR0, I16I32, 44, 4)
-FIELD(ID_AA64SMFR0, F64F64, 48, 1)
-FIELD(ID_AA64SMFR0, I16I64, 52, 4)
-FIELD(ID_AA64SMFR0, SMEVER, 56, 4)
-FIELD(ID_AA64SMFR0, FA64, 63, 1)
+/*
+ * Expand FIELD() declarations for every ID register field listed in
+ * cpu-idregs.h.inc .
+ */
+#define IDREG_START(reg)
+#define IDREG_END(reg)
+#define IDREG_FIELD_ARCH_VAL(v, n)
+#define IDREG_FIELD_ARCH_VAL_ANY
+#define IDREG_FIELD_END(reg, field)
+#define IDREG_FIELD_START(reg, field, _shift, _length, safe, defval) \
+    FIELD(reg, field, _shift, _length)
+#include "cpu-idregs.h.inc"
+#undef IDREG_FIELD_START
+#undef IDREG_FIELD_END
+#undef IDREG_FIELD_ARCH_VAL_ANY
+#undef IDREG_FIELD_ARCH_VAL
+#undef IDREG_END
+#undef IDREG_START
 
 FIELD(ID_DFR0, COPDBG, 0, 4)
 FIELD(ID_DFR0, COPSDBG, 4, 4)
#15 lore raw

Re: [RFC PATCH v1 05/13] target/arm: named_cpu_model: replace FIELD macro with IDREG_FIELD

Quoted 8 lines · Eric Auger

in 02/13 you seem to have a partial description of ID_PFR1 and you miss many other fields. Any reason?

Eric

We are not planning to support Aarch32 guest for named cpu models. Dummy Field for AArch32 registers are added so they can be defaulted to zero.

Warm Regards,
Khushit

#16 lore raw

Re: [RFC PATCH v1 05/13] target/arm: named_cpu_model: replace FIELD macro with IDREG_FIELD

In reply to Eric Auger
Quoted 8 lines · Eric Auger

MIDR_EL1 is also described in

target/arm/cpu-idregs.h.inc
so it could be removed I guess. Please check others

I do not see MIDR_EL1 in cpu.h, both MIDR and REVIDR are
maintained separately in ArchCPU struct and are not in cpu.isar->idregs[] (or is duplicated).

Warm Regards,
Khushit

#17 lore raw

Re: [RFC PATCH v1 05/13] target/arm: named_cpu_model: replace FIELD macro with IDREG_FIELD

Quoted 9 lines · Khushit Shah
Quoted 7 lines · Eric Auger

MIDR_EL1 is also described in

target/arm/cpu-idregs.h.inc
so it could be removed I guess. Please check others

I do not see MIDR_EL1 in cpu.h, both MIDR and REVIDR are
maintained separately in ArchCPU struct and are not in cpu.isar->idregs[] (or is duplicated).

it is defined in cpu-features.h just after CTR_EL0

Eric

Quoted 3 lines

Warm Regards,
Khushit

#18 lore raw

Re: [RFC PATCH v1 05/13] target/arm: named_cpu_model: replace FIELD macro with IDREG_FIELD

Quoted 7 lines · Eric Auger

it is defined in cpu-features.h just after CTR_EL0

Eric

Oops, okay will remove.

Warm Regards,
Khushit

#19 lore raw

RFC PATCH 6/13 target/arm: named_cpu_model: data-structures required for the ARM property layer.

In reply to Shaju Abraham

Introduce data-structures required for the ARM property layer. There are four classes of properties:
STRING: Multi-bit fields with arch-defined named values, such as
("off", "aes", "pmull", ...).
BOOLEAN: 1-bit fields.
NUMERIC: Numeric values like cache geometry, debug counter widths, etc.
FRACTIONAL: Paired (base, frac) fields exposed as a single "M.F" string
(e.g., CSV2/CSV2_FRAC, MPAM/MPAM_FRAC, RAS/RAS_FRAC, NV/NV_FRAC).

---
 target/arm/arm-cpu-props.h | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 target/arm/arm-cpu-props.h
target/arm/arm-cpu-props.h new file +36 -0
new file mode 100644
index 0000000000..1dc3786ea9
@@ -0,0 +1,36 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later
+ *
+ * ARM CPU feature properties.
+ *
+ * User-facing QOM properties that map to fields of the AArch64 ID
+ * registers described in cpu-idregs.inc.h.
+ *
+ */
+
+#ifndef ARM_CPU_PROPS_H
+#define ARM_CPU_PROPS_H
+
+#include "cpu-idregs.h"
+
+typedef enum ArmCpuPropType {
+    ARM_PROP_STRING,
+    ARM_PROP_BOOLEAN,
+    ARM_PROP_NUMERIC,
+    ARM_PROP_FRACTIONAL,
+} ArmCpuPropType;
+
+typedef struct ArmFracVal {
+    const char *name;
+    uint64_t base_val;
+    uint64_t frac_val;
+} ArmFracVal;
+
+typedef struct ArmCpuPropDesc {
+    const char *name;
+    ArmCpuPropType type;
+    ArmFieldIdx base_field;
+    ArmFieldIdx frac_field;
+    const ArmFracVal *vals;
+} ArmCpuPropDesc;
+
+#endif
Signature · 1 line
2.52.0
#20 lore raw

Re: [RFC PATCH v1 06/13] target/arm: named_cpu_model: data-structures required for the ARM property layer.

Quoted 4 lines · Shaju Abraham

Introduce data-structures required for the ARM property layer. There are four classes of properties:
STRING: Multi-bit fields with arch-defined named values, such as
("off", "aes", "pmull", ...).

when you say "arch defined named values", if we take for instance SHA2 field of ID_AA64ISAR0

+IDREG_FIELD_START(ID_AA64ISAR0, SHA2, 12, 4, LOWER, 0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "sha256")
+IDREG_FIELD_ARCH_VAL(0b0010, "sha512")
+IDREG_FIELD_END(ID_AA64ISAR0, SHA2)

I don't see such string value in the ARM ARM:

0b0000 No SHA2 instructions implemented.
0b0001 Implements instructions: SHA256H, SHA256H2, SHA256SU0, and SHA256SU1. 0b0010 Implements instructions: • SHA256H, SHA256H2, SHA256SU0, and SHA256SU1. • SHA512H, SHA512H2, SHA512SU0, and SHA512SU1.

Where did you get those arch defined strings? The only source I can see is linux sysreg and I am not sure this can be used as a reference.

Looking at target/arm/cpu-idregs.h.inc

+IDREG_FIELD_START(ID_AA64ISAR0, TLB, 56, 4, LOWER, 0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "os")
+IDREG_FIELD_ARCH_VAL(0b0010, "range")
+IDREG_FIELD_END(ID_AA64ISAR0, TLB)

it looks not straightforward to link with ARM ARM

TLB, bits [59:56] Indicates support for Outer Shareable and TLB range maintenance instructions. The value of this field is an IMPLEMENTATION DEFINED choice of: 0b0000 Outer Shareable and TLB range maintenance instructions are not implemented. 0b0001 Outer Shareable TLB maintenance instructions are implemented. 0b0010 Outer Shareable and TLB range maintenance instructions are implemented. All other values are reserved. FEAT_TLBIOS implements the functionality identified by the values 0b0001 and 0b0010. FEAT_TLBIRANGE implements the functionality identified by the value 0b0010. From Armv8.4, the only permitted value is 0b0010. Access to this field is RO

Thanks

Eric

Quoted 54 lines

BOOLEAN: 1-bit fields.
NUMERIC: Numeric values like cache geometry, debug counter widths, etc.
FRACTIONAL: Paired (base, frac) fields exposed as a single "M.F" string
(e.g., CSV2/CSV2_FRAC, MPAM/MPAM_FRAC, RAS/RAS_FRAC, NV/NV_FRAC).

---
 target/arm/arm-cpu-props.h | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 target/arm/arm-cpu-props.h
target/arm/arm-cpu-props.h new file +36 -0
new file mode 100644
index 0000000000..1dc3786ea9
@@ -0,0 +1,36 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later
+ *
+ * ARM CPU feature properties.
+ *
+ * User-facing QOM properties that map to fields of the AArch64 ID
+ * registers described in cpu-idregs.inc.h.
+ *
+ */
+
+#ifndef ARM_CPU_PROPS_H
+#define ARM_CPU_PROPS_H
+
+#include "cpu-idregs.h"
+
+typedef enum ArmCpuPropType {
+    ARM_PROP_STRING,
+    ARM_PROP_BOOLEAN,
+    ARM_PROP_NUMERIC,
+    ARM_PROP_FRACTIONAL,
+} ArmCpuPropType;
+
+typedef struct ArmFracVal {
+    const char *name;
+    uint64_t base_val;
+    uint64_t frac_val;
+} ArmFracVal;
+
+typedef struct ArmCpuPropDesc {
+    const char *name;
+    ArmCpuPropType type;
+    ArmFieldIdx base_field;
+    ArmFieldIdx frac_field;
+    const ArmFracVal *vals;
+} ArmCpuPropDesc;
+
+#endif
#21 lore raw

Re: [RFC PATCH v1 06/13] target/arm: named_cpu_model: data-structures required for the ARM property layer.

Quoted 46 lines · Eric Auger

when you say "arch defined named values", if we take for instance SHA2 field of ID_AA64ISAR0

(quoted diff) +5 -0
+IDREG_FIELD_START(ID_AA64ISAR0, SHA2,    12,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "sha256")
+IDREG_FIELD_ARCH_VAL(0b0010, "sha512")
+IDREG_FIELD_END(ID_AA64ISAR0, SHA2)

I don't see such string value in the ARM ARM:

0b0000 No SHA2 instructions implemented.
0b0001 Implements instructions: SHA256H, SHA256H2, SHA256SU0, and SHA256SU1. 0b0010 Implements instructions: • SHA256H, SHA256H2, SHA256SU0, and SHA256SU1. • SHA512H, SHA512H2, SHA512SU0, and SHA512SU1.

Where did you get those arch defined strings? The only source I can see is linux sysreg and I am not sure this can be used as a reference.

Looking at target/arm/cpu-idregs.h.inc

(quoted diff) +5 -0
+IDREG_FIELD_START(ID_AA64ISAR0, TLB,     56,  4, LOWER,  0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "os")
+IDREG_FIELD_ARCH_VAL(0b0010, "range")
+IDREG_FIELD_END(ID_AA64ISAR0, TLB)

it looks not straightforward to link with ARM ARM

TLB, bits [59:56] Indicates support for Outer Shareable and TLB range maintenance instructions. The value of this field is an IMPLEMENTATION DEFINED choice of: 0b0000 Outer Shareable and TLB range maintenance instructions are not implemented. 0b0001 Outer Shareable TLB maintenance instructions are implemented. 0b0010 Outer Shareable and TLB range maintenance instructions are implemented. All other values are reserved. FEAT_TLBIOS implements the functionality identified by the values 0b0001 and 0b0010. FEAT_TLBIRANGE implements the functionality identified by the value 0b0010. From Armv8.4, the only permitted value is 0b0010. Access to this field is RO

Quoted 3 lines

Thanks

Eric

You are correct, I should say: arched defined values with names. For many field, there are no names for the values. But, we can iterate over the names till they make sense. Like maybe:

+IDREG_FIELD_START(ID_AA64ISAR0, TLB, 56, 4, LOWER, 0)
+IDREG_FIELD_ARCH_VAL(0b0000, "off")
+IDREG_FIELD_ARCH_VAL(0b0001, "os")
+IDREG_FIELD_ARCH_VAL(0b0010, “os_range")
+IDREG_FIELD_END(ID_AA64ISAR0, TLB)

Warm Regards,
Khushit

#22 lore raw

RFC PATCH 7/13 target/arm: named_cpu_model: define ARM properties

In reply to Shaju Abraham

Define X-macros to generate tables for all user-facing CPU properties, including fractional properties.

Properties that map to fields that are not supported by the linux kernel (i.e. not in the ftr_bits array) are not included.

---
 target/arm/arm-cpu-frac.inc.h  |  34 +++++++
 target/arm/arm-cpu-props.inc.h | 180 +++++++++++++++++++++++++++++++++
 2 files changed, 214 insertions(+)
 create mode 100644 target/arm/arm-cpu-frac.inc.h
 create mode 100644 target/arm/arm-cpu-props.inc.h
target/arm/arm-cpu-frac.inc.h new file +34 -0
new file mode 100644
index 0000000000..6c194daf7c
@@ -0,0 +1,34 @@
+
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+FRAC_TABLE_START(CSV2)
+FRAC_VAL("0.0", 0, 0)
+FRAC_VAL("1.0", 1, 0)
+FRAC_VAL("1.1", 1, 1)
+FRAC_VAL("1.2", 1, 2)
+FRAC_VAL("2.0", 2, 0)
+FRAC_VAL("3.0", 3, 0)
+FRAC_TABLE_END(CSV2)
+
+FRAC_TABLE_START(MPAM)
+FRAC_VAL("0.0", 0, 0)
+FRAC_VAL("0.1", 0, 1)
+FRAC_VAL("1.0", 1, 0)
+FRAC_VAL("1.1", 1, 1)
+FRAC_TABLE_END(MPAM)
+
+FRAC_TABLE_START(RAS)
+FRAC_VAL("0.0", 0, 0)
+FRAC_VAL("1.0", 1, 0)
+FRAC_VAL("1.1", 1, 1)
+FRAC_VAL("1.1_base", 2, 0)
+FRAC_VAL("2.0", 3, 0)
+FRAC_TABLE_END(RAS)
+
+FRAC_TABLE_START(NV)
+FRAC_VAL("0.0", 0, 0)
+FRAC_VAL("1.0", 1, 0)
+FRAC_VAL("2.0", 2, 0)
+FRAC_VAL("2.0_only", 2, 1)
+FRAC_VAL("2.1", 2, 2)
+FRAC_TABLE_END(NV)
target/arm/arm-cpu-props.inc.h new file +180 -0

180 lines not on this page · raw message

Signature · 1 line
2.52.0
#23 lore raw

RFC PATCH 8/13 target/arm: named_cpu_model: generate arm_cpu_props[] table

In reply to Shaju Abraham

Expand the previously defined X-macros to generate arm_cpu_props[]. These properties will be added to CPU object in future patch.

---
 target/arm/arm-cpu-props.c | 43 ++++++++++++++++++++++++++++++++++++++
 target/arm/meson.build     |  1 +
 2 files changed, 44 insertions(+)
 create mode 100644 target/arm/arm-cpu-props.c
target/arm/arm-cpu-props.c new file +43 -0
new file mode 100644
index 0000000000..f22fe7f08b
@@ -0,0 +1,43 @@
+/*
+ * ARM CPU feature property definitions.
+ *
+ * Maps ID-register fields described in cpu-idregs.inc.h to user-facing
+ * QOM properties.
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#include "qemu/osdep.h"
+#include "qapi/error.h"
+#include "qapi/visitor.h"
+#include "qom/object.h"
+#include "cpu.h"
+#include "arm-cpu-props.h"
+
+/*
+ * Generate all ArmFracVal tables for each fractional fields.
+ */
+#define FRAC_TABLE_START(base_fld) \
+    static const ArmFracVal base_fld##_frac_vals[] = {
+#define FRAC_VAL(name, base, frac) \
+    { (name), (base), (frac) },
+#define FRAC_TABLE_END(base_fld) \
+    { NULL }, \
+    };
+#include "arm-cpu-frac.inc.h"
+#undef FRAC_TABLE_END
+#undef FRAC_VAL
+#undef FRAC_TABLE_START
+#define ARM_PROP(prop_name, _type, reg, fld)                            \
+    { .name = (prop_name), .type = ARM_PROP_##_type,                     \
+      .base_field = ARM_FIELD_IDX(reg, fld) },
+
+#define ARM_FRACTIONAL_PROP(prop_name, base_reg, base_fld, frac_reg, frac_fld) \
+    { .name = (prop_name), .type = ARM_PROP_FRACTIONAL,                  \
+      .base_field = ARM_FIELD_IDX(base_reg, base_fld),                   \
+      .frac_field = ARM_FIELD_IDX(frac_reg, frac_fld),                   \
+      .vals = base_fld##_frac_vals },
+
+const ArmCpuPropDesc arm_cpu_props[] = {
+#include "arm-cpu-props.inc.h"
+    { .name = NULL },
+};
target/arm/meson.build +1 -0
index 64d1ec63ab..01b1e91a1c 100644
@@ -18,6 +18,7 @@ arm_common_ss.add(files(
 ))
 
 arm_common_system_ss.add(files(
+  'arm-cpu-props.c',
   'arm-qmp-cmds.c',
   'cpu-idregs.c',
 ))
Signature · 1 line
2.52.0
#24 lore raw

RFC PATCH 9/13 target/arm: named_cpu_model: Add ID register field helper functions

In reply to Shaju Abraham

Add helper functions to extract and set fields from the ID registers. These include reading/writing individual fields, looking up architectural value names, and resetting ID registers to their default values.

---
 target/arm/cpu-idregs.c | 107 ++++++++++++++++++++++++++++++++++++++++
 target/arm/cpu-idregs.h |   9 ++++
 2 files changed, 116 insertions(+)
target/arm/cpu-idregs.c +107 -0
index 8fced7d8d7..5ffdeb5f21 100644
@@ -122,3 +122,110 @@ const ArmIdRegFieldLoc arm_field_locs[ARM_FIELD__MAX] = {
 #undef IDREG_FIELD_START
 #undef IDREG_END
 #undef IDREG_START
+
+void arm_idreg_field_read(ARMCPU *cpu, ArmFieldIdx field, uint64_t *value)
+{
+    ARMIDRegisterIdx reg_idx = ARM_FIELD_REG(field);
+    uint64_t reg_value = cpu->isar.idregs[reg_idx];
+    uint32_t shift = ARM_FIELD_SHIFT(field);
+    uint32_t length = ARM_FIELD_LENGTH(field);
+
+    *value = extract64(reg_value, shift, length);
+}
+
+bool arm_idreg_field_write(ARMCPU *cpu, ArmFieldIdx field, uint64_t value,
+                           Error **errp)
+{
+    ARMIDRegisterIdx reg_idx = ARM_FIELD_REG(field);
+    uint64_t reg_value = cpu->isar.idregs[reg_idx];
+    uint32_t shift = ARM_FIELD_SHIFT(field);
+    uint32_t length = ARM_FIELD_LENGTH(field);
+    ArmIdReg *reg;
+    ArmIdRegField *fdesc;
+
+    if (length < 64 && value > ((1ULL << length) - 1)) {
+        reg = &arm_idregs[reg_idx];
+        fdesc = &reg->fields[ARM_FIELD_REG_FIELD(field)];
+
+        error_setg(errp, "value %" PRIu64 " is too large for field %s.%s",
+                   value, reg->name, fdesc->name);
+        return false;
+    }
+
+    cpu->isar.idregs[reg_idx] = deposit64(reg_value, shift, length, value);
+    return true;
+}
+
+static const ArmIdRegField *arm_get_field_desc(ArmFieldIdx field)
+{
+    ARMIDRegisterIdx reg_idx = ARM_FIELD_REG(field);
+    uint16_t field_idx = ARM_FIELD_REG_FIELD(field);
+    return &arm_idregs[reg_idx].fields[field_idx];
+}
+
+const char *arm_arch_val_name(ArmFieldIdx field, uint64_t val)
+{
+    uint32_t i;
+    const ArmIdRegField *f = arm_get_field_desc(field);
+
+    for (i = 0; i < f->arch_vals_count; i++) {
+        if (f->arch_vals[i].value == val && f->arch_vals[i].name) {
+            return f->arch_vals[i].name;
+        }
+    }
+    return NULL;
+}
+
+bool arm_arch_val_from_name(ArmFieldIdx field, const char *name,
+                            uint64_t *val)
+{
+    uint32_t i;
+    ArmIdRegArchVal *av;
+    const ArmIdRegField *f = arm_get_field_desc(field);
+
+    for (i = 0; i < f->arch_vals_count; i++) {
+        av = &f->arch_vals[i];
+
+        if (av->name && g_ascii_strcasecmp(av->name, name) == 0) {
+            *val = av->value;
+            return true;
+        }
+    }
+    return false;
+}
+
+bool arm_field_is_idreg_any(ArmFieldIdx field)
+{
+    const ArmIdRegField *f = arm_get_field_desc(field);
+
+    return f->arch_vals_count == 1 &&
+           f->arch_vals[0].value == 0xffffffffUL &&
+           f->arch_vals[0].name == NULL;
+}
+
+void arm_idregs_reset_to_defaults(ARMCPU *cpu)
+{
+    int i;
+    uint32_t j;
+    ArmIdReg *reg;
+    ArmIdRegField *f;
+    uint64_t val = 0;
+
+    for (i = 0; i < NUM_ID_IDX; i++) {
+        reg = &arm_idregs[i];
+
+        if (!reg->name) {
+            warn_report("target/arm: no field table for ID register slot "
+                        "%d; cpu->isar.idregs[%d] left at 0x%016"
+                        PRIx64, i,
+                        i, cpu->isar.idregs[i]);
+            continue;
+        }
+
+        for (j = 0; j < reg->fields_count; j++) {
+            f = &reg->fields[j];
+            val = deposit64(val, f->shift, f->length, f->default_val);
+        }
+        cpu->isar.idregs[i] = val;
+    }
+}
target/arm/cpu-idregs.h +9 -0
index 4e568e877d..0127bc0a95 100644
@@ -119,4 +119,13 @@ extern const ArmIdRegFieldLoc arm_field_locs[ARM_FIELD__MAX];
 #define ARM_FIELD_IDX(reg, field) ARM_FIELD_##reg##_##field
 
 extern ArmIdReg arm_idregs[NUM_ID_IDX];
+
+void arm_idreg_field_read(ARMCPU *cpu, ArmFieldIdx field, uint64_t *value);
+bool arm_idreg_field_write(ARMCPU *cpu, ArmFieldIdx field,
+                           uint64_t value, Error **errp);
+const char *arm_arch_val_name(ArmFieldIdx field, uint64_t val);
+bool arm_arch_val_from_name(ArmFieldIdx field, const char *name,
+                            uint64_t *val);
+bool arm_field_is_idreg_any(ArmFieldIdx field);
+void arm_idregs_reset_to_defaults(ARMCPU *cpu);
 #endif /* CPU_IDREGS_H */
Signature · 1 line
2.52.0
#25 lore raw

RFC PATCH 10/13 target/arm: named_cpu_model: Register Arm64 properties for host model

In reply to Shaju Abraham

Register all the defined Arm properties to the host model if CONFIG_KVM is enabled. Add property finder, getter/setter functions, and wire up the property registration in the CPU initialization path.

---
 target/arm/arm-cpu-props.c | 216 +++++++++++++++++++++++++++++++++++++
 target/arm/arm-cpu-props.h |   2 +-
 target/arm/cpu64.c         |   3 +-
 3 files changed, 219 insertions(+), 2 deletions(-)
target/arm/arm-cpu-props.c +216 -0
index f22fe7f08b..1a34428c00 100644
@@ -41,3 +41,219 @@ const ArmCpuPropDesc arm_cpu_props[] = {
 #include "arm-cpu-props.inc.h"
     { .name = NULL },
 };
+
+static const ArmCpuPropDesc *arm_find_prop(const char *name)
+{
+    const ArmCpuPropDesc *p;
+    for (p = arm_cpu_props; p->name; p++) {
+        if (g_str_equal(p->name, name)) {
+            return p;
+        }
+    }
+    return NULL;
+}
+
+static void arm_single_field_get(ARMCPU *cpu, const ArmCpuPropDesc *p,
+                                 Visitor *v, const char *name, Error **errp)
+{
+    uint64_t value;
+    char *s;
+    bool b;
+
+    arm_idreg_field_read(cpu, p->base_field, &value);
+
+    switch (p->type) {
+    case ARM_PROP_STRING: {
+        s = g_strdup(arm_arch_val_name(p->base_field, value));
+
+        if (!s) {
+            error_setg(errp, "Property '%s': unknown value %" PRIu64,
+                       name, value);
+            return;
+        }
+        visit_type_str(v, name, &s, errp);
+        g_free(s);
+        break;
+    }
+    case ARM_PROP_BOOLEAN: {
+        b = value != 0;
+        visit_type_bool(v, name, &b, errp);
+        break;
+    }
+    case ARM_PROP_NUMERIC:
+        visit_type_uint64(v, name, &value, errp);
+        break;
+    default:
+        g_assert_not_reached();
+    }
+}
+
+static void arm_fractional_get(ARMCPU *cpu, const ArmCpuPropDesc *p,
+                               Visitor *v, const char *name, Error **errp)
+{
+    uint64_t base_val, frac_val;
+    const ArmFracVal *val;
+    char *s;
+
+    arm_idreg_field_read(cpu, p->base_field, &base_val);
+    arm_idreg_field_read(cpu, p->frac_field, &frac_val);
+
+    for (val = p->vals; val->name; val++) {
+        if (val->base_val == base_val && val->frac_val == frac_val) {
+            s = g_strdup(val->name);
+            visit_type_str(v, name, &s, errp);
+            g_free(s);
+            return;
+        }
+    }
+
+    error_setg(errp,
+               "Property '%s': unknown fractional value %" PRIu64
+               ".%" PRIu64, name, base_val, frac_val);
+}
+
+static void arm_cpu_prop_get(Object *obj, Visitor *v, const char *name,
+                             void *opaque, Error **errp)
+{
+    ARMCPU *cpu = ARM_CPU(obj);
+    const ArmCpuPropDesc *p = arm_find_prop(name);
+
+    if (!p) {
+        error_setg(errp, "Property %s not found", name);
+        return;
+    }
+
+    switch (p->type) {
+    case ARM_PROP_STRING:
+    case ARM_PROP_BOOLEAN:
+    case ARM_PROP_NUMERIC:
+        arm_single_field_get(cpu, p, v, name, errp);
+        break;
+    case ARM_PROP_FRACTIONAL:
+        arm_fractional_get(cpu, p, v, name, errp);
+        break;
+    }
+}
+
+static void arm_single_field_set(ARMCPU *cpu, const ArmCpuPropDesc *p,
+                                 Visitor *v, const char *name, Error **errp)
+{
+    uint64_t value;
+    char *str = NULL;
+    bool b;
+
+    switch (p->type) {
+    case ARM_PROP_STRING: {
+
+        if (!visit_type_str(v, name, &str, errp)) {
+            return;
+        }
+        if (!arm_arch_val_from_name(p->base_field, str, &value)) {
+            error_setg(errp, "Property '%s': invalid value '%s'", name, str);
+            g_free(str);
+            return;
+        }
+        g_free(str);
+        break;
+    }
+    case ARM_PROP_BOOLEAN: {
+
+        if (!visit_type_bool(v, name, &b, errp)) {
+            return;
+        }
+        value = b ? 1 : 0;
+        break;
+    }
+    case ARM_PROP_NUMERIC:
+        if (!visit_type_uint64(v, name, &value, errp)) {
+            return;
+        }
+        break;
+    default:
+        g_assert_not_reached();
+    }
+
+    if (!arm_idreg_field_write(cpu, p->base_field, value, errp)) {
+        error_prepend(errp, "Property '%s': ", name);
+    }
+}
+
+static void arm_fractional_set(ARMCPU *cpu, const ArmCpuPropDesc *p,
+                               Visitor *v, const char *name, Error **errp)
+{
+    char *str = NULL;
+    const ArmFracVal *val;
+
+    if (!visit_type_str(v, name, &str, errp)) {
+        return;
+    }
+
+    for (val = p->vals; val->name; val++) {
+        if (g_str_equal(val->name, str)) {
+            if (!arm_idreg_field_write(cpu, p->base_field,
+                                       val->base_val, errp)) {
+                error_prepend(errp, "Property '%s': ", name);
+                g_free(str);
+                return;
+            }
+            if (!arm_idreg_field_write(cpu, p->frac_field,
+                                       val->frac_val, errp)) {
+                error_prepend(errp, "Property '%s': ", name);
+            }
+            g_free(str);
+            return;
+        }
+    }
+
+    error_setg(errp, "Property '%s': invalid fractional value '%s'",
+               name, str);
+    g_free(str);
+}
+
+static void arm_cpu_prop_set(Object *obj, Visitor *v, const char *name,
+                             void *opaque, Error **errp)
+{
+    ARMCPU *cpu = ARM_CPU(obj);
+    const ArmCpuPropDesc *p = arm_find_prop(name);
+
+    if (!p) {
+        error_setg(errp, "Property %s not found", name);
+        return;
+    }
+
+    switch (p->type) {
+    case ARM_PROP_STRING:
+    case ARM_PROP_BOOLEAN:
+    case ARM_PROP_NUMERIC:
+        arm_single_field_set(cpu, p, v, name, errp);
+        break;
+    case ARM_PROP_FRACTIONAL:
+        arm_fractional_set(cpu, p, v, name, errp);
+        break;
+    }
+}
+
+void arm_add_cpu_props(Object *obj)
+{
+    const char *type;
+    const ArmCpuPropDesc *p;
+
+    for (p = arm_cpu_props; p->name; p++) {
+        switch (p->type) {
+        case ARM_PROP_STRING:
+        case ARM_PROP_FRACTIONAL:
+            type = "string";
+            break;
+        case ARM_PROP_BOOLEAN:
+            type = "bool";
+            break;
+        case ARM_PROP_NUMERIC:
+            type = "number";
+            break;
+        default:
+            g_assert_not_reached();
+        }
+        object_property_add(obj, p->name, type,
+                            arm_cpu_prop_get, arm_cpu_prop_set, NULL, NULL);
+    }
+}
target/arm/arm-cpu-props.h +1 -1
index 1dc3786ea9..48f9c46ccb 100644
@@ -32,5 +32,5 @@ typedef struct ArmCpuPropDesc {
     ArmFieldIdx frac_field;
     const ArmFracVal *vals;
 } ArmCpuPropDesc;
-
+void arm_add_cpu_props(Object *obj);
 #endif
target/arm/cpu64.c +2 -1
index a93ad2da5a..0300f8677f 100644
@@ -37,7 +37,7 @@
 #include "hw/core/qdev-properties.h"
 #include "internals.h"
 #include "cpu-features.h"
-
+#include "arm-cpu-props.h"
 /* convert between <register>_IDX and SYS_<register> */
 #define DEF(NAME, OP0, OP1, CRN, CRM, OP2)      \
     [NAME##_IDX] = SYS_##NAME,
@@ -863,6 +863,7 @@ static void aarch64_host_initfn(Object *obj)
     kvm_arm_set_cpreg_mig_tolerances(cpu);
     kvm_arm_set_cpu_features_from_host(cpu);
     aarch64_add_sve_properties(obj);
+    arm_add_cpu_props(obj);
 #elif defined(CONFIG_HVF)
     hvf_arm_set_cpu_features_from_host(cpu);
 #elif defined(CONFIG_WHPX)
Signature · 1 line
2.52.0
#26 lore raw

RFC PATCH 11/13 target/arm: named_cpu_model: introduce named CPU models for selected CPUs

In reply to Shaju Abraham

Introduce a small named-CPU-model layer on top of the field-backed property infrastructure. Each model is a flat table of (name, value) overrides and a parent pointer. At instance-init, the parent chain is walked root-first and every level's properties are applied via QOM, so a child entry overrides its ancestors for the same name.

For example, the grace-v1 named model hierarchy is:

kvm-base-v1     KVM-imposed quirks (chain root)
arm-v8_4-a-v1   ARMv8.4-A architectural mandate
arm-v9_0-a-v1   ARMv9.0-A architectural deltas
neoverse-v2-v1  Neoverse V2
grace-v1        NVIDIA Grace

arm-v8_4-a-v1, arm-v9_0-a-v1:
Only features mandated by the corresponding ARM ARM revision. No optional features.

neoverse-v[12]-v1:
Referrence manual derived feature values for the reference core. Values differ from reference core values based on what was exposed to the guest with -cpu host.

grace-v1:
SoC integration choices (crypto pin, cache hints,
PAuth alg).

model realization logic:
1. arm_idregs_reset_to_defaults(cpu): Reset cpu->isar.idregs[] to the default values.
2. Add all properties to the CPU Object
3. arm_realize_model_chain(obj, model, &error_abort): Walk the parent chain from root first and apply all the properties.

---
 hw/arm/virt.c                   |   8 ++
 target/arm/arm-cpu-models.c     | 214 ++++++++++++++++++++++++++++++++
 target/arm/arm-cpu-models.h     |  43 +++++++
 target/arm/arm-v8_4-a-v1.inc.h  |  22 ++++
 target/arm/arm-v9_0-a-v1.inc.h  |  28 +++++
 target/arm/grace-v1.inc.h       |  17 +++
 target/arm/graviton3-v1.inc.h   |  16 +++
 target/arm/kvm-base-v1.inc.h    |  13 ++
 target/arm/meson.build          |   5 +-
 target/arm/neoverse-v1-v1.inc.h |  64 ++++++++++
 target/arm/neoverse-v2-v1.inc.h |  64 ++++++++++
 11 files changed, 493 insertions(+), 1 deletion(-)
 create mode 100644 target/arm/arm-cpu-models.c
 create mode 100644 target/arm/arm-cpu-models.h
 create mode 100644 target/arm/arm-v8_4-a-v1.inc.h
 create mode 100644 target/arm/arm-v9_0-a-v1.inc.h
 create mode 100644 target/arm/grace-v1.inc.h
 create mode 100644 target/arm/graviton3-v1.inc.h
 create mode 100644 target/arm/kvm-base-v1.inc.h
 create mode 100644 target/arm/neoverse-v1-v1.inc.h
 create mode 100644 target/arm/neoverse-v2-v1.inc.h
hw/arm/virt.c +8 -0
index 10b1954382..bbb5f0a241 100644
@@ -4069,6 +4069,14 @@ static GPtrArray *virt_get_valid_cpu_types(const MachineState *ms)
             g_ptr_array_add(vct, g_strdup(ARM_CPU_TYPE_NAME("host")));
         }
     }
+    if (kvm_enabled() && target_aarch64()) {
+        g_ptr_array_add(vct, g_strdup(ARM_CPU_TYPE_NAME("arm-v8_4-a-v1")));
+        g_ptr_array_add(vct, g_strdup(ARM_CPU_TYPE_NAME("arm-v9_0-a-v1")));
+        g_ptr_array_add(vct, g_strdup(ARM_CPU_TYPE_NAME("neoverse-v1-v1")));
+        g_ptr_array_add(vct, g_strdup(ARM_CPU_TYPE_NAME("neoverse-v2-v1")));
+        g_ptr_array_add(vct, g_strdup(ARM_CPU_TYPE_NAME("grace-v1")));
+        g_ptr_array_add(vct, g_strdup(ARM_CPU_TYPE_NAME("graviton3-v1")));
+    }
     g_ptr_array_add(vct, g_strdup(ARM_CPU_TYPE_NAME("max")));
 
     return vct;
target/arm/arm-cpu-models.c new file +214 -0

214 lines not on this page · raw message

target/arm/arm-cpu-models.h new file +43 -0

43 lines not on this page · raw message

target/arm/arm-v8_4-a-v1.inc.h new file +22 -0
new file mode 100644
index 0000000000..1bad59ba2d
@@ -0,0 +1,22 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+ARM_PROP("feat_CRC32", STR,  "on"),
+ARM_PROP("feat_ATOMIC", STR,  "on"),
+ARM_PROP("feat_HPDS", STR,  "on"),
+ARM_PROP("feat_LO", STR,  "on"),
+
+ARM_PROP("feat_DPB", STR,  "on"),
+ARM_PROP("feat_RAS", STR,  "1.0"),
+ARM_PROP("feat_PAN", STR,  "pan2"),
+ARM_PROP("feat_UAO", STR,  "on"),
+ARM_PROP("feat_CNP", STR,  "on"),
+ARM_PROP("feat_IESB", STR,  "on"),
+
+ARM_PROP("feat_DIT", STR,  "on"),
+ARM_PROP("feat_DBG", STR,  "v8p4"),
+ARM_PROP("feat_PMU", STR,  "v3p4"),
+ARM_PROP("feat_TS", STR,  "flagm"),
+ARM_PROP("feat_LRCPC", STR,  "lrcpc2"),
+ARM_PROP("feat_AT", STR,  "on"),
+ARM_PROP("hw_prop_IDS", STR,  "0x18"),
+
+ARM_PROP_END,
target/arm/arm-v9_0-a-v1.inc.h new file +28 -0
new file mode 100644
index 0000000000..5ebe728133
@@ -0,0 +1,28 @@
+
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+ARM_PROP("feat_BT", STR, "on"),
+ARM_PROP("feat_CSV2", STR, "1.0"),
+ARM_PROP("feat_CSV3", STR, "on"),
+ARM_PROP("feat_DPB", STR, "dpb2"),
+ARM_PROP("feat_E0PD", STR, "on"),
+ARM_PROP("feat_SB", STR, "on"),
+ARM_PROP("feat_SPECRES", STR, "on"),
+ARM_PROP("feat_SSBS", STR, "ssbs2"),
+
+ARM_PROP("feat_DoubleLock", STR, "off"),
+ARM_PROP("feat_FP", STR, "on"),
+ARM_PROP("feat_AdvSIMD", STR, "on"),
+ARM_PROP("feat_TS", STR, "flagm2"),
+ARM_PROP("feat_FRINTTS", STR, "on"),
+ARM_PROP("feat_RDM", STR, "on"),
+ARM_PROP("feat_DP", STR, "on"),
+ARM_PROP("feat_FHM", STR, "on"),
+ARM_PROP("feat_FCMA", STR, "on"),
+ARM_PROP("feat_JSCVT", STR, "on"),
+
+ARM_PROP("feat_SVE", STR, "on"),
+ARM_PROP("feat_SEL2", STR, "on"),
+ARM_PROP("feat_VH", STR, "on"),
+ARM_PROP("feat_XNX", STR, "on"),
+
+ARM_PROP_END,
target/arm/grace-v1.inc.h new file +17 -0
new file mode 100644
index 0000000000..048ebb993d
@@ -0,0 +1,17 @@
+
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+ARM_PROP("cpu_revision", NUM, 0x0),
+
+ARM_PROP("feat_AES", STR, "pmull"),
+ARM_PROP("feat_SHA1", STR, "on"),
+ARM_PROP("feat_SHA2", STR, "sha512"),
+ARM_PROP("feat_SHA3", STR, "on"),
+ARM_PROP("feat_SM3", STR, "on"),
+ARM_PROP("feat_SM4", STR, "on"),
+
+ARM_PROP("hw_prop_IDC", BOOL, true),
+ARM_PROP("hw_prop_DIC", BOOL, true),
+
+ARM_PROP("cpu_revidr", NUM, 1),
+
+ARM_PROP_END,
target/arm/graviton3-v1.inc.h new file +16 -0
new file mode 100644
index 0000000000..9538c3e539
@@ -0,0 +1,16 @@
+
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+ARM_PROP("feat_AES", STR, "pmull"),
+ARM_PROP("feat_SHA1", STR, "on"),
+ARM_PROP("feat_SHA2", STR, "sha512"),
+ARM_PROP("feat_SHA3", STR, "on"),
+ARM_PROP("feat_SM3", STR, "on"),
+ARM_PROP("feat_SM4", STR, "on"),
+ARM_PROP("feat_RNDR", STR, "on"),
+
+ARM_PROP("hw_prop_IDC", BOOL, true),
+ARM_PROP("hw_prop_DIC", BOOL, true),
+
+ARM_PROP("cpu_revidr", NUM, 1),
+
+ARM_PROP_END,
target/arm/kvm-base-v1.inc.h new file +13 -0
new file mode 100644
index 0000000000..e0bae90629
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+ARM_PROP("el0_mode", STR, "aarch64"),
+ARM_PROP("el1_mode", STR, "aarch64"),
+ARM_PROP("el2_mode", STR, "off"),
+ARM_PROP("el3_mode", STR, "off"),
+ARM_PROP("feat_GIC", STR, "on"),
+ARM_PROP("feat_AMU", STR, "off"),
+ARM_PROP("feat_MPAM", STR, "0.0"),
+ARM_PROP("feat_NV", STR, "0.0"),
+ARM_PROP("feat_MTE_FRAC", STR, "async"),
+ARM_PROP("hw_prop_CCIDX", STR, "32"),
+
+ARM_PROP_END,
target/arm/meson.build +4 -1
index 01b1e91a1c..79a22eec3f 100644
@@ -22,7 +22,10 @@ arm_common_system_ss.add(files(
   'arm-qmp-cmds.c',
   'cpu-idregs.c',
 ))
-arm_system_ss.add(when: 'CONFIG_KVM', if_true: files('hyp_gdbstub.c', 'kvm.c'))
+arm_system_ss.add(when: 'CONFIG_KVM',
+                  if_true: files('arm-cpu-models.c',
+                                 'hyp_gdbstub.c',
+                                 'kvm.c'))
 arm_system_ss.add(when: 'CONFIG_HVF', if_true: files('hyp_gdbstub.c'))
 
 arm_user_ss.add(files('cpu.c'))
target/arm/neoverse-v1-v1.inc.h new file +64 -0

64 lines not on this page · raw message

target/arm/neoverse-v2-v1.inc.h new file +64 -0

64 lines not on this page · raw message

Signature · 1 line
2.52.0
#27 lore raw

RFC PATCH 12/13 target/arm: named_cpu_model: writeback modified ID registers to KVM

In reply to Shaju Abraham

Writeback modified cpu->isar.idregs[] to KVM after the model is realized. Warn if modified bits are not writable by KVM. To facilitate this, add writable_mask to ArmIdReg struct and populate it from KVM_ARM_GET_REG_WRITABLE_MASKS during scratch VM creation.

---
 target/arm/cpu-idregs.c |   1 +
 target/arm/cpu-idregs.h |   1 +
 target/arm/kvm.c        | 160 +++++++++++++++++++++++++++++++++++++++-
 target/arm/trace-events |   1 +
 4 files changed, 162 insertions(+), 1 deletion(-)
target/arm/cpu-idregs.c +1 -0
index 5ffdeb5f21..e8988b7392 100644
@@ -68,6 +68,7 @@
         .name = #reg, \
         .fields = reg##_fields, \
         .fields_count = ARRAY_SIZE(reg##_fields), \
+        .writable_mask = 0, \
     },
 
 ArmIdReg arm_idregs[NUM_ID_IDX] = {
target/arm/cpu-idregs.h +1 -0
index 0127bc0a95..eb0d8a1280 100644
@@ -37,6 +37,7 @@ typedef struct ArmIdReg {
     const char *name;
     struct ArmIdRegField *fields;
     uint32_t fields_count;
+    uint64_t writable_mask;
 } ArmIdReg;
 
 /* Map short register names to canonical _EL1/_EL0 IDX values */
target/arm/kvm.c +159 -1

202 lines not on this page · raw message

target/arm/trace-events +1 -0
index 8502fb3265..975236b24f 100644
@@ -13,6 +13,7 @@ arm_gt_update_irq(int timer, int irqstate) "gt_update_irq: timer %d irqstate %d"
 
 # kvm.c
 kvm_arm_fixup_msi_route(uint64_t iova, uint64_t gpa) "MSI iova = 0x%"PRIx64" is translated into 0x%"PRIx64
+kvm_arm_writeback_idreg(const char *name, uint64_t previous, uint64_t desired) "%s overwrite 0x%"PRIx64" with 0x%"PRIx64
 
 # cpu.c
 arm_cpu_reset(uint64_t mp_aff) "cpu %" PRIu64
Signature · 1 line
2.52.0
#28 lore raw

RFC PATCH 13/13 target/arm/kvm: enable writable implementation ID registers

In reply to Shaju Abraham

From: Khushit Shah <[email protected]>

Enable KVM_CAP_ARM_WRITABLE_IMP_ID_REGS if the host kernel supports it. This allows QEMU to write implementation-defined ID registers (MIDR, REVIDR) so that named CPU models can present the correct values to the guest instead of inheriting the host's identity.

---
 target/arm/kvm.c | 7 +++++++
 1 file changed, 7 insertions(+)
target/arm/kvm.c +7 -0
index dc64cfbeb6..288b5ebe85 100644
@@ -711,6 +711,13 @@ int kvm_arch_init(MachineState *ms, KVMState *s)
         }
     }
 
+    if (kvm_check_extension(s, KVM_CAP_ARM_WRITABLE_IMP_ID_REGS)) {
+        if (kvm_vm_enable_cap(s, KVM_CAP_ARM_WRITABLE_IMP_ID_REGS, 0)) {
+            error_report("Failed to enable "
+                         "KVM_CAP_ARM_WRITABLE_IMP_ID_REGS cap");
+        }
+    }
+
     if (s->kvm_eager_split_size) {
         uint32_t sizes;
 
Signature · 1 line
2.52.0
#29 lore raw
In reply to Shaju Abraham

Hi Shaju,

Quoted 19 lines · Shaju Abraham

Hi All,

This RFC introduces "named" CPU models for ARM64 KVM guests. This is foundational for cross-host live migration and management-stack control over individual CPU features exposed to the guest.

TL;DR Examples:
# Boot with Grace CPU model
qemu-system-aarch64 -cpu grace-v1 -machine virt,accel=kvm ...

# Grace with a feature disabled qemu-system-aarch64 -cpu grace-v1,feat_SHA1=off ...

# Host passthrough with individual feature control qemu-system-aarch64 -cpu host,feat_AES=aes ...

# Neoverse v2 on Grace.
qemu-system-aarch64 -cpu neoverse-v2-v1

Quoted 8 lines

# Migration from Grace to Graviton3 (TBD)
qemu-system-aarch64 -cpu neoverse-v1-v1 ...

Relationship with Auger/Huck's customizable host model [1]:
We have been working on this series in parallel with [1]. Eric Auger and Cornelia Huck's series [1] exposes raw SYSREG_<REG>_<FIELD> uint64 properties on -cpu host, providing the essential low-level knobs for ID register customization. This RFC builds on the same KVM capability

Please find some comments/questions below.

Quoted 4 lines

and can be layered on top of [1]:
- Human-readable property names: feat_AES=pmull instead of SYSREG_ID_AA64ISAR0_EL1_AES=2, with arch-defined named values validated at set time.

From what I understand what you call feature here refers to an ARM64_FTR_BITS definition in kernel arch/arm64/kernel/cpufeatures.c. Named string values, safe policy and safe value are all extracted from the kernel implementation and do not stem from the ARM ARM itself.

If the named vcpu models anyway use hardcoded values I wonder if it is so important to have named string values whereas a comment would do the job in the named vcpu model definition?

From a spec pov I had in mind that a defintion of a FEAT could be much more complex that just 1 field (for instance could be a combination of several of them).

It is not clear to be if you allow the end-user to overwrite a property on top of a named model setting.

Quoted 2 lines

- Default values and forward compatibility: CPU models start from a known-zero baseline rather than the host view, so new fields/registers

[1]

Quoted 4 lines

introduced in future kernels do not silently leak into existing models.
- Named CPU models with hierarchical inheritance: grace-v1,

    neoverse-v2-v1, etc.
Quoted 8 lines

The two series can coexist; this series can be rebased on top of [1].

[1] https://lore.kernel.org/qemu-devel/[email protected]/

Problems with defining "named" CPU models for ARM64 KVM guests:
* Features are not single CPUID bits. They are mostly multi-bit fields encoding version/level instead of just presence. A single field encodes multiple ARM ARM defined features (FEAT_s) at different thresholds.

would be good to provide an example for each challenge. I remember Connie provided some in the past though her KVM forum presentations.

Quoted 4 lines

* KVM does not allow all registers and fields to be modified for a guest. Some fields KVM does not virtualise at all (SME) or only support host values (BRPs, CWG, etc.). This is evolving and differs between kernel versions.

this seems to be contradictory to [1]. Do you have a mix of host inherited values and hardcoded value or do you only have hardcoded values?

Quoted 11 lines

* ARM does not have a single natural granularity for CPU models unlike x86. ARM has architecture, reference core and SoC levels each becoming more granular.
* ARM has dozens of vendors and it will be tricky to maintain models for all of them.
* Previous designs started from the host values and then subtracted undesirable features. This is not forward-compatible; the design should work when a new ID register or field is introduced.

With the above problems in mind, the design has 3 layers:

Quoted 12 lines

1. ARM ID Register Field Table:
- This layer maintains all architecturally defined ID registers and ID register fields. It includes:
* Field name
* Field shift
* Field length
* Safe-value tag: LOWER, HIGHER, HIGHER_OR_ZERO, SIGNED_LOWER, EXACT, ANY
This will be used to validate user-provided values during CPU realization time against the host's value. I.e., if the host only supports "aes", a CPU model that sets "pmull" should be rejected.

why isn't the kernel doing that job already. Setting a value not compatible with the host shall be rejected by the kernel, no?

Quoted 21 lines
		* Default value: The value to which the field is reset. This gives
			CPU models a clean cpu.isar.idregs[] baseline instead of the
			host view provided by the kernel, as in previous designs.
			This also complements the forward-compatibility story. Given
			the "default" values, higher levels need not worry about new
			fields/registers being introduced.
		* Architecturally defined named values like "off", "aes", "pmull",
			etc.
		* These values are derived from the kernel's ftr_bits array and
		  tools/sysreg file.
    E.g:

     IDREG_START(ID_AA64ISAR0)
     IDREG_FIELD_START(ID_AA64ISAR0, AES, 4, 4, LOWER, 0)
     IDREG_FIELD_ARCH_VAL(0b0000, "off")
     IDREG_FIELD_ARCH_VAL(0b0001, "aes")
     IDREG_FIELD_ARCH_VAL(0b0010, "pmull")
     IDREG_FIELD_END(ID_AA64ISAR0, AES)
	 ....
	 IDREG_END(ID_AA64ISAR0)
Quoted 1 line

- This layer is the single source of truth for ARM64 ID registers.

single source of truth extracted from the kernel and not from the spec. What if we discover a bug in ARM64_FTR_BITS chang default or safe value for instance. How does the change propagate to qemu and existing models?

Quoted 1 line

The default values and safe-value tags are manually derived from the

default value, if equal to reset value could be extracted from the spec directly.

Quoted 6 lines

kernel's ftr_bits array. Other boilerplate and arch-defined values are script-generated.

- AArch32 ID registers are added with a single field so they can be zeroed out on hosts that support AArch32.

Quoted 9 lines

- This layer also defines helpers for higher layers to extract and manipulate ID register fields.
* arm_idregs_reset_to_defaults(): Reset all ID registers to their default values.
* arm_idreg_field_read/write(): Read the value of an ID register field.
* arm_arch_val_name/from_name(): Look up the arch-defined name for a numeric field value.
* ...

this is a pity we have not exchanged on this earlier because that code could have been shared instead of rewriting things and resetting all credits.

Quoted 11 lines

- This layer creates the following tables using X-macro expansion:
* arm_idregs[]: Array of ID register descriptors.
* arm_field_locs[]: Array of field location descriptors. (fieldIDx -> registerIndex, fieldIndex)
* ...

- The ArmIdReg struct also includes a writable_mask to track which bits are writable by KVM. This is populated at runtime during scratch VM creation, and is further used to validate that only the writable bits are modified by the CPU model.

this is an interesting idea that could have been also used in previous contributions.

Quoted 9 lines

2. ARM Properties Layer:
A small property layer on top of the ID Register Field table is defined. This series defines two types of properties with plans for one more in the future:
- Single field properties: These represent ARM FEAT_X features that correspond to a single ID register field. Example: feat_AES, feat_SHA2, etc.

Quoted 9 lines

The property name is set as "feat_<FieldName>" and possible values are the arch-defined named values. This can be further categorized into:
* STRING: multi-bit fields (>=2 bits) with arch-defined named values, example: feat_AES, feat_SHA2, etc.
* BOOLEAN: 1-bit fields only (true/false)
example: hw_prop_IDC, hw_prop_DIC, etc.
* NUMERIC: IDREG_ANY fields with no named values (raw integer)
example: hw_prop_BS, hw_prop_DZP, etc.

I just wonder if we need all that complexity if eventually we hardcode values in named vcpu models

Quoted 9 lines

String property values are validated against the arch-defined named values.

ID register fields that are not covered by single field properties are also exposed as a property named hw_prop_FieldName. These are usually implementation-defined values like cache geometry, debug counter widths, etc. (CTR_EL0.*, DCZID_EL0.*, etc.)
Example: hw_prop_BS, hw_prop_DZP, etc.

how do you discriminate between those and field_ props? Again do we need that complexity?

Quoted 34 lines

Single field properties are defined as:

ARM_PROP("prop_name", type, reg, field) Example:
ARM_PROP("feat_AES", STRING, ID_AA64ISAR0, AES)

* Validation based on safe-value tags is yet to be implemented.

- Fractional properties: These represent ARM FEAT_X features that use two fields (base + frac) across registers. Example: feat_CSV2, feat_MPAM, etc.

The property name is set as "feat_<BaseFieldName>" and possible values are the arch-defined string values like "0.0", "1.0", "1.1", etc.

Fractional properties are defined as:
ARM_FRACTIONAL_PROP("prop_name", base_reg, base_field, frac_reg, frac_field) Example:
ARM_FRACTIONAL_PROP("feat_CSV2", ID_AA64PFR0, CSV2, ID_AA64PFR1, CSV2_FRAC)

When a fractional property is set, both the base field and frac field values are set to the corresponding values.
E.g: feat_CSV2=1.1 will set ID_AA64PFR0.CSV2=1 and ID_AA64PFR1.CSV2_FRAC=1.

- Composite properties (planned for v2):
These will act as master boolean switches that control a list of fields. Example: pauth, sve, etc. Setting sve=on with a named model will set all the SVE-related fields (ID_AA64ZFR0_EL1.*) along with sveNNN vector-length. Similarly, setting pauth=on will set APA, GPA, API, GPA3, GPI, GPA3 fields based on the named model.

Quoted 5 lines

- cpu_revision, cpu_partnum, etc. properties are introduced to expose MIDR, REVIDR, AIDR fields.

Exceptions to the property naming are made for ID_AA64PFR0_EL1.ELx fields, which are named elx_mode.

yet another naming exception.

Quoted 3 lines

This series defines over 130 single field properties plus 4 fractional properties. All properties work with -cpu host also.

Similary as with the host "custom" series, one needs to address collision between legacy cpu properties and low level ones too.

Quoted 14 lines

All properties change the cpu.isar.idregs[] values which are later written back to KVM at the end of kvm_arch_init_vcpu().

* The arch-defined named values and property names can be iterated until they make sense.

3. ARM CPU Model Hierarchy:

A small named model layer is defined on top of the properties. An ARM named CPU model defines a list of property values and a parent model. A child model naturally inherits all the properties from its parent and can override them when needed.

Quoted 8 lines

The initial model hierarchy shipped here is:

    kvm-base-v1                  KVM-imposed quirks
      arm-v8_4-a-v1              ARMv8.4-A architectural mandate
          neoverse-v1-v1         Neoverse V1

graviton3-v1 AWS Graviton3
arm-v9_0-a-v1 ARMv9.0-A architectural deltas on top of ARM-v8_4-a-v1
neoverse-v2-v1 Neoverse V2
grace-v1 NVIDIA Grace

Do you have a strategy for named model validation, besides code review. At least each vcpu named model shall be introduced in separate patch, overrides clearly explained and links to the reference spec shall be precisely given for review.

Quoted 7 lines

(kvm-base-v1 and arm-vX are not meant to be realizable unless the
user provides values for implementation-defined fields)

So for example, grace-v1 defines Crypto fields and CTR_EL0.IDC/DIC on top of neoverse-v2-v1, which leaves those fields vendor-configurable.

Quoted 7 lines

The hierarchy reflects a deliberate trade-off:
- Architecture-level models (arm-v8_4-a-v1) maximize migration compatibility but lack implementation-defined values.
- Reference-core models (neoverse-v2-v1) enable migration across SoCs sharing the same core design.
- SoC models (grace-v1) expose the full hardware feature set but limit migration to hosts with the same SoC.

What kind of migration did you exercise up to now?

Quoted 10 lines

At model realization time,
1. a clean slate of cpu.isar.idregs[] is created using arm_idregs_reset_to_defaults().
2. Then, a model's full parent-chain is walked and all properties are applied in order from parent to child.
3. Finally, kvm_arm_writeback_idregs() compares the model's desired ID-register values against the host-provided cpreg snapshot and writes back the writable bits, warning on any non-writable difference.

Quoted 6 lines

Models will follow a monotonic versioning convention (grace-v1, grace-v2, ...) mirroring x86's scheme.

* Please take the CPU model property values with a grain of salt. They are added based on what the guest-visible values are with "host" model on available hardware.

I don't catch the above statement.

Quoted 10 lines

Benefits of this design:
- General benefits that come with properties and named CPU models, like cross-host live migration, management-stack control over feature exposure, etc.
- Forward compatibility: when a new ID register or field is introduced, CPU models need not change; during realization they will be populated with the default values. Only ID register/field information needs to be added to the field table.
- As CPU models are hierarchical, defining a new model is much easier.

I like the hierarchical approach but to be honest, at the moment, I miss knowledge on whether it safely applies. I agree that named vcpu models are the end target goal while [1] is rather an intermediate step that was paving the way for it. I rather saw [1] as a tool box for enhaving the host model and understanding issues when migrating. I wish we could share the foundations instead of having totally separate contributions.

Quoted 1 line

- The property names and values are self-documenting.

not really sorry (because it does not match the spec). I don't think we can ask the end-user to read the kernel code.

Quoted 9 lines

NOTE: ~2200 of the ~3300 added lines are declarative (field table, model definitions, properties, etc.)

Tested with KVM on an NVIDIA Grace host.

Relationship with existing code base:
- It does not change any TCG-based code paths.
- For KVM host passthrough it just adds property support.

with hardcoded reset values, correct? Instead of host retrived values?

Quoted 1 line

- Does not change any existing properties or other code paths.

yes but if it words along with legacy options, you share our concern to coexist with them

Quoted 1 line

- Can layer on top of the SYSREG_ property series [1].

but in that case why don't you simply reuse it to build the named vcpu model. I don't say the previous properties are the ideal solution but I am not sure the mix or heterogenously named ones introduced here + value strings retrieved from the kernel are better. At least the SYSREG ones matched the spec with raw values, which bring simplicity in the code. And since the end user shall be so much involved in provided extra SYSREG values himself on top of named vcpu models, ...

Quoted 3 lines

Planned Follow-ups:
- Composite properties with handling of sve, pauth for named models.

yes this is needed and I am currently working on this on [1]

Quoted 5 lines

- CLIDR_EL1 and CCSIDR_EL1 handling.
- Safe-value based validation logic.
- QMP commands like query-cpu-model-expansion are not hooked yet. Blockers and supported values (calculated using safe-value tags and runtime KVM writable masks) will be reported through them.

Quoted 8 lines

E.g. libvirt could report:
<property name='feat_AES' type='string' value='pmull'
supports='off,aes,pmull'/>
and:
<cpu type='kvm' name='nvidia-grace-v1'
typename='arm-nvidia-grace-v1-arm-cpu' usable='no'>
<blocker name='feat_AES'/>
</cpu>

adding Andrea for libvirt inputs

Thanks

Eric

Quoted 95 lines

- DCZID_EL0 handling.

Out of Scope:
- Inter-feature dependencies like FP <--> AdvSIMD, SM3 <--> SM4, etc.

Appendix: KVM Non-writable fields (kernel 6.18):

These fields pass the host value through to the guest unmodified on 6.18; trying to override them get a warning from kvm_arm_writeback_idregs() and the slot retains the host value:

   #   Field                       #   Field
  ---  -----------------------    ---  -----------------------
   1   ID_AA64PFR0.FP              10  ID_AA64MMFR2.NV
   2   ID_AA64PFR0.AdvSIMD         11  ID_AA64MMFR2.CCIDX
   3   ID_AA64MMFR0.ASIDBITS       12  ID_AA64MMFR4.E2H0
   4   ID_AA64MMFR1.XNX            13  ID_AA64DFR0.CTX_CMPs
   5   ID_AA64MMFR1.VH             14  ID_AA64DFR0.BRPs
   6   ID_AA64MMFR1.VMIDBits       15  CTR_EL0.CWG
   7   ID_AA64MMFR2.EVT            16  CTR_EL0.ERG
   8   ID_AA64MMFR2.FWB            17  DCZID_EL0.*
   9   ID_AA64MMFR2.IDS

This list shifts with the kernel version. The runtime probe via KVM_ARM_GET_REG_WRITABLE_MASKS is authoritative.

Warm Regards,
Shaju, Khushit

Khushit Shah (1):
target/arm/kvm: enable writable implementation ID registers

Shaju Abraham (12):
target/arm: named_cpu_model: define containers for ID registers and
fields
target/arm: named_cpu_model: Add ID Register Fields target/arm: named_cpu_model: initialise additional sysregs target/arm: named_cpu_model: generate tables for Arm64 ID registers
and fields
target/arm: named_cpu_model: replace FIELD macro with IDREG_FIELD target/arm: named_cpu_model: data-structures required for the ARM
property layer.
target/arm: named_cpu_model: define ARM properties target/arm: named_cpu_model: generate arm_cpu_props[] table target/arm: named_cpu_model: Add ID register field helper functions target/arm: named_cpu_model: Register Arm64 properties for host model target/arm: named_cpu_model: introduce named CPU models for selected
CPUs
target/arm: named_cpu_model: writeback modified ID registers to KVM

 hw/arm/virt.c                   |    8 +
 target/arm/arm-cpu-frac.inc.h   |   34 +
 target/arm/arm-cpu-models.c     |  214 ++++
 target/arm/arm-cpu-models.h     |   43 +
 target/arm/arm-cpu-props.c      |  259 +++++
 target/arm/arm-cpu-props.h      |   36 +
 target/arm/arm-cpu-props.inc.h  |  180 ++++
 target/arm/arm-v8_4-a-v1.inc.h  |   22 +
 target/arm/arm-v9_0-a-v1.inc.h  |   28 +
 target/arm/cpu-features.h       |  232 +----
 target/arm/cpu-idregs.c         |  232 +++++
 target/arm/cpu-idregs.h         |  132 +++
 target/arm/cpu-idregs.h.inc     | 1724 +++++++++++++++++++++++++++++++
 target/arm/cpu-sysregs.h.inc    |    5 +
 target/arm/cpu64.c              |    3 +-
 target/arm/grace-v1.inc.h       |   17 +
 target/arm/graviton3-v1.inc.h   |   16 +
 target/arm/kvm-base-v1.inc.h    |   13 +
 target/arm/kvm.c                |  167 ++-
 target/arm/meson.build          |    7 +-
 target/arm/neoverse-v1-v1.inc.h |   64 ++
 target/arm/neoverse-v2-v1.inc.h |   64 ++
 target/arm/trace-events         |    1 +
 23 files changed, 3284 insertions(+), 217 deletions(-)
 create mode 100644 target/arm/arm-cpu-frac.inc.h
 create mode 100644 target/arm/arm-cpu-models.c
 create mode 100644 target/arm/arm-cpu-models.h
 create mode 100644 target/arm/arm-cpu-props.c
 create mode 100644 target/arm/arm-cpu-props.h
 create mode 100644 target/arm/arm-cpu-props.inc.h
 create mode 100644 target/arm/arm-v8_4-a-v1.inc.h
 create mode 100644 target/arm/arm-v9_0-a-v1.inc.h
 create mode 100644 target/arm/cpu-idregs.c
 create mode 100644 target/arm/cpu-idregs.h
 create mode 100644 target/arm/cpu-idregs.h.inc
 create mode 100644 target/arm/grace-v1.inc.h
 create mode 100644 target/arm/graviton3-v1.inc.h
 create mode 100644 target/arm/kvm-base-v1.inc.h
 create mode 100644 target/arm/neoverse-v1-v1.inc.h
 create mode 100644 target/arm/neoverse-v2-v1.inc.h

--
2.52.0

#30 lore raw
Quoted 47 lines · Shaju Abraham

Get Outlook for Mac
From: Eric Auger <[email protected]>
Date: Monday, 18 May 2026 at 3:57 PM
To: Shaju Abraham <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, Andrea Bolognani <[email protected]>
Subject: Re: [RFC PATCH v1 00/13] named CPU models for ARM64 on KVM

!-------------------------------------------------------------------|
CAUTION: External Email

|-------------------------------------------------------------------!

Hi Shaju,˝

Quoted 19 lines · Shaju Abraham

Hi All,

This RFC introduces "named" CPU models for ARM64 KVM guests. This is foundational for cross-host live migration and management-stack control over individual CPU features exposed to the guest.

TL;DR Examples:
# Boot with Grace CPU model
qemu-system-aarch64 -cpu grace-v1 -machine virt,accel=kvm ...

# Grace with a feature disabled qemu-system-aarch64 -cpu grace-v1,feat_SHA1=off ...

# Host passthrough with individual feature control qemu-system-aarch64 -cpu host,feat_AES=aes ...

# Neoverse v2 on Grace.
qemu-system-aarch64 -cpu neoverse-v2-v1

Quoted 8 lines

# Migration from Grace to Graviton3 (TBD)
qemu-system-aarch64 -cpu neoverse-v1-v1 ...

Relationship with Auger/Huck's customizable host model [1]:
We have been working on this series in parallel with [1]. Eric Auger and Cornelia Huck's series [1] exposes raw SYSREG_<REG>_<FIELD> uint64 properties on -cpu host, providing the essential low-level knobs for ID register customization. This RFC builds on the same KVM capability

Please find some comments/questions below.

Quoted 8 lines
Quoted 4 lines

and can be layered on top of [1]:
- Human-readable property names: feat_AES=pmull instead of SYSREG_ID_AA64ISAR0_EL1_AES=2, with arch-defined named values validated at set time.

From what I understand what you call feature here refers to an ARM64_FTR_BITS definition in kernel arch/arm64/kernel/cpufeatures.c. Named string values, safe policy and safe value are all extracted from the kernel implementation and do not stem from the ARM ARM itself.

Correct, a CPU feature (that we talk about) is not the same as ARM ARM defined FEAT_*. As you say below, they really are much more complex to model. But sve, pauth defined by QEMU, are also not an ARM ARM defined FEAT. Because of the complexities of ARM ARM FEAT_s, we decided to go with ID register field-based properties with abstractions like (fractional and composites) on top.

Yes, value names, safe policy, and safe value are taken from the kernel. But in most cases, value names already correlate with ARM ARM.

For example,ID_AA64ISAR1_EL1.LS64:

ARM ARM says:
FEAT_LS64 implements the functionality identified by 0b0001. FEAT_LS64_V implements the functionality identified by 0b0010. FEAT_LS64_ACCDATA implements the functionality identified by 0b0011. FEAT_LS64WB implements the functionality identified by 0b0100.

Named values in cpu-idregs.h.inc:
IDREG_FIELD_START(ID_AA64ISAR1, LS64, 60, 4, EXACT, 0) IDREG_FIELD_ARCH_VAL(0b0000, "off") IDREG_FIELD_ARCH_VAL(0b0001, "ls64") IDREG_FIELD_ARCH_VAL(0b0010, "ls64_v") IDREG_FIELD_ARCH_VAL(0b0011, "ls64_accdata") IDREG_FIELD_ARCH_VAL(0b0100, "ls64wb") IDREG_FIELD_END(ID_AA64ISAR1, LS64)

Values names are: lowered feat names with FEAT_ removed.

For “on”/“off” toggle features: for example (XS, just below LS64):
We have:
IDREG_FIELD_START(ID_AA64ISAR1, XS, 56, 4, LOWER, 0) IDREG_FIELD_ARCH_VAL(0b0000, "off") IDREG_FIELD_ARCH_VAL(0b0001, "on") IDREG_FIELD_END(ID_AA64ISAR1, XS)

ARM ARM says:
FEAT_XS implements the functionality identified by 0b0001.

There may be a few value names that do not make sense right now, but that does not de-merit the idea that perfectly works for most fields.

Regarding the safe-value tag, I feel that it is the one thing that must come from the kernel; in the end, KVM is gonna validate based on that. If the static file feels problematic, another option is to introduce a new KVM ioctl. We are fine with both.

Regarding default values, I do not see any reset values populated in AARCHMRS_OPENSOURCE_A_profile_FAT-2026-03/Registers.json, I may be missing something here. Is there some other place where we can find ARM ARM defined reset values?

Quoted 3 lines

If the named vcpu models anyway use hardcoded values I wonder if it is so important to have named string values whereas a comment would do the job in the named vcpu model definition?

While true, for a named model, numerical field values will suffice as well. It’s just a way of representation. But for end users, I will argue, named values are more user-friendly.

On x86, the user does not modify a specific cpuid leaf to turn a feature on or off. They have assigned a name to each leaf in the spec. Our value names in most cases already make perfect sense, as mentioned above.

Quoted 3 lines

From a spec pov I had in mind that a defintion of a FEAT could be much more complex that just 1 field (for instance could be a combination of several of them)

Agreed. Hence, the ID register field-based properties.

Quoted 2 lines

It is not clear to be if you allow the end-user to overwrite a property on top of a named model setting.

Yes, the end user can change the property on top of the named model as illustrated in the examples.

Quoted 9 lines
Quoted 2 lines

- Default values and forward compatibility: CPU models start from a known-zero baseline rather than the host view, so new fields/registers

[1]

Quoted 6 lines

introduced in future kernels do not silently leak into existing models.
- Named CPU models with hierarchical inheritance: grace-v1, neoverse-v2-v1, etc.

The two series can coexist; this series can be rebased on top of [1].

Quoted 8 lines
Quoted 6 lines

[1] https://urldefense.proofpoint.com/v2/url?u=https-3A__lore.kernel.org_qemu-2Ddevel_20260503073541.790215-2D1-2Deric.auger-40redhat.com_&d=DwIDaQ&c=s883GpUCOChKOHiocYtGcg&r=sY-XeNqcuy_ruBQ9T7A2LmG6ktyYXXSxRB1ljkxMepI&m=fpNKdg99IJhj_lpxANCw1YCGZfWRAyz1YWNycq_dH0Rdg8U46NwjIJ3BvFyYb-e7&s=xzjnJMwOvSYbQjuaej-yNezaOn0DWWfAJho6IG_AEto&e=

Problems with defining "named" CPU models for ARM64 KVM guests:
* Features are not single CPUID bits. They are mostly multi-bit fields encoding version/level instead of just presence. A single field encodes multiple ARM ARM defined features (FEAT_s) at different thresholds.

would be good to provide an example for each challenge. I remember Connie provided some in the past though her KVM forum presentations.

Acked. Will add in v2.

Quoted 6 lines
Quoted 4 lines

* KVM does not allow all registers and fields to be modified for a guest. Some fields KVM does not virtualise at all (SME) or only support host values (BRPs, CWG, etc.). This is evolving and differs between kernel versions.

this seems to be contradictory to [1]. Do you have a mix of host inherited values and hardcoded value or do you only have hardcoded values?

A named model will not be realizable on a given host if any of the above non-writable fields differ between the host and the named model. We realize the named model fully from a zeroed-out cpu->isar.idregs[] (no host features) exposed. A model is also not realizable on a host if it over-promises features that are not actually available on the host (the need for safe-value tags).

Quoted 23 lines
Quoted 11 lines

* ARM does not have a single natural granularity for CPU models unlike x86. ARM has architecture, reference core and SoC levels each becoming more granular.
* ARM has dozens of vendors and it will be tricky to maintain models for all of them.
* Previous designs started from the host values and then subtracted undesirable features. This is not forward-compatible; the design should work when a new ID register or field is introduced.

With the above problems in mind, the design has 3 layers:

Quoted 12 lines

1. ARM ID Register Field Table:
- This layer maintains all architecturally defined ID registers and ID register fields. It includes:
* Field name
* Field shift
* Field length
* Safe-value tag: LOWER, HIGHER, HIGHER_OR_ZERO, SIGNED_LOWER, EXACT, ANY
This will be used to validate user-provided values during CPU realization time against the host's value. I.e., if the host only supports "aes", a CPU model that sets "pmull" should be rejected.

Quoted 2 lines

why isn't the kernel doing that job already. Setting a value not compatible with the host shall be rejected by the kernel, no?

KVM will reject. But how will management stack know which values are supported? x86 is simpler; a feature is a single-bit toggle. All management stacks infer that if the value of a property is true, false is supported. And, for -cpu host if the property value is false, the feature is not supported on the host.

On ARM, we don’t have that luxury; the management stack does not know which values are valid for a property. Ambiguity is:
1. How will management stack even know that a property is writable/modifiable?
2. For a 4-bit nibble, are all 16 values valid if it is writable?
a) Lower values than the host?
b) Higher values than the host? etc.

Having a safe value tag in QEMU allows us to provide useful information like named model ‘blockers’/‘unsupported-features’ and supported property values.

I feel the above should also be present for the customizable host model series [1], providing valid values along with properties is much more useful for management stack.

Quoted 21 lines
Quoted 21 lines

* Default value: The value to which the field is reset. This gives CPU models a clean cpu.isar.idregs[] baseline instead of the host view provided by the kernel, as in previous designs. This also complements the forward-compatibility story. Given the "default" values, higher levels need not worry about new fields/registers being introduced.
* Architecturally defined named values like "off", "aes", "pmull", etc.
* These values are derived from the kernel's ftr_bits array and tools/sysreg file.
E.g:

    IDREG_START(ID_AA64ISAR0)
    IDREG_FIELD_START(ID_AA64ISAR0, AES, 4, 4, LOWER, 0)
    IDREG_FIELD_ARCH_VAL(0b0000, "off")
    IDREG_FIELD_ARCH_VAL(0b0001, "aes")
    IDREG_FIELD_ARCH_VAL(0b0010, "pmull")
    IDREG_FIELD_END(ID_AA64ISAR0, AES)
       ....
       IDREG_END(ID_AA64ISAR0)
Quoted 4 lines
Quoted 1 line

- This layer is the single source of truth for ARM64 ID registers.

single source of truth extracted from the kernel and not from the spec. What if we discover a bug in ARM64_FTR_BITS chang default or safe value for instance. How does the change propagate to qemu and existing models?

Relaxation of safe value tag is safe, (EXACT -> LOWER -> ANY). Change in default value should not happen; instead, that should be handled with the “kvm-base” model, which is defined for KVM quirks. Same implications as ARM ARM changes the field’s semantics.

Quoted 3 lines
Quoted 1 line

The default values and safe-value tags are manually derived from the

default value, if equal to reset value could be extracted from the spec directly.

Again, I checked AARCHMRS_OPENSOURCE_A_profile_FAT-2026-03/Registers.json, and the reset values were null. I may be missing something. Is there any other place we can get ARM ARM defined reset values? We can modify the script in [1] to also have default values for named model infra.

Quoted 15 lines
Quoted 6 lines

kernel's ftr_bits array. Other boilerplate and arch-defined values are script-generated.

- AArch32 ID registers are added with a single field so they can be zeroed out on hosts that support AArch32.

Quoted 9 lines

- This layer also defines helpers for higher layers to extract and manipulate ID register fields.
* arm_idregs_reset_to_defaults(): Reset all ID registers to their default values.
* arm_idreg_field_read/write(): Read the value of an ID register field.
* arm_arch_val_name/from_name(): Look up the arch-defined name for a numeric field value.
* ...

Quoted 3 lines

this is a pity we have not exchanged on this earlier because that code could have been shared instead of rewriting things and resetting all credits.

Let’s work together from now on :)

Quoted 7 lines
Quoted 7 lines

- This layer creates the following tables using X-macro expansion:
* arm_idregs[]: Array of ID register descriptors.
* arm_field_locs[]: Array of field location descriptors. (fieldIDx -> registerIndex, fieldIndex)
* ...

Quoted 6 lines
Quoted 4 lines

- The ArmIdReg struct also includes a writable_mask to track which bits are writable by KVM. This is populated at runtime during scratch VM creation, and is further used to validate that only the writable bits are modified by the CPU model.

this is an interesting idea that could have been also used in previous contributions.

Acked.

Quoted 18 lines
Quoted 9 lines

2. ARM Properties Layer:
A small property layer on top of the ID Register Field table is defined. This series defines two types of properties with plans for one more in the future:
- Single field properties: These represent ARM FEAT_X features that correspond to a single ID register field. Example: feat_AES, feat_SHA2, etc.

Quoted 9 lines

The property name is set as "feat_<FieldName>" and possible values are the arch-defined named values. This can be further categorized into:
* STRING: multi-bit fields (>=2 bits) with arch-defined named values, example: feat_AES, feat_SHA2, etc.
* BOOLEAN: 1-bit fields only (true/false)
example: hw_prop_IDC, hw_prop_DIC, etc.
* NUMERIC: IDREG_ANY fields with no named values (raw integer)
example: hw_prop_BS, hw_prop_DZP, etc.

Quoted 2 lines

I just wonder if we need all that complexity if eventually we hardcode values in named vcpu models

Then we are just delegating the complexity to the management stack. For example, without fractional prop, the management stack must know CSV2, CSV2_Frac relation, and not all value combination of <CSV2>.<CSV2_Frac> are valid. Rather than having different management software solving the same problem, we can solve it once in QEMU.

We also have very active plans to hook up cpu-definitions, cpu-model-expansion, and more.

Quoted 11 lines
Quoted 9 lines

String property values are validated against the arch-defined named values.

ID register fields that are not covered by single field properties are also exposed as a property named hw_prop_FieldName. These are usually implementation-defined values like cache geometry, debug counter widths, etc. (CTR_EL0.*, DCZID_EL0.*, etc.)
Example: hw_prop_BS, hw_prop_DZP, etc.

how do you discriminate between those and field_ props? Again do we need that complexity?

Ummm, there is no special code for these props. They are just named differently as no ARM ARM FEAT_ relate to them.

Quoted 34 lines
Quoted 34 lines

Single field properties are defined as:

ARM_PROP("prop_name", type, reg, field) Example:
ARM_PROP("feat_AES", STRING, ID_AA64ISAR0, AES)

* Validation based on safe-value tags is yet to be implemented.

- Fractional properties: These represent ARM FEAT_X features that use two fields (base + frac) across registers. Example: feat_CSV2, feat_MPAM, etc.

The property name is set as "feat_<BaseFieldName>" and possible values are the arch-defined string values like "0.0", "1.0", "1.1", etc.

Fractional properties are defined as:
ARM_FRACTIONAL_PROP("prop_name", base_reg, base_field, frac_reg, frac_field) Example:
ARM_FRACTIONAL_PROP("feat_CSV2", ID_AA64PFR0, CSV2, ID_AA64PFR1, CSV2_FRAC)

When a fractional property is set, both the base field and frac field values are set to the corresponding values.
E.g: feat_CSV2=1.1 will set ID_AA64PFR0.CSV2=1 and ID_AA64PFR1.CSV2_FRAC=1.

- Composite properties (planned for v2):
These will act as master boolean switches that control a list of fields. Example: pauth, sve, etc. Setting sve=on with a named model will set all the SVE-related fields (ID_AA64ZFR0_EL1.*) along with sveNNN vector-length. Similarly, setting pauth=on will set APA, GPA, API, GPA3, GPI, GPA3 fields based on the named model.

Quoted 6 lines
Quoted 5 lines

- cpu_revision, cpu_partnum, etc. properties are introduced to expose MIDR, REVIDR, AIDR fields.

Exceptions to the property naming are made for ID_AA64PFR0_EL1.ELx fields, which are named elx_mode.

yet another naming exception.

A better name is always welcome! We can iterate over both the prop name and the value name.

Quoted 5 lines
Quoted 3 lines

This series defines over 130 single field properties plus 4 fractional properties. All properties work with -cpu host also.

Similary as with the host "custom" series, one needs to address collision between legacy cpu properties and low level ones too.

Agreed, This needs more thoughts. It is not a part of this RFC.

Quoted 22 lines
Quoted 14 lines

All properties change the cpu.isar.idregs[] values which are later written back to KVM at the end of kvm_arch_init_vcpu().

* The arch-defined named values and property names can be iterated until they make sense.

3. ARM CPU Model Hierarchy:

A small named model layer is defined on top of the properties. An ARM named CPU model defines a list of property values and a parent model. A child model naturally inherits all the properties from its parent and can override them when needed.

Quoted 8 lines

The initial model hierarchy shipped here is:

   kvm-base-v1                  KVM-imposed quirks
     arm-v8_4-a-v1              ARMv8.4-A architectural mandate
         neoverse-v1-v1         Neoverse V1

graviton3-v1 AWS Graviton3
arm-v9_0-a-v1 ARMv9.0-A architectural deltas on top of ARM-v8_4-a-v1
neoverse-v2-v1 Neoverse V2
grace-v1 NVIDIA Grace

Quoted 4 lines

Do you have a strategy for named model validation, besides code review. At least each vcpu named model shall be introduced in separate patch, overrides clearly explained and links to the reference spec shall be precisely given for review.

Agreed, each model should be in a separate patch, with overrides and new introductions clearly mentioned/documented with supporting ID register dumps.

Quoted 15 lines
Quoted 7 lines

(kvm-base-v1 and arm-vX are not meant to be realizable unless the user provides values for implementation-defined fields)

So for example, grace-v1 defines Crypto fields and CTR_EL0.IDC/DIC on top of neoverse-v2-v1, which leaves those fields vendor-configurable.

Quoted 7 lines

The hierarchy reflects a deliberate trade-off:
- Architecture-level models (arm-v8_4-a-v1) maximize migration compatibility but lack implementation-defined values.
- Reference-core models (neoverse-v2-v1) enable migration across SoCs sharing the same core design.
- SoC models (grace-v1) expose the full hardware feature set but limit migration to hosts with the same SoC.

Quoted 1 line

What kind of migration did you exercise up to now?

Successful same host migration with named models and migration from grace to graviton3 with neoverse-v1.

Quoted 10 lines
Quoted 10 lines

At model realization time,
1. a clean slate of cpu.isar.idregs[] is created using arm_idregs_reset_to_defaults().
2. Then, a model's full parent-chain is walked and all properties are applied in order from parent to child.
3. Finally, kvm_arm_writeback_idregs() compares the model's desired ID-register values against the host-provided cpreg snapshot and writes back the writable bits, warning on any non-writable difference.

Quoted 7 lines
Quoted 6 lines

Models will follow a monotonic versioning convention (grace-v1, grace-v2, ...) mirroring x86's scheme.

* Please take the CPU model property values with a grain of salt. They are added based on what the guest-visible values are with "host" model on available hardware.

I don't catch the above statement.

They don’t match the exact hardware specs. For example feat_CSV2 is capped at “1.0” by KVM regardless of what the hardware says. On Neoverse-v2, TRM says FEAT_CSV2_2 is implemented (i.e “2.0”)

Quoted 10 lines
Quoted 10 lines

Benefits of this design:
- General benefits that come with properties and named CPU models, like cross-host live migration, management-stack control over feature exposure, etc.
- Forward compatibility: when a new ID register or field is introduced, CPU models need not change; during realization they will be populated with the default values. Only ID register/field information needs to be added to the field table.
- As CPU models are hierarchical, defining a new model is much easier.

Quoted 6 lines

I like the hierarchical approach but to be honest, at the moment, I miss knowledge on whether it safely applies. I agree that named vcpu models are the end target goal while [1] is rather an intermediate step that was paving the way for it. I rather saw [1] as a tool box for enhaving the host model and understanding issues when migrating. I wish we could share the foundations instead of having totally separate contributions.

Definitely, let’s build a common foundation. We need to agree on safe-value tags, default values, and value names. We can build our solution on top of [1], if at least safe-value tags and default values are present.

Quoted 3 lines
Quoted 1 line

- The property names and values are self-documenting.

not really sorry (because it does not match the spec). I don't think we can ask the end-user to read the kernel code.

Acked, We will add appropriate documentation in QEMU.

Quoted 10 lines
Quoted 9 lines

NOTE: ~2200 of the ~3300 added lines are declarative (field table, model definitions, properties, etc.)

Tested with KVM on an NVIDIA Grace host.

Relationship with existing code base:
- It does not change any TCG-based code paths.
- For KVM host passthrough it just adds property support.

with hardcoded reset values, correct? Instead of host retrived values?

Reset values are not used with the -cpu host. Only for the named model realization, reset values are used.

Quoted 3 lines
Quoted 1 line

- Does not change any existing properties or other code paths.

yes but if it words along with legacy options, you share our concern to coexist with them

Yes, it requires some more thoughts.

Quoted 8 lines
Quoted 1 line

- Can layer on top of the SYSREG_ property series [1].

but in that case why don't you simply reuse it to build the named vcpu model. I don't say the previous properties are the ideal solution but I am not sure the mix or heterogenously named ones introduced here + value strings retrieved from the kernel are better. At least the SYSREG ones matched the spec with raw values, which bring simplicity in the code. And since the end user shall be so much involved in provided extra SYSREG values himself on top of named vcpu models, ...

We can build on [1] as long as we have default values and safe-value tags. They are required for the proper model realization and QMP integration.

Quoted 17 lines
Quoted 3 lines

Planned Follow-ups:
- Composite properties with handling of sve, pauth for named models.

yes this is needed and I am currently working on this on [1]

Quoted 5 lines

- CLIDR_EL1 and CCSIDR_EL1 handling.
- Safe-value based validation logic.
- QMP commands like query-cpu-model-expansion are not hooked yet. Blockers and supported values (calculated using safe-value tags and runtime KVM writable masks) will be reported through them.

Quoted 8 lines

E.g. libvirt could report:
<property name='feat_AES' type='string' value='pmull'
supports='off,aes,pmull'/>
and:
<cpu type='kvm' name='nvidia-grace-v1'
typename='arm-nvidia-grace-v1-arm-cpu' usable='no'>
<blocker name='feat_AES'/>
</cpu>

Quoted 5 lines

adding Andrea for libvirt inputs

Thanks

Eric

Warm Regards,
Khushit

#31 lore raw

Hi Khushit,

Quoted 90 lines · Khushit Shah
Quoted 46 lines · Shaju Abraham

Get Outlook for Mac
From: Eric Auger <[email protected]>
Date: Monday, 18 May 2026 at 3:57 PM
To: Shaju Abraham <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, Andrea Bolognani <[email protected]>
Subject: Re: [RFC PATCH v1 00/13] named CPU models for ARM64 on KVM

!-------------------------------------------------------------------|
CAUTION: External Email

|-------------------------------------------------------------------!

Hi Shaju,˝

Quoted 19 lines · Shaju Abraham

Hi All,

This RFC introduces "named" CPU models for ARM64 KVM guests. This is foundational for cross-host live migration and management-stack control over individual CPU features exposed to the guest.

TL;DR Examples:
# Boot with Grace CPU model
qemu-system-aarch64 -cpu grace-v1 -machine virt,accel=kvm ...

# Grace with a feature disabled qemu-system-aarch64 -cpu grace-v1,feat_SHA1=off ...

# Host passthrough with individual feature control qemu-system-aarch64 -cpu host,feat_AES=aes ...

# Neoverse v2 on Grace.
qemu-system-aarch64 -cpu neoverse-v2-v1

Quoted 8 lines

# Migration from Grace to Graviton3 (TBD)
qemu-system-aarch64 -cpu neoverse-v1-v1 ...

Relationship with Auger/Huck's customizable host model [1]:
We have been working on this series in parallel with [1]. Eric Auger and Cornelia Huck's series [1] exposes raw SYSREG_<REG>_<FIELD> uint64 properties on -cpu host, providing the essential low-level knobs for ID register customization. This RFC builds on the same KVM capability

Please find some comments/questions below.

Quoted 8 lines
Quoted 4 lines

and can be layered on top of [1]:
- Human-readable property names: feat_AES=pmull instead of SYSREG_ID_AA64ISAR0_EL1_AES=2, with arch-defined named values validated at set time.

From what I understand what you call feature here refers to an ARM64_FTR_BITS definition in kernel arch/arm64/kernel/cpufeatures.c. Named string values, safe policy and safe value are all extracted from the kernel implementation and do not stem from the ARM ARM itself.

Correct, a CPU feature (that we talk about) is not the same as ARM ARM defined FEAT_*. As you say below, they really are much more complex to model. But sve, pauth defined by QEMU, are also not an ARM ARM defined FEAT. Because of the complexities of ARM ARM FEAT_s, we decided to go with ID register field-based properties with abstractions like (fractional and composites) on top.

Yes, value names, safe policy, and safe value are taken from the kernel. But in most cases, value names already correlate with ARM ARM.

For example,ID_AA64ISAR1_EL1.LS64:

ARM ARM says:
FEAT_LS64 implements the functionality identified by 0b0001. FEAT_LS64_V implements the functionality identified by 0b0010. FEAT_LS64_ACCDATA implements the functionality identified by 0b0011. FEAT_LS64WB implements the functionality identified by 0b0100.

Named values in cpu-idregs.h.inc:
IDREG_FIELD_START(ID_AA64ISAR1, LS64, 60, 4, EXACT, 0) IDREG_FIELD_ARCH_VAL(0b0000, "off") IDREG_FIELD_ARCH_VAL(0b0001, "ls64") IDREG_FIELD_ARCH_VAL(0b0010, "ls64_v") IDREG_FIELD_ARCH_VAL(0b0011, "ls64_accdata") IDREG_FIELD_ARCH_VAL(0b0100, "ls64wb") IDREG_FIELD_END(ID_AA64ISAR1, LS64)

Values names are: lowered feat names with FEAT_ removed.

For “on”/“off” toggle features: for example (XS, just below LS64):
We have:
IDREG_FIELD_START(ID_AA64ISAR1, XS, 56, 4, LOWER, 0) IDREG_FIELD_ARCH_VAL(0b0000, "off") IDREG_FIELD_ARCH_VAL(0b0001, "on") IDREG_FIELD_END(ID_AA64ISAR1, XS)

Quoted 2 lines

ARM ARM says:
FEAT_XS implements the functionality identified by 0b0001.

I agree with you on the fact that in general the association is fine. I am confident that developpers who wrote

arch/arm64/kernel/cpufeatures.c did it in a sensible way. Still the problem comes when the end user/layered products have to guess those string values which are documented/defined nowhere besides in cpufeatures.c. How will they come to know which string values are supported and how they map onto any valid ARM ARM ID reg value? You cannot point them to any reference doc. Refering to past comments, Marc said he would even prefer not using kernel sysreg as a root of trust (hence the choice of extracting info from AARCHMRS) so I anticipate using arch/arm64/kernel/cpufeatures.c as input may be frown upon. But I may be wrong.

I guess the usage of string values really depends on how many props layered products or user will need to set explicitly. Assuming we expose named models and this will be the main use case, my assumption is quite a few props will remain to be overriden on top of named model hardcorded values. And since the prop granularity is very low level anyway, if the end user has to identify and set an ID reg field, it can also set the associated uint64 value directly.

My point is that compared to the original series Connie and I have been pushing,
- you still use the same prop granularity (ID reg field), somehow abusively called feature
- you add significant complexity related to the string values (which are not referenced anywhere in the spec)
- you also add significant complexity related to different kinds and name patterns of props (FRAC, STRING, BOOLEAN, NUMERIC) while we only used SYSREG_REG_FIELD uint64_t props.

While I am really interested in layering up named models on top of ID reg field properties, or even a real feature upper level abstraction, I am not sure the above extra complexity is worth while keeping the original IDreg field granularity.

Quoted 8 lines

There may be a few value names that do not make sense right now, but that does not de-merit the idea that perfectly works for most fields.

Regarding the safe-value tag, I feel that it is the one thing that must come from the kernel; in the end, KVM is gonna validate based on that. If the static file feels problematic, another option is to introduce a new KVM ioctl. We are fine with both.

safe policy and value are kernel defined. To be honest I still fail to understand why they are mandated for named vcpu models. Please could elaborate again?
Why can't you start from the host values and override them with the named vcpu model settings? If the new value cannot be applied by KVM, it will reject it and fail the vcpu init.
Moreover if one ID reg field that needs to be overriden is not writable with that host kernel, the prop won't exist and the named model won't work on that host either.

Quoted 6 lines

Regarding default values, I do not see any reset values populated in AARCHMRS_OPENSOURCE_A_profile_FAT-2026-03/Registers.json, I may be missing something here. Is there some other place where we can find ARM ARM defined reset values?

Quoted 6 lines
Quoted 3 lines

If the named vcpu models anyway use hardcoded values I wonder if it is so important to have named string values whereas a comment would do the job in the named vcpu model definition?

While true, for a named model, numerical field values will suffice as well. It’s just a way of representation. But for end users, I will argue, named values are more user-friendly.

to me, again, it would be if those values were properly specified which is not the case.

Quoted 3 lines

On x86, the user does not modify a specific cpuid leaf to turn a feature on or off. They have assigned a name to each leaf in the spec. Our value names in most

in the spec ;-) That's a big difference.

Quoted 35 lines

cases already make perfect sense, as mentioned above.

Quoted 3 lines

From a spec pov I had in mind that a defintion of a FEAT could be much more complex that just 1 field (for instance could be a combination of several of them)

Agreed. Hence, the ID register field-based properties.

Quoted 2 lines

It is not clear to be if you allow the end-user to overwrite a property on top of a named model setting.

Yes, the end user can change the property on top of the named model as illustrated in the examples.

Quoted 9 lines
Quoted 2 lines

- Default values and forward compatibility: CPU models start from a known-zero baseline rather than the host view, so new fields/registers

[1]

Quoted 6 lines

introduced in future kernels do not silently leak into existing models.
- Named CPU models with hierarchical inheritance: grace-v1, neoverse-v2-v1, etc.

The two series can coexist; this series can be rebased on top of [1].

Quoted 8 lines
Quoted 6 lines

[1] https://urldefense.proofpoint.com/v2/url?u=https-3A__lore.kernel.org_qemu-2Ddevel_20260503073541.790215-2D1-2Deric.auger-40redhat.com_&d=DwIDaQ&c=s883GpUCOChKOHiocYtGcg&r=sY-XeNqcuy_ruBQ9T7A2LmG6ktyYXXSxRB1ljkxMepI&m=fpNKdg99IJhj_lpxANCw1YCGZfWRAyz1YWNycq_dH0Rdg8U46NwjIJ3BvFyYb-e7&s=xzjnJMwOvSYbQjuaej-yNezaOn0DWWfAJho6IG_AEto&e=

Problems with defining "named" CPU models for ARM64 KVM guests:
* Features are not single CPUID bits. They are mostly multi-bit fields encoding version/level instead of just presence. A single field encodes multiple ARM ARM defined features (FEAT_s) at different thresholds.

would be good to provide an example for each challenge. I remember Connie provided some in the past though her KVM forum presentations.

Acked. Will add in v2.

Quoted 4 lines
Quoted 4 lines

* KVM does not allow all registers and fields to be modified for a guest. Some fields KVM does not virtualise at all (SME) or only support host values (BRPs, CWG, etc.). This is evolving and differs between kernel versions.

Quoted 5 lines
Quoted 2 lines

this seems to be contradictory to [1]. Do you have a mix of host inherited values and hardcoded value or do you only have hardcoded values?

A named model will not be realizable on a given host if any of the above non-writable fields differ between the host and the named model. We realize the named model fully from a zeroed-out cpu->isar.idregs[] (no host features) exposed. A model is also not

why is it mandated to start from zeroed cpu->isar.idregs[]? Why can't you start with host initialized cpu->isar.idregs[] and overwrite everything that characterizes the named vcpu model.

Quoted 26 lines

realizable on a host if it over-promises features that are not actually available on the host (the need for safe-value tags).

Quoted 23 lines
Quoted 23 lines

* ARM does not have a single natural granularity for CPU models unlike x86. ARM has architecture, reference core and SoC levels each becoming more granular.
* ARM has dozens of vendors and it will be tricky to maintain models for all of them.
* Previous designs started from the host values and then subtracted undesirable features. This is not forward-compatible; the design should work when a new ID register or field is introduced.

With the above problems in mind, the design has 3 layers:

1. ARM ID Register Field Table:
- This layer maintains all architecturally defined ID registers and ID register fields. It includes:
* Field name
* Field shift
* Field length
* Safe-value tag: LOWER, HIGHER, HIGHER_OR_ZERO, SIGNED_LOWER, EXACT, ANY
This will be used to validate user-provided values during CPU realization time against the host's value. I.e., if the host only supports "aes", a CPU model that sets "pmull" should be rejected.

Quoted 6 lines
Quoted 2 lines

why isn't the kernel doing that job already. Setting a value not compatible with the host shall be rejected by the kernel, no?

KVM will reject. But how will management stack know which values are supported? x86 is simpler; a feature is a single-bit toggle. All management stacks infer that if the value of a property is true, false is supported. And, for -cpu host if the property value is false, the feature is not supported on the host.

Well I would imagine that a cloud vendor wants to migrate between different hosts which call for a specific named model (so there is minimal alignment between the vcpu model and the host cpu). In the worst case it is always possible to instantiate scratch named model vcpus and see if the vcpu init succeeds. We could even provide a qmp utility or any other scheme that returns all valid vcpu models for that host. Anyway I think this will be needed. or -cpu help may be enhanced to do that, not simply returning the theoretical named models that are available but the ones which actually apply on that kernel. I can help you investigating that direction if it can come as an alternative.

Quoted 4 lines

On ARM, we don’t have that luxury; the management stack does not know which values are valid for a property. Ambiguity is:
1. How will management stack even know that a property is writable/modifiable?

this is already available in the original series through

query-cpu-model-expansion

Quoted 3 lines

2. For a 4-bit nibble, are all 16 values valid if it is writable?
a) Lower values than the host?
b) Higher values than the host? etc.

try to apply it and the kernel will simply let you know. Why reimplementing this in qemu as it is done on the kernel with the safe policy/value infra.

Quoted 3 lines

Having a safe value tag in QEMU allows us to provide useful information like named model ‘blockers’/‘unsupported-features’ and supported property values.

This can be achieved in a different way, relying on the kernel. Instantiate a scratch vcpu model and see if it inits. Some scratch vcpu inits are already in place in qemu.

Quoted 4 lines

I feel the above should also be present for the customizable host model series [1], providing valid values along with properties is much more useful for management stack.

you can already introspect which ID reg are writables. You cannot get the values that are valid for that host but any attempt to write invalid values already fail the vcpu init. I tested that with kernel ID_FILTERED id regs.

Quoted 31 lines
Quoted 22 lines
Quoted 22 lines

* Default value: The value to which the field is reset. This gives CPU models a clean cpu.isar.idregs[] baseline instead of the host view provided by the kernel, as in previous designs. This also complements the forward-compatibility story. Given the "default" values, higher levels need not worry about new fields/registers being introduced.
* Architecturally defined named values like "off", "aes", "pmull", etc.
* These values are derived from the kernel's ftr_bits array and tools/sysreg file.
E.g:

    IDREG_START(ID_AA64ISAR0)
    IDREG_FIELD_START(ID_AA64ISAR0, AES, 4, 4, LOWER, 0)
    IDREG_FIELD_ARCH_VAL(0b0000, "off")
    IDREG_FIELD_ARCH_VAL(0b0001, "aes")
    IDREG_FIELD_ARCH_VAL(0b0010, "pmull")
    IDREG_FIELD_END(ID_AA64ISAR0, AES)
       ....
       IDREG_END(ID_AA64ISAR0)
Quoted 4 lines
Quoted 1 line

- This layer is the single source of truth for ARM64 ID registers.

single source of truth extracted from the kernel and not from the spec. What if we discover a bug in ARM64_FTR_BITS chang default or safe value for instance. How does the change propagate to qemu and existing models?

Relaxation of safe value tag is safe, (EXACT -> LOWER -> ANY). Change in default value should not happen; instead, that should be handled with the “kvm-base” model, which is defined for KVM quirks. Same implications as ARM ARM changes the field’s semantics.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

The default values and safe-value tags are manually derived from the

default value, if equal to reset value could be extracted from the spec directly.

Again, I checked AARCHMRS_OPENSOURCE_A_profile_FAT-2026-03/Registers.json, and the reset values were null. I may be missing something. Is there any other place we can get ARM ARM defined reset values? We can modify the script in [1] to also have default values for named model infra.

I guess it is normal because those regs are ID regs. The minimum level of support comes from the various revisions and reference core implementations. To me this is the huge job that needs to be done while defining the various named models you drafted.

Quoted 15 lines
Quoted 15 lines
Quoted 15 lines

kernel's ftr_bits array. Other boilerplate and arch-defined values are script-generated.

- AArch32 ID registers are added with a single field so they can be zeroed out on hosts that support AArch32.

- This layer also defines helpers for higher layers to extract and manipulate ID register fields.
* arm_idregs_reset_to_defaults(): Reset all ID registers to their default values.
* arm_idreg_field_read/write(): Read the value of an ID register field.
* arm_arch_val_name/from_name(): Look up the arch-defined name for a numeric field value.
* ...

Quoted 4 lines
Quoted 3 lines

this is a pity we have not exchanged on this earlier because that code could have been shared instead of rewriting things and resetting all credits.

Let’s work together from now on :)

yeah the problem is you reimplemented a different infrastructure for the same prop granularity as you did not rely nor ever commented on the original series. So the first thing is to converge on the base infra (props) definition and then build layered named models on top of it. As we do not agree for now, let's wait for other's comments... I a bit frustrated you did not communicate with us before so that we could have initiated cooperation before and even make the original series evolve in the direction you needed for named vcpu models.

But anyway, my end goal is to get those named models in a decent timeframe so I am obviously willing to cooperate, hence the time I spend reviewing your alternative implementation ;-)

Quoted 32 lines
Quoted 7 lines
Quoted 7 lines

- This layer creates the following tables using X-macro expansion:
* arm_idregs[]: Array of ID register descriptors.
* arm_field_locs[]: Array of field location descriptors. (fieldIDx -> registerIndex, fieldIndex)
* ...

Quoted 6 lines
Quoted 4 lines

- The ArmIdReg struct also includes a writable_mask to track which bits are writable by KVM. This is populated at runtime during scratch VM creation, and is further used to validate that only the writable bits are modified by the CPU model.

this is an interesting idea that could have been also used in previous contributions.

Acked.

Quoted 17 lines
Quoted 17 lines

2. ARM Properties Layer:
A small property layer on top of the ID Register Field table is defined. This series defines two types of properties with plans for one more in the future:
- Single field properties: These represent ARM FEAT_X features that correspond to a single ID register field. Example: feat_AES, feat_SHA2, etc.

The property name is set as "feat_<FieldName>" and possible values are the arch-defined named values. This can be further categorized into:
* STRING: multi-bit fields (>=2 bits) with arch-defined named values, example: feat_AES, feat_SHA2, etc.
* BOOLEAN: 1-bit fields only (true/false)
example: hw_prop_IDC, hw_prop_DIC, etc.
* NUMERIC: IDREG_ANY fields with no named values (raw integer)
example: hw_prop_BS, hw_prop_DZP, etc.

Quoted 7 lines
Quoted 2 lines

I just wonder if we need all that complexity if eventually we hardcode values in named vcpu models

Then we are just delegating the complexity to the management stack. For example, without fractional prop, the management stack must know CSV2, CSV2_Frac relation, and not all value combination of <CSV2>.<CSV2_Frac> are valid. Rather than having different management software solving the same problem, we can solve it once in QEMU.

well, named vcpu models hardcode 90% of the values, aren't they. Scratch vcpu init attempts can let management layers know what named vcpu models would work on that host I guess.

Quoted 11 lines

We also have very active plans to hook up cpu-definitions, cpu-model-expansion, and more.

Quoted 8 lines
Quoted 8 lines

String property values are validated against the arch-defined named values.

ID register fields that are not covered by single field properties are also exposed as a property named hw_prop_FieldName. These are usually implementation-defined values like cache geometry, debug counter widths, etc. (CTR_EL0.*, DCZID_EL0.*, etc.)
Example: hw_prop_BS, hw_prop_DZP, etc.

Quoted 4 lines
Quoted 2 lines

how do you discriminate between those and field_ props? Again do we need that complexity?

Ummm, there is no special code for these props. They are just named differently as no ARM ARM FEAT_ relate to them.

Yes but I mean for the end user, this ends up with different prop names which does not make their life easier to me, instead of SYS_REG_FIELD pattern. also keep in mind that FEAT_ props are not, strictly speaking what the spec call FEAT.

Quoted 34 lines
Quoted 34 lines
Quoted 34 lines

Single field properties are defined as:

ARM_PROP("prop_name", type, reg, field) Example:
ARM_PROP("feat_AES", STRING, ID_AA64ISAR0, AES)

* Validation based on safe-value tags is yet to be implemented.

- Fractional properties: These represent ARM FEAT_X features that use two fields (base + frac) across registers. Example: feat_CSV2, feat_MPAM, etc.

The property name is set as "feat_<BaseFieldName>" and possible values are the arch-defined string values like "0.0", "1.0", "1.1", etc.

Fractional properties are defined as:
ARM_FRACTIONAL_PROP("prop_name", base_reg, base_field, frac_reg, frac_field) Example:
ARM_FRACTIONAL_PROP("feat_CSV2", ID_AA64PFR0, CSV2, ID_AA64PFR1, CSV2_FRAC)

When a fractional property is set, both the base field and frac field values are set to the corresponding values.
E.g: feat_CSV2=1.1 will set ID_AA64PFR0.CSV2=1 and ID_AA64PFR1.CSV2_FRAC=1.

- Composite properties (planned for v2):
These will act as master boolean switches that control a list of fields. Example: pauth, sve, etc. Setting sve=on with a named model will set all the SVE-related fields (ID_AA64ZFR0_EL1.*) along with sveNNN vector-length. Similarly, setting pauth=on will set APA, GPA, API, GPA3, GPI, GPA3 fields based on the named model.

Quoted 8 lines
Quoted 6 lines
Quoted 5 lines

- cpu_revision, cpu_partnum, etc. properties are introduced to expose MIDR, REVIDR, AIDR fields.

Exceptions to the property naming are made for ID_AA64PFR0_EL1.ELx fields, which are named elx_mode.

yet another naming exception.

A better name is always welcome! We can iterate over both the prop name and the value name.

yeah but is it making end user life easier?

Quoted 6 lines
Quoted 5 lines
Quoted 3 lines

This series defines over 130 single field properties plus 4 fractional properties. All properties work with -cpu host also.

Similary as with the host "custom" series, one needs to address collision between legacy cpu properties and low level ones too.

Agreed, This needs more thoughts. It is not a part of this RFC.

I have further thought on this when respinning the original series into v5. I believe the props can follow a hierarchy. ID reg field props are the lowest level props and apply first. Then come the higher level legacy options that are likely to override them. I am waiting for comments on the series but this is proposal I would make.

Quoted 22 lines
Quoted 22 lines
Quoted 22 lines

All properties change the cpu.isar.idregs[] values which are later written back to KVM at the end of kvm_arch_init_vcpu().

* The arch-defined named values and property names can be iterated until they make sense.

3. ARM CPU Model Hierarchy:

A small named model layer is defined on top of the properties. An ARM named CPU model defines a list of property values and a parent model. A child model naturally inherits all the properties from its parent and can override them when needed.

The initial model hierarchy shipped here is:

   kvm-base-v1                  KVM-imposed quirks
     arm-v8_4-a-v1              ARMv8.4-A architectural mandate
         neoverse-v1-v1         Neoverse V1

graviton3-v1 AWS Graviton3
arm-v9_0-a-v1 ARMv9.0-A architectural deltas on top of ARM-v8_4-a-v1
neoverse-v2-v1 Neoverse V2
grace-v1 NVIDIA Grace

Quoted 6 lines
Quoted 4 lines

Do you have a strategy for named model validation, besides code review. At least each vcpu named model shall be introduced in separate patch, overrides clearly explained and links to the reference spec shall be precisely given for review.

Agreed, each model should be in a separate patch, with overrides and new introductions clearly mentioned/documented with supporting ID register dumps.

Yes I believe it is a huge work to assess the correctness of the definition.

Quoted 30 lines
Quoted 7 lines
Quoted 7 lines

(kvm-base-v1 and arm-vX are not meant to be realizable unless the user provides values for implementation-defined fields)

So for example, grace-v1 defines Crypto fields and CTR_EL0.IDC/DIC on top of neoverse-v2-v1, which leaves those fields vendor-configurable.

Quoted 8 lines
Quoted 7 lines

The hierarchy reflects a deliberate trade-off:
- Architecture-level models (arm-v8_4-a-v1) maximize migration compatibility but lack implementation-defined values.
- Reference-core models (neoverse-v2-v1) enable migration across SoCs sharing the same core design.
- SoC models (grace-v1) expose the full hardware feature set but limit migration to hosts with the same SoC.

What kind of migration did you exercise up to now?

Successful same host migration with named models and migration from grace to graviton3 with neoverse-v1.

Quoted 12 lines
Quoted 12 lines

At model realization time,
1. a clean slate of cpu.isar.idregs[] is created using arm_idregs_reset_to_defaults().
2. Then, a model's full parent-chain is walked and all properties are applied in order from parent to child.
3. Finally, kvm_arm_writeback_idregs() compares the model's desired ID-register values against the host-provided cpreg snapshot and writes back the writable bits, warning on any non-writable difference.

Models will follow a monotonic versioning convention (grace-v1, grace-v2, ...) mirroring x86's scheme.

Quoted 7 lines
Quoted 4 lines
Quoted 3 lines

* Please take the CPU model property values with a grain of salt. They are added based on what the guest-visible values are with "host" model on available hardware.

I don't catch the above statement.

They don’t match the exact hardware specs. For example feat_CSV2 is capped at “1.0” by KVM regardless of what the hardware says. On Neoverse-v2, TRM says FEAT_CSV2_2 is implemented (i.e “2.0”)

OK. This is effectively an important aspect that, despite the value we attempt to set on an ID reg field, KVM eventually does what he wants with it according to its policy. I think it can ignore, sanitize, ...

Quoted 16 lines
Quoted 10 lines
Quoted 10 lines

Benefits of this design:
- General benefits that come with properties and named CPU models, like cross-host live migration, management-stack control over feature exposure, etc.
- Forward compatibility: when a new ID register or field is introduced, CPU models need not change; during realization they will be populated with the default values. Only ID register/field information needs to be added to the field table.
- As CPU models are hierarchical, defining a new model is much easier.

Quoted 6 lines

I like the hierarchical approach but to be honest, at the moment, I miss knowledge on whether it safely applies. I agree that named vcpu models are the end target goal while [1] is rather an intermediate step that was paving the way for it. I rather saw [1] as a tool box for enhaving the host model and understanding issues when migrating. I wish we could share the foundations instead of having totally separate contributions.

Quoted 3 lines

Definitely, let’s build a common foundation. We need to agree on safe-value tags, default values, and value names. We can build our solution on top of [1], if at least safe-value tags and default values are present.

To me there are several aspects
1) decide which ID reg properties are needed/better (unique uint64_t or your various prop flavours)
2) usage of safe policy/value (is it really mandated). Why can't we use scratch vcpus. Possibly if it is proven to be mandatory this is independent on 1
3) definition of named models

Thanks

Eric

Quoted 57 lines
Quoted 4 lines
Quoted 2 lines

- The property names and values are self-documenting.

not really sorry (because it does not match the spec). I don't think we can ask the end-user to read the kernel code.

Acked, We will add appropriate documentation in QEMU.

Quoted 9 lines
Quoted 8 lines

NOTE: ~2200 of the ~3300 added lines are declarative (field table, model definitions, properties, etc.)

Tested with KVM on an NVIDIA Grace host.

Relationship with existing code base:
- It does not change any TCG-based code paths.
- For KVM host passthrough it just adds property support.

with hardcoded reset values, correct? Instead of host retrived values?

Reset values are not used with the -cpu host. Only for the named model realization, reset values are used.

Quoted 3 lines
Quoted 1 line

- Does not change any existing properties or other code paths.

yes but if it words along with legacy options, you share our concern to coexist with them

Yes, it requires some more thoughts.

Quoted 8 lines
Quoted 1 line

- Can layer on top of the SYSREG_ property series [1].

but in that case why don't you simply reuse it to build the named vcpu model. I don't say the previous properties are the ideal solution but I am not sure the mix or heterogenously named ones introduced here + value strings retrieved from the kernel are better. At least the SYSREG ones matched the spec with raw values, which bring simplicity in the code. And since the end user shall be so much involved in provided extra SYSREG values himself on top of named vcpu models, ...

We can build on [1] as long as we have default values and safe-value tags. They are required for the proper model realization and QMP integration.

Quoted 16 lines
Quoted 2 lines

Planned Follow-ups:
- Composite properties with handling of sve, pauth for named models.

yes this is needed and I am currently working on this on [1]

Quoted 5 lines

- CLIDR_EL1 and CCSIDR_EL1 handling.
- Safe-value based validation logic.
- QMP commands like query-cpu-model-expansion are not hooked yet. Blockers and supported values (calculated using safe-value tags and runtime KVM writable masks) will be reported through them.

Quoted 8 lines

E.g. libvirt could report:
<property name='feat_AES' type='string' value='pmull'
supports='off,aes,pmull'/>
and:
<cpu type='kvm' name='nvidia-grace-v1'
typename='arm-nvidia-grace-v1-arm-cpu' usable='no'>
<blocker name='feat_AES'/>
</cpu>

Quoted 5 lines

adding Andrea for libvirt inputs

Thanks

Eric

Warm Regards,
Khushit

#32 lore raw
Quoted 102 lines · Eric Auger

!-------------------------------------------------------------------|
CAUTION: External Email

|-------------------------------------------------------------------!

Hi Khushit,

Quoted 90 lines · Khushit Shah
Quoted 46 lines · Shaju Abraham

Get Outlook for Mac
From: Eric Auger <[email protected]>
Date: Monday, 18 May 2026 at 3:57 PM
To: Shaju Abraham <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, Andrea Bolognani <[email protected]>
Subject: Re: [RFC PATCH v1 00/13] named CPU models for ARM64 on KVM

!-------------------------------------------------------------------|
CAUTION: External Email

|-------------------------------------------------------------------!

Hi Shaju,˝

Quoted 19 lines · Shaju Abraham

Hi All,

This RFC introduces "named" CPU models for ARM64 KVM guests. This is foundational for cross-host live migration and management-stack control over individual CPU features exposed to the guest.

TL;DR Examples:
# Boot with Grace CPU model
qemu-system-aarch64 -cpu grace-v1 -machine virt,accel=kvm ...

# Grace with a feature disabled qemu-system-aarch64 -cpu grace-v1,feat_SHA1=off ...

# Host passthrough with individual feature control qemu-system-aarch64 -cpu host,feat_AES=aes ...

# Neoverse v2 on Grace.
qemu-system-aarch64 -cpu neoverse-v2-v1

Quoted 8 lines

# Migration from Grace to Graviton3 (TBD)
qemu-system-aarch64 -cpu neoverse-v1-v1 ...

Relationship with Auger/Huck's customizable host model [1]:
We have been working on this series in parallel with [1]. Eric Auger and Cornelia Huck's series [1] exposes raw SYSREG_<REG>_<FIELD> uint64 properties on -cpu host, providing the essential low-level knobs for ID register customization. This RFC builds on the same KVM capability

Please find some comments/questions below.

Quoted 8 lines
Quoted 4 lines

and can be layered on top of [1]:
- Human-readable property names: feat_AES=pmull instead of SYSREG_ID_AA64ISAR0_EL1_AES=2, with arch-defined named values validated at set time.

From what I understand what you call feature here refers to an ARM64_FTR_BITS definition in kernel arch/arm64/kernel/cpufeatures.c. Named string values, safe policy and safe value are all extracted from the kernel implementation and do not stem from the ARM ARM itself.

Correct, a CPU feature (that we talk about) is not the same as ARM ARM defined FEAT_*. As you say below, they really are much more complex to model. But sve, pauth defined by QEMU, are also not an ARM ARM defined FEAT. Because of the complexities of ARM ARM FEAT_s, we decided to go with ID register field-based properties with abstractions like (fractional and composites) on top.

Yes, value names, safe policy, and safe value are taken from the kernel. But in most cases, value names already correlate with ARM ARM.

For example,ID_AA64ISAR1_EL1.LS64:

ARM ARM says:
FEAT_LS64 implements the functionality identified by 0b0001. FEAT_LS64_V implements the functionality identified by 0b0010. FEAT_LS64_ACCDATA implements the functionality identified by 0b0011. FEAT_LS64WB implements the functionality identified by 0b0100.

Named values in cpu-idregs.h.inc:
IDREG_FIELD_START(ID_AA64ISAR1, LS64, 60, 4, EXACT, 0) IDREG_FIELD_ARCH_VAL(0b0000, "off") IDREG_FIELD_ARCH_VAL(0b0001, "ls64") IDREG_FIELD_ARCH_VAL(0b0010, "ls64_v") IDREG_FIELD_ARCH_VAL(0b0011, "ls64_accdata") IDREG_FIELD_ARCH_VAL(0b0100, "ls64wb") IDREG_FIELD_END(ID_AA64ISAR1, LS64)

Values names are: lowered feat names with FEAT_ removed.

For “on”/“off” toggle features: for example (XS, just below LS64):
We have:
IDREG_FIELD_START(ID_AA64ISAR1, XS, 56, 4, LOWER, 0) IDREG_FIELD_ARCH_VAL(0b0000, "off") IDREG_FIELD_ARCH_VAL(0b0001, "on") IDREG_FIELD_END(ID_AA64ISAR1, XS)

Quoted 7 lines
Quoted 2 lines

ARM ARM says:
FEAT_XS implements the functionality identified by 0b0001.

I agree with you on the fact that in general the association is fine. I am confident that developpers who wrote

arch/arm64/kernel/cpufeatures.c did it in a sensible way. Still the problem comes when the end user/layered products have to guess those string values which are documented/defined nowhere besides in cpufeatures.c. How will they come to know which string values are supported and how they map onto any valid ARM ARM ID reg value? You cannot point them to any reference doc. Refering to past comments, Marc said he would even prefer not using

We can absolutely point them to a reference doc, like cpu-features.rst, where we can document, property names, supported values and their meaning.

Quoted 1 line

kernel sysreg as a root of trust (hence the choice of extracting info from AARCHMRS) so I anticipate using arch/arm64/kernel/cpufeatures.c as input may be frown upon. But I may be wrong.

Okay, will wait for community to reply on this.

Quoted 4 lines

I guess the usage of string values really depends on how many props layered products or user will need to set explicitly. Assuming we expose named models and this will be the main use case, my assumption is quite a few props will remain to be overriden on top of named model hardcorded values. And since the prop granularity is very low level anyway, if the end user has to identify and set an ID reg field, it can also set the associated uint64 value directly.

My point is that compared to the original series Connie and I have been pushing,
- you still use the same prop granularity (ID reg field), somehow abusively called feature

Not all are prop granularity are field level, FRAC and COMPOSITES (like sve, pauth for named models, will be in v2) are higher level constructs.

Quoted 6 lines

- you add significant complexity related to the string values (which are not referenced anywhere in the spec)

- you also add significant complexity related to different kinds and name patterns of props (FRAC, STRING, BOOLEAN, NUMERIC) while we only used SYSREG_REG_FIELD uint64_t props.

While I am really interested in layering up named models on top of ID reg field properties, or even a real feature upper level abstraction, I am not sure the above extra complexity is worth while keeping the original IDreg field granularity.

Ignoring the prop names and value names which seems to be your main concern, our named model realization are not tied to those. They can work on top of SYSREG_<REG>_<FIELD> props.

Quoted 5 lines
Quoted 5 lines

There may be a few value names that do not make sense right now, but that does not de-merit the idea that perfectly works for most fields.

Quoted 7 lines
Quoted 4 lines

Regarding the safe-value tag, I feel that it is the one thing that must come from the kernel; in the end, KVM is gonna validate based on that. If the static file feels problematic, another option is to introduce a new KVM ioctl. We are fine with both.

safe policy and value are kernel defined. To be honest I still fail to understand why they are mandated for named vcpu models. Please could elaborate again?

Use of safe-policy tag in QEMU:
- validate the configuration generated by named model or -cpu host, with modified props are valid and not over promising host capability. (Which you say to just delegate to KVM, x86 also validates in:
x86_cpu_filter_features, and blocks realization in x86_cpu_realizefn if enforce is passed.).
- Properly report blockers in query-cpu-definitions. Without safe-value tag, it is not possible to report per ID reg field blockers in query-cpu-defnitions.

Quoted 3 lines

Why can't you start from the host values and override them with the named vcpu model settings? If the new value cannot be applied by KVM, it will reject it and fail the vcpu init.

I think you are mixing up two things. For safe-value tag argument, Yes, but then what about proper query-cpu-definitions integration?

For named model we cannot start with host-values. As different KVM versions or host might expose different set of fields, or ARM ARM defining a new ID register or a new field in existing ID register.

A model needs to be future compatible and provide exact set of ID register values on any host/kernel it runs on.

This is the exact reason why we have default values. Simply 0ing the whole idregs[] does not work because of SIGNED_LOWER features like FP (and more) or RES1 fields in CTR_EL0 etc; Something should say what the default value of a register should be.

Quoted 3 lines

Moreover if one ID reg field that needs to be overriden is not writable with that host kernel, the prop won't exist and the named model won't work on that host either.

Why only add prop for writable fields in [1]? There must be props for all fields. Anyway if non writable fields differ, it will be caught by KVM.

For example, a named model might be blocked because of a non-writable field is differing from host and the prop for the same is not present. (Let’s say model abc, wants field FP=fp16 (not writable by KVM), but the host has value FP=on).

But user should be absolutely be able to make the model realisable by passing -cpu abc,FP=on.

Even without named models, I assume end goal of customisable host models would be a way to see if on a cluster of slightly differing cpus can we have a common denominator of features to expose to enable migration between hosts. If we do not exposes non-writable fields, how will higher stack know what are the values of non-writable fields on a host? And if non-writable fields are ignored, we can not provide a strict migration contract.

Quoted 12 lines
Quoted 6 lines

Regarding default values, I do not see any reset values populated in AARCHMRS_OPENSOURCE_A_profile_FAT-2026-03/Registers.json, I may be missing something here. Is there some other place where we can find ARM ARM defined reset values?

Quoted 6 lines
Quoted 3 lines

If the named vcpu models anyway use hardcoded values I wonder if it is so important to have named string values whereas a comment would do the job in the named vcpu model definition?

While true, for a named model, numerical field values will suffice as well. It’s just a way of representation. But for end users, I will argue, named values are more user-friendly.

Quoted 6 lines

to me, again, it would be if those values were properly specified which is not the case.

Quoted 3 lines

On x86, the user does not modify a specific cpuid leaf to turn a feature on or off. They have assigned a name to each leaf in the spec. Our value names in most

in the spec ;-) That's a big difference.

As above mentioned example of LS64 (in most cases) ARM ARM does say FEAT_ABC for a value ‘y’. and our name for value 'y' is ‘abc’. We can keep the value names same as ARM ARM (i.e val y = “FEAT_ABC”) if that suits better.

Quoted 35 lines
Quoted 35 lines

cases already make perfect sense, as mentioned above.

Quoted 3 lines

From a spec pov I had in mind that a defintion of a FEAT could be much more complex that just 1 field (for instance could be a combination of several of them)

Agreed. Hence, the ID register field-based properties.

Quoted 2 lines

It is not clear to be if you allow the end-user to overwrite a property on top of a named model setting.

Yes, the end user can change the property on top of the named model as illustrated in the examples.

Quoted 9 lines
Quoted 2 lines

- Default values and forward compatibility: CPU models start from a known-zero baseline rather than the host view, so new fields/registers

[1]

Quoted 6 lines

introduced in future kernels do not silently leak into existing models.
- Named CPU models with hierarchical inheritance: grace-v1, neoverse-v2-v1, etc.

The two series can coexist; this series can be rebased on top of [1].

Quoted 8 lines
Quoted 6 lines

[1] https://urldefense.proofpoint.com/v2/url?u=https-3A__lore.kernel.org_qemu-2Ddevel_20260503073541.790215-2D1-2Deric.auger-40redhat.com_&d=DwIDaQ&c=s883GpUCOChKOHiocYtGcg&r=sY-XeNqcuy_ruBQ9T7A2LmG6ktyYXXSxRB1ljkxMepI&m=fpNKdg99IJhj_lpxANCw1YCGZfWRAyz1YWNycq_dH0Rdg8U46NwjIJ3BvFyYb-e7&s=xzjnJMwOvSYbQjuaej-yNezaOn0DWWfAJho6IG_AEto&e=

Problems with defining "named" CPU models for ARM64 KVM guests:
* Features are not single CPUID bits. They are mostly multi-bit fields encoding version/level instead of just presence. A single field encodes multiple ARM ARM defined features (FEAT_s) at different thresholds.

would be good to provide an example for each challenge. I remember Connie provided some in the past though her KVM forum presentations.

Acked. Will add in v2.

Quoted 4 lines
Quoted 4 lines

* KVM does not allow all registers and fields to be modified for a guest. Some fields KVM does not virtualise at all (SME) or only support host values (BRPs, CWG, etc.). This is evolving and differs between kernel versions.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

this seems to be contradictory to [1]. Do you have a mix of host inherited values and hardcoded value or do you only have hardcoded values?

A named model will not be realizable on a given host if any of the above non-writable fields differ between the host and the named model. We realize the named model fully from a zeroed-out cpu->isar.idregs[] (no host features) exposed. A model is also not

why is it mandated to start from zeroed cpu->isar.idregs[]? Why can't you start with host initialized cpu->isar.idregs[] and overwrite everything that characterizes the named vcpu model.

As explained above, we leak host features.

Quoted 32 lines
Quoted 26 lines

realizable on a host if it over-promises features that are not actually available on the host (the need for safe-value tags).

Quoted 23 lines
Quoted 23 lines

* ARM does not have a single natural granularity for CPU models unlike x86. ARM has architecture, reference core and SoC levels each becoming more granular.
* ARM has dozens of vendors and it will be tricky to maintain models for all of them.
* Previous designs started from the host values and then subtracted undesirable features. This is not forward-compatible; the design should work when a new ID register or field is introduced.

With the above problems in mind, the design has 3 layers:

1. ARM ID Register Field Table:
- This layer maintains all architecturally defined ID registers and ID register fields. It includes:
* Field name
* Field shift
* Field length
* Safe-value tag: LOWER, HIGHER, HIGHER_OR_ZERO, SIGNED_LOWER, EXACT, ANY
This will be used to validate user-provided values during CPU realization time against the host's value. I.e., if the host only supports "aes", a CPU model that sets "pmull" should be rejected.

Quoted 6 lines
Quoted 2 lines

why isn't the kernel doing that job already. Setting a value not compatible with the host shall be rejected by the kernel, no?

KVM will reject. But how will management stack know which values are supported? x86 is simpler; a feature is a single-bit toggle. All management stacks infer that if the value of a property is true, false is supported. And, for -cpu host if the property value is false, the feature is not supported on the host.

Quoted 10 lines

Well I would imagine that a cloud vendor wants to migrate between different hosts which call for a specific named model (so there is minimal alignment between the vcpu model and the host cpu). In the worst case it is always possible to instantiate scratch named model vcpus and see if the vcpu init succeeds. We could even provide a qmp utility or any other scheme that returns all valid vcpu models for that host. Anyway I think this will be needed. or -cpu help may be enhanced to do that, not simply returning the theoretical named models that are available but the ones which actually apply on that kernel. I can help you investigating that direction if it can come as an alternative.

This is fine, we always want to know which model is realisable on host. But also want to know "why a model is not realizable?".

Quoted 7 lines
Quoted 4 lines

On ARM, we don’t have that luxury; the management stack does not know which values are valid for a property. Ambiguity is:
1. How will management stack even know that a property is writable/modifiable?

this is already available in the original series through

query-cpu-model-expansion

Again as the example above, I feel all fields (nonetheless writable or non-writable) should have a SYSREG_REG_FIELD prop.

Quoted 7 lines
Quoted 4 lines

2. For a 4-bit nibble, are all 16 values valid if it is writable?
a) Lower values than the host?
b) Higher values than the host? etc.

try to apply it and the kernel will simply let you know. Why reimplementing this in qemu as it is done on the kernel with the safe policy/value infra.

qmp query-cpu-definitions, users maybe okay with giving up some blocker features for a named model to run on a host.

Quoted 6 lines
Quoted 3 lines

Having a safe value tag in QEMU allows us to provide useful information like named model ‘blockers’/‘unsupported-features’ and supported property values.

This can be achieved in a different way, relying on the kernel. Instantiate a scratch vcpu model and see if it inits. Some scratch vcpu inits are already in place in qemu.

This is interesting, sadly it only gives us the faulting ID register and not the faulting field.

For example on a non realizable named model, we just get:

```
qemu-system-aarch64: Could not set register system register op0:3 op1:0 crn:0 crm:7 op2:4 to 100000 (is 0)
```

We can find out the faulting register from this, but not the faulting field.

Without per-field information, libvirt cannot translate this into a <blocker name='feat_AES'/> element. It can only say 'something in ID_AA64ISAR0_EL1 is wrong'.

Quoted 9 lines
Quoted 4 lines

I feel the above should also be present for the customizable host model series [1], providing valid values along with properties is much more useful for management stack.

you can already introspect which ID reg are writables. You cannot get the values that are valid for that host but any attempt to write invalid values already fail the vcpu init. I tested that with kernel ID_FILTERED id regs.

Again, I feel there should be properties for all fields not just the writable fields.

Quoted 32 lines
Quoted 32 lines
Quoted 22 lines
Quoted 22 lines

* Default value: The value to which the field is reset. This gives CPU models a clean cpu.isar.idregs[] baseline instead of the host view provided by the kernel, as in previous designs. This also complements the forward-compatibility story. Given the "default" values, higher levels need not worry about new fields/registers being introduced.
* Architecturally defined named values like "off", "aes", "pmull", etc.
* These values are derived from the kernel's ftr_bits array and tools/sysreg file.
E.g:

   IDREG_START(ID_AA64ISAR0)
   IDREG_FIELD_START(ID_AA64ISAR0, AES, 4, 4, LOWER, 0)
   IDREG_FIELD_ARCH_VAL(0b0000, "off")
   IDREG_FIELD_ARCH_VAL(0b0001, "aes")
   IDREG_FIELD_ARCH_VAL(0b0010, "pmull")
   IDREG_FIELD_END(ID_AA64ISAR0, AES)
      ....
      IDREG_END(ID_AA64ISAR0)
Quoted 4 lines
Quoted 1 line

- This layer is the single source of truth for ARM64 ID registers.

single source of truth extracted from the kernel and not from the spec. What if we discover a bug in ARM64_FTR_BITS chang default or safe value for instance. How does the change propagate to qemu and existing models?

Relaxation of safe value tag is safe, (EXACT -> LOWER -> ANY). Change in default value should not happen; instead, that should be handled with the “kvm-base” model, which is defined for KVM quirks. Same implications as ARM ARM changes the field’s semantics.

Quoted 1 line
Quoted 1 line

The default values and safe-value tags are manually derived from the

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

default value, if equal to reset value could be extracted from the spec directly.

Again, I checked AARCHMRS_OPENSOURCE_A_profile_FAT-2026-03/Registers.json, and the reset values were null. I may be missing something. Is there any other place we can get ARM ARM defined reset values? We can modify the script in [1] to also have default values for named model infra.

I guess it is normal because those regs are ID regs. The minimum level of support comes from the various revisions and reference core

NI vals from kernel’s sysreg are very useful… I will let community decide on how we should maintain default values.

Quoted 2 lines

implementations. To me this is the huge job that needs to be done while defining the various named models you drafted.

That absolutely needs to be done if we don’t want to leak host features and provide strict migration contract.

Quoted 20 lines
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines

kernel's ftr_bits array. Other boilerplate and arch-defined values are script-generated.

- AArch32 ID registers are added with a single field so they can be zeroed out on hosts that support AArch32.

- This layer also defines helpers for higher layers to extract and manipulate ID register fields.
* arm_idregs_reset_to_defaults(): Reset all ID registers to their default values.
* arm_idreg_field_read/write(): Read the value of an ID register field.
* arm_arch_val_name/from_name(): Look up the arch-defined name for a numeric field value.
* ...

Quoted 4 lines
Quoted 3 lines

this is a pity we have not exchanged on this earlier because that code could have been shared instead of rewriting things and resetting all credits.

Let’s work together from now on :)

Quoted 9 lines

yeah the problem is you reimplemented a different infrastructure for the same prop granularity as you did not rely nor ever commented on the original series. So the first thing is to converge on the base infra (props) definition and then build layered named models on top of it. As we do not agree for now, let's wait for other's comments... I a bit frustrated you did not communicate with us before so that we could have initiated cooperation before and even make the original series evolve in the direction you needed for named vcpu models.

Our intention was not to reimplement the infrastructure, We first thought of implementing on top of v3 of [1], but that looked like not being actively worked on. For business deadlines we had to implement model realization.

Our model realisation code can work on [1] if just default values/reset values are present.

If complexities of safe-value tags and their advantage (as mentioned previously) are not acceptable by the community, we will rebase our model realization logic on top of [1] while also adding default values.

Quoted 3 lines

But anyway, my end goal is to get those named models in a decent timeframe so I am obviously willing to cooperate, hence the time I spend reviewing your alternative implementation ;-)

Thanks for the detailed review, I am certain we both can make progress.

Quoted 98 lines
Quoted 32 lines
Quoted 7 lines
Quoted 7 lines

- This layer creates the following tables using X-macro expansion:
* arm_idregs[]: Array of ID register descriptors.
* arm_field_locs[]: Array of field location descriptors. (fieldIDx -> registerIndex, fieldIndex)
* ...

Quoted 6 lines
Quoted 4 lines

- The ArmIdReg struct also includes a writable_mask to track which bits are writable by KVM. This is populated at runtime during scratch VM creation, and is further used to validate that only the writable bits are modified by the CPU model.

this is an interesting idea that could have been also used in previous contributions.

Acked.

Quoted 17 lines
Quoted 17 lines

2. ARM Properties Layer:
A small property layer on top of the ID Register Field table is defined. This series defines two types of properties with plans for one more in the future:
- Single field properties: These represent ARM FEAT_X features that correspond to a single ID register field. Example: feat_AES, feat_SHA2, etc.

The property name is set as "feat_<FieldName>" and possible values are the arch-defined named values. This can be further categorized into:
* STRING: multi-bit fields (>=2 bits) with arch-defined named values, example: feat_AES, feat_SHA2, etc.
* BOOLEAN: 1-bit fields only (true/false)
example: hw_prop_IDC, hw_prop_DIC, etc.
* NUMERIC: IDREG_ANY fields with no named values (raw integer)
example: hw_prop_BS, hw_prop_DZP, etc.

Quoted 7 lines
Quoted 2 lines

I just wonder if we need all that complexity if eventually we hardcode values in named vcpu models

Then we are just delegating the complexity to the management stack. For example, without fractional prop, the management stack must know CSV2, CSV2_Frac relation, and not all value combination of <CSV2>.<CSV2_Frac> are valid. Rather than having different management software solving the same problem, we can solve it once in QEMU.

well, named vcpu models hardcode 90% of the values, aren't they. Scratch vcpu init attempts can let management layers know what named vcpu models would work on that host I guess.

Quoted 11 lines

We also have very active plans to hook up cpu-definitions, cpu-model-expansion, and more.

Quoted 8 lines
Quoted 8 lines

String property values are validated against the arch-defined named values.

ID register fields that are not covered by single field properties are also exposed as a property named hw_prop_FieldName. These are usually implementation-defined values like cache geometry, debug counter widths, etc. (CTR_EL0.*, DCZID_EL0.*, etc.)
Example: hw_prop_BS, hw_prop_DZP, etc.

Quoted 4 lines
Quoted 2 lines

how do you discriminate between those and field_ props? Again do we need that complexity?

Ummm, there is no special code for these props. They are just named differently as no ARM ARM FEAT_ relate to them.

Yes but I mean for the end user, this ends up with different prop names which does not make their life easier to me, instead of SYS_REG_FIELD pattern. also keep in mind that FEAT_ props are not, strictly speaking what the spec call FEAT.

Quoted 37 lines
Quoted 37 lines
Quoted 37 lines

Single field properties are defined as:

ARM_PROP("prop_name", type, reg, field) Example:
ARM_PROP("feat_AES", STRING, ID_AA64ISAR0, AES)

* Validation based on safe-value tags is yet to be implemented.

- Fractional properties: These represent ARM FEAT_X features that use two fields (base + frac) across registers. Example: feat_CSV2, feat_MPAM, etc.

The property name is set as "feat_<BaseFieldName>" and possible values are the arch-defined string values like "0.0", "1.0", "1.1", etc.

Fractional properties are defined as:
ARM_FRACTIONAL_PROP("prop_name", base_reg, base_field, frac_reg, frac_field) Example:
ARM_FRACTIONAL_PROP("feat_CSV2", ID_AA64PFR0, CSV2, ID_AA64PFR1, CSV2_FRAC)

When a fractional property is set, both the base field and frac field values are set to the corresponding values.
E.g: feat_CSV2=1.1 will set ID_AA64PFR0.CSV2=1 and ID_AA64PFR1.CSV2_FRAC=1.

- Composite properties (planned for v2):
These will act as master boolean switches that control a list of fields. Example: pauth, sve, etc. Setting sve=on with a named model will set all the SVE-related fields (ID_AA64ZFR0_EL1.*) along with sveNNN vector-length. Similarly, setting pauth=on will set APA, GPA, API, GPA3, GPI, GPA3 fields based on the named model.

- cpu_revision, cpu_partnum, etc. properties are introduced to expose MIDR, REVIDR, AIDR fields.

Quoted 6 lines
Quoted 5 lines
Quoted 3 lines
Quoted 2 lines

Exceptions to the property naming are made for ID_AA64PFR0_EL1.ELx fields, which are named elx_mode.

yet another naming exception.

A better name is always welcome! We can iterate over both the prop name and the value name.

yeah but is it making end user life easier?

We believe so.

Quoted 11 lines
Quoted 6 lines
Quoted 5 lines
Quoted 3 lines

This series defines over 130 single field properties plus 4 fractional properties. All properties work with -cpu host also.

Similary as with the host "custom" series, one needs to address collision between legacy cpu properties and low level ones too.

Agreed, This needs more thoughts. It is not a part of this RFC.

I have further thought on this when respinning the original series into v5. I believe the props can follow a hierarchy. ID reg field props are the lowest level props and apply first. Then come the higher level legacy options that are likely to override them. I am waiting for comments on the series but this is proposal I would make.

Interesting, will look through the v5 code.

Quoted 26 lines
Quoted 26 lines
Quoted 26 lines
Quoted 14 lines

All properties change the cpu.isar.idregs[] values which are later written back to KVM at the end of kvm_arch_init_vcpu().

* The arch-defined named values and property names can be iterated until they make sense.

3. ARM CPU Model Hierarchy:

A small named model layer is defined on top of the properties. An ARM named CPU model defines a list of property values and a parent model. A child model naturally inherits all the properties from its parent and can override them when needed.

Quoted 8 lines

The initial model hierarchy shipped here is:

  kvm-base-v1                  KVM-imposed quirks
    arm-v8_4-a-v1              ARMv8.4-A architectural mandate
        neoverse-v1-v1         Neoverse V1

graviton3-v1 AWS Graviton3
arm-v9_0-a-v1 ARMv9.0-A architectural deltas on top of ARM-v8_4-a-v1
neoverse-v2-v1 Neoverse V2
grace-v1 NVIDIA Grace

Do you have a strategy for named model validation, besides code review. At least each vcpu named model shall be introduced in separate patch, overrides clearly explained and links to the reference spec shall be precisely given for review.

Quoted 5 lines
Quoted 2 lines

Agreed, each model should be in a separate patch, with overrides and new introductions clearly mentioned/documented with supporting ID register dumps.

Yes I believe it is a huge work to assess the correctness of the definition.

I hope in long term vendors will chime in.

Quoted 56 lines
Quoted 30 lines
Quoted 7 lines
Quoted 7 lines

(kvm-base-v1 and arm-vX are not meant to be realizable unless the user provides values for implementation-defined fields)

So for example, grace-v1 defines Crypto fields and CTR_EL0.IDC/DIC on top of neoverse-v2-v1, which leaves those fields vendor-configurable.

Quoted 8 lines
Quoted 7 lines

The hierarchy reflects a deliberate trade-off:
- Architecture-level models (arm-v8_4-a-v1) maximize migration compatibility but lack implementation-defined values.
- Reference-core models (neoverse-v2-v1) enable migration across SoCs sharing the same core design.
- SoC models (grace-v1) expose the full hardware feature set but limit migration to hosts with the same SoC.

What kind of migration did you exercise up to now?

Successful same host migration with named models and migration from grace to graviton3 with neoverse-v1.

Quoted 12 lines
Quoted 12 lines

At model realization time,
1. a clean slate of cpu.isar.idregs[] is created using arm_idregs_reset_to_defaults().
2. Then, a model's full parent-chain is walked and all properties are applied in order from parent to child.
3. Finally, kvm_arm_writeback_idregs() compares the model's desired ID-register values against the host-provided cpreg snapshot and writes back the writable bits, warning on any non-writable difference.

Models will follow a monotonic versioning convention (grace-v1, grace-v2, ...) mirroring x86's scheme.

Quoted 7 lines
Quoted 4 lines
Quoted 3 lines

* Please take the CPU model property values with a grain of salt. They are added based on what the guest-visible values are with "host" model on available hardware.

I don't catch the above statement.

They don’t match the exact hardware specs. For example feat_CSV2 is capped at “1.0” by KVM regardless of what the hardware says. On Neoverse-v2, TRM says FEAT_CSV2_2 is implemented (i.e “2.0”)

OK. This is effectively an important aspect that, despite the value we attempt to set on an ID reg field, KVM eventually does what he wants with it according to its policy. I think it can ignore, sanitize, ...

Quoted 16 lines
Quoted 16 lines
Quoted 10 lines

Benefits of this design:
- General benefits that come with properties and named CPU models, like cross-host live migration, management-stack control over feature exposure, etc.
- Forward compatibility: when a new ID register or field is introduced, CPU models need not change; during realization they will be populated with the default values. Only ID register/field information needs to be added to the field table.
- As CPU models are hierarchical, defining a new model is much easier.

I like the hierarchical approach but to be honest, at the moment, I miss knowledge on whether it safely applies. I agree that named vcpu models are the end target goal while [1] is rather an intermediate step that was paving the way for it. I rather saw [1] as a tool box for enhaving the host model and understanding issues when migrating. I wish we could share the foundations instead of having totally separate contributions.

Quoted 7 lines
Quoted 3 lines

Definitely, let’s build a common foundation. We need to agree on safe-value tags, default values, and value names. We can build our solution on top of [1], if at least safe-value tags and default values are present.

To me there are several aspects
1) decide which ID reg properties are needed/better (unique uint64_t or your various prop flavours)

We will agree on whatever community agrees on. If our names are discouraged we will move to [1]’s prop names.

Quoted 3 lines

2) usage of safe policy/value (is it really mandated). Why can't we use scratch vcpus. Possibly if it is proven to be mandatory this is independent on 1

Default-values/reset-values are absolutely needed. safe-value tags are also a must have if we want parity with x86 QEMU’s qmp capabilities.

Warm Regards,
Khushit

Quoted 62 lines

3) definition of named models

Thanks

Eric

Quoted 57 lines
Quoted 4 lines
Quoted 2 lines

- The property names and values are self-documenting.

not really sorry (because it does not match the spec). I don't think we can ask the end-user to read the kernel code.

Acked, We will add appropriate documentation in QEMU.

Quoted 9 lines
Quoted 8 lines

NOTE: ~2200 of the ~3300 added lines are declarative (field table, model definitions, properties, etc.)

Tested with KVM on an NVIDIA Grace host.

Relationship with existing code base:
- It does not change any TCG-based code paths.
- For KVM host passthrough it just adds property support.

with hardcoded reset values, correct? Instead of host retrived values?

Reset values are not used with the -cpu host. Only for the named model realization, reset values are used.

Quoted 3 lines
Quoted 1 line

- Does not change any existing properties or other code paths.

yes but if it words along with legacy options, you share our concern to coexist with them

Yes, it requires some more thoughts.

Quoted 8 lines
Quoted 1 line

- Can layer on top of the SYSREG_ property series [1].

but in that case why don't you simply reuse it to build the named vcpu model. I don't say the previous properties are the ideal solution but I am not sure the mix or heterogenously named ones introduced here + value strings retrieved from the kernel are better. At least the SYSREG ones matched the spec with raw values, which bring simplicity in the code. And since the end user shall be so much involved in provided extra SYSREG values himself on top of named vcpu models, ...

We can build on [1] as long as we have default values and safe-value tags. They are required for the proper model realization and QMP integration.

Quoted 16 lines
Quoted 2 lines

Planned Follow-ups:
- Composite properties with handling of sve, pauth for named models.

yes this is needed and I am currently working on this on [1]

Quoted 5 lines

- CLIDR_EL1 and CCSIDR_EL1 handling.
- Safe-value based validation logic.
- QMP commands like query-cpu-model-expansion are not hooked yet. Blockers and supported values (calculated using safe-value tags and runtime KVM writable masks) will be reported through them.

Quoted 8 lines

E.g. libvirt could report:
<property name='feat_AES' type='string' value='pmull'
supports='off,aes,pmull'/>
and:
<cpu type='kvm' name='nvidia-grace-v1'
typename='arm-nvidia-grace-v1-arm-cpu' usable='no'>
<blocker name='feat_AES'/>
</cpu>

Quoted 5 lines

adding Andrea for libvirt inputs

Thanks

Eric

Warm Regards,
Khushit

#33 lore raw

Hi Khushit,

Quoted 111 lines · Khushit Shah
Quoted 101 lines · Eric Auger

!-------------------------------------------------------------------|
CAUTION: External Email

|-------------------------------------------------------------------!

Hi Khushit,

Quoted 90 lines · Khushit Shah
Quoted 46 lines · Shaju Abraham

Get Outlook for Mac
From: Eric Auger <[email protected]>
Date: Monday, 18 May 2026 at 3:57 PM
To: Shaju Abraham <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, Andrea Bolognani <[email protected]>
Subject: Re: [RFC PATCH v1 00/13] named CPU models for ARM64 on KVM

!-------------------------------------------------------------------|
CAUTION: External Email

|-------------------------------------------------------------------!

Hi Shaju,˝

Quoted 19 lines · Shaju Abraham

Hi All,

This RFC introduces "named" CPU models for ARM64 KVM guests. This is foundational for cross-host live migration and management-stack control over individual CPU features exposed to the guest.

TL;DR Examples:
# Boot with Grace CPU model
qemu-system-aarch64 -cpu grace-v1 -machine virt,accel=kvm ...

# Grace with a feature disabled qemu-system-aarch64 -cpu grace-v1,feat_SHA1=off ...

# Host passthrough with individual feature control qemu-system-aarch64 -cpu host,feat_AES=aes ...

# Neoverse v2 on Grace.
qemu-system-aarch64 -cpu neoverse-v2-v1

Quoted 8 lines

# Migration from Grace to Graviton3 (TBD)
qemu-system-aarch64 -cpu neoverse-v1-v1 ...

Relationship with Auger/Huck's customizable host model [1]:
We have been working on this series in parallel with [1]. Eric Auger and Cornelia Huck's series [1] exposes raw SYSREG_<REG>_<FIELD> uint64 properties on -cpu host, providing the essential low-level knobs for ID register customization. This RFC builds on the same KVM capability

Please find some comments/questions below.

Quoted 8 lines
Quoted 4 lines

and can be layered on top of [1]:
- Human-readable property names: feat_AES=pmull instead of SYSREG_ID_AA64ISAR0_EL1_AES=2, with arch-defined named values validated at set time.

From what I understand what you call feature here refers to an ARM64_FTR_BITS definition in kernel arch/arm64/kernel/cpufeatures.c. Named string values, safe policy and safe value are all extracted from the kernel implementation and do not stem from the ARM ARM itself.

Correct, a CPU feature (that we talk about) is not the same as ARM ARM defined FEAT_*. As you say below, they really are much more complex to model. But sve, pauth defined by QEMU, are also not an ARM ARM defined FEAT. Because of the complexities of ARM ARM FEAT_s, we decided to go with ID register field-based properties with abstractions like (fractional and composites) on top.

Yes, value names, safe policy, and safe value are taken from the kernel. But in most cases, value names already correlate with ARM ARM.

For example,ID_AA64ISAR1_EL1.LS64:

ARM ARM says:
FEAT_LS64 implements the functionality identified by 0b0001. FEAT_LS64_V implements the functionality identified by 0b0010. FEAT_LS64_ACCDATA implements the functionality identified by 0b0011. FEAT_LS64WB implements the functionality identified by 0b0100.

Named values in cpu-idregs.h.inc:
IDREG_FIELD_START(ID_AA64ISAR1, LS64, 60, 4, EXACT, 0) IDREG_FIELD_ARCH_VAL(0b0000, "off") IDREG_FIELD_ARCH_VAL(0b0001, "ls64") IDREG_FIELD_ARCH_VAL(0b0010, "ls64_v") IDREG_FIELD_ARCH_VAL(0b0011, "ls64_accdata") IDREG_FIELD_ARCH_VAL(0b0100, "ls64wb") IDREG_FIELD_END(ID_AA64ISAR1, LS64)

Values names are: lowered feat names with FEAT_ removed.

For “on”/“off” toggle features: for example (XS, just below LS64):
We have:
IDREG_FIELD_START(ID_AA64ISAR1, XS, 56, 4, LOWER, 0) IDREG_FIELD_ARCH_VAL(0b0000, "off") IDREG_FIELD_ARCH_VAL(0b0001, "on") IDREG_FIELD_END(ID_AA64ISAR1, XS)

Quoted 6 lines
Quoted 2 lines

ARM ARM says:
FEAT_XS implements the functionality identified by 0b0001.

I agree with you on the fact that in general the association is fine. I am confident that developpers who wrote

arch/arm64/kernel/cpufeatures.c did it in a sensible way. Still the problem comes when the end user/layered products have to guess those string values which are documented/defined nowhere besides in cpufeatures.c. How will they come to know which string values are supported and how they map onto any valid ARM ARM ID reg value? You cannot point them to any reference doc. Refering to past comments, Marc said he would even prefer not using

We can absolutely point them to a reference doc, like cpu-features.rst, where we can document, property names, supported values and their meaning.

Quoted 1 line

kernel sysreg as a root of trust (hence the choice of extracting info from AARCHMRS) so I anticipate using arch/arm64/kernel/cpufeatures.c as input may be frown upon. But I may be wrong.

Quoted 8 lines

Okay, will wait for community to reply on this.

Quoted 4 lines

I guess the usage of string values really depends on how many props layered products or user will need to set explicitly. Assuming we expose named models and this will be the main use case, my assumption is quite a few props will remain to be overriden on top of named model hardcorded values. And since the prop granularity is very low level anyway, if the end user has to identify and set an ID reg field, it can also set the associated uint64 value directly.

My point is that compared to the original series Connie and I have been pushing,
- you still use the same prop granularity (ID reg field), somehow abusively called feature

Not all are prop granularity are field level, FRAC and COMPOSITES (like sve, pauth for named models, will be in v2) are higher level constructs.

Currently only FRAC prop abstraction differ.

Quoted 9 lines
Quoted 6 lines

- you add significant complexity related to the string values (which are not referenced anywhere in the spec)
- you also add significant complexity related to different kinds and name patterns of props (FRAC, STRING, BOOLEAN, NUMERIC) while we only used SYSREG_REG_FIELD uint64_t props.

While I am really interested in layering up named models on top of ID reg field properties, or even a real feature upper level abstraction, I am not sure the above extra complexity is worth while keeping the original IDreg field granularity.

Ignoring the prop names and value names which seems to be your main concern, our named model realization are not tied to those. They can work on top of SYSREG_<REG>_<FIELD> props.

Well, there is also the need/usage of safe policy and default value, see below.

Quoted 11 lines
Quoted 11 lines
Quoted 8 lines

There may be a few value names that do not make sense right now, but that does not de-merit the idea that perfectly works for most fields.

Regarding the safe-value tag, I feel that it is the one thing that must come from the kernel; in the end, KVM is gonna validate based on that. If the static file feels problematic, another option is to introduce a new KVM ioctl. We are fine with both.

safe policy and value are kernel defined. To be honest I still fail to understand why they are mandated for named vcpu models. Please could elaborate again?

Quoted 6 lines

Use of safe-policy tag in QEMU:
- validate the configuration generated by named model or -cpu host, with modified props are valid and not over promising host capability. (Which you say to just delegate to KVM, x86 also validates in:
x86_cpu_filter_features, and blocks realization in x86_cpu_realizefn if enforce is passed.).

where is the safe rule currently used in this series?

Quoted 3 lines

- Properly report blockers in query-cpu-definitions. Without safe-value tag, it is not possible to report per ID reg field blockers in query-cpu-defnitions.

How does query-cpu-definitions help today? query-cpu-definitions does not seem to return that kind of info. Filtering host cpu model it just returns:
{"name": "host", "typename": "host-arm-cpu", "static": false, "deprecated": false}

Quoted 7 lines
Quoted 5 lines

Why can't you start from the host values and override them with the named vcpu model settings? If the new value cannot be applied by KVM, it will reject it and fail the vcpu init.

I think you are mixing up two things. For safe-value tag argument, Yes, but then what about proper query-cpu-definitions integration?

See above, what do you mean?

Quoted 4 lines

For named model we cannot start with host-values. As different KVM versions or host might expose different set of fields, or ARM ARM defining a new ID register or a new field in existing ID register.

I understand a named vcpu model shall be fully determined, ie. all ID regs shall be set to a relevant value determined by the vcpu model. To me those default values rather depend on the VCPU model. a v8 default value may not be the same as a v9 value because a feature has become mandated. So why aren't the default values set within the vcpu model definition instead of intarget/arm/cpu-idregs.h.inc?

Then you have 2 categories of fields: writable or not. If you want to try and set all field values, effectively you may need to define props for fields which are even not writable. This can easily evolve from the original series [1].

Quoted 3 lines

A model needs to be future compatible and provide exact set of ID register values on any host/kernel it runs on.

I am not really sure this is always feasible. Assuming there is a bug fix in the kernel that changes the way an ID reg access is sanitized/accepted/rejected, you may break the vcpu model. ie. a former ID reg value may have been accepted and is not anymore or conversely.

But on the principle I agree with you.

Quoted 5 lines

This is the exact reason why we have default values. Simply 0ing the whole idregs[] does not work because of SIGNED_LOWER features like FP (and more) or RES1 fields in CTR_EL0 etc; Something should say what the default value of a register should be.

yeah but still isn't it named model specific?

Quoted 6 lines
Quoted 4 lines

Moreover if one ID reg field that needs to be overriden is not writable with that host kernel, the prop won't exist and the named model won't work on that host either.

Why only add prop for writable fields in [1]? There must be props for all fields. Anyway if non writable fields differ, it will be caught by KVM.

Up to now the goal of [1] was slighly different, ie. allowing to slighly alter ID reg values compared to host passthrough values so that the model becomes migratable between 2 machines. We had cases where only altering one CTR_EL0 field made it migratable for instance. Also in [1] there was not real point exposing a property for an ID reg field that was not writable. However I agree on the fact that for named models things need to be more determistic and you also need to try applying values that are not writable and see if they are the same that host default value.

Quoted 8 lines

For example, a named model might be blocked because of a non-writable field is differing from host and the prop for the same is not present. (Let’s say model abc, wants field FP=fp16 (not writable by KVM), but the host has value FP=on).

But user should be absolutely be able to make the model realisable by passing -cpu abc,FP=on.

agreed

Quoted 7 lines

Even without named models, I assume end goal of customisable host models would be a way to see if on a cluster of slightly differing cpus can we have a common denominator of features to expose to enable migration between hosts. If we do not exposes non-writable fields, how will higher stack know what are the values of non-writable fields on a host? And if non-writable fields are ignored, we can not provide a strict migration contract.

At the moment it was more a trial and error process I acknowledge. You try to migrate. You get what's wrong through traces on destination side. Then you alter the ID reg fields that cause trouble in case they are writable (ie. props are exposed). This is not production grade I agree. But even with your current approach you still fail to provide tools for layered products to understand what named model applies to this host and can be migrated to another one, I think.

Note that if we expose everything through props, you well get all the values on src and dst that mismatch but you will fail to know which mismatches are correctable (because you don't know whether fields are writable) ;-) How can you eventually determine the mismatch is fixable?

Quoted 58 lines
Quoted 9 lines
Quoted 9 lines

Regarding default values, I do not see any reset values populated in AARCHMRS_OPENSOURCE_A_profile_FAT-2026-03/Registers.json, I may be missing something here. Is there some other place where we can find ARM ARM defined reset values?

Quoted 3 lines

If the named vcpu models anyway use hardcoded values I wonder if it is so important to have named string values whereas a comment would do the job in the named vcpu model definition?

Quoted 8 lines
Quoted 3 lines

While true, for a named model, numerical field values will suffice as well. It’s just a way of representation. But for end users, I will argue, named values are more user-friendly.

to me, again, it would be if those values were properly specified which is not the case.

Quoted 2 lines

On x86, the user does not modify a specific cpuid leaf to turn a feature on or off. They have assigned a name to each leaf in the spec. Our value names in most

in the spec ;-) That's a big difference.

As above mentioned example of LS64 (in most cases) ARM ARM does say FEAT_ABC for a value ‘y’. and our name for value 'y' is ‘abc’. We can keep the value names same as ARM ARM (i.e val y = “FEAT_ABC”) if that suits better.

Quoted 37 lines
Quoted 37 lines

cases already make perfect sense, as mentioned above.

Quoted 3 lines

From a spec pov I had in mind that a defintion of a FEAT could be much more complex that just 1 field (for instance could be a combination of several of them)

Agreed. Hence, the ID register field-based properties.

Quoted 2 lines

It is not clear to be if you allow the end-user to overwrite a property on top of a named model setting.

Yes, the end user can change the property on top of the named model as illustrated in the examples.

Quoted 9 lines
Quoted 2 lines

- Default values and forward compatibility: CPU models start from a known-zero baseline rather than the host view, so new fields/registers

[1]

Quoted 6 lines

introduced in future kernels do not silently leak into existing models.
- Named CPU models with hierarchical inheritance: grace-v1, neoverse-v2-v1, etc.

The two series can coexist; this series can be rebased on top of [1].

Quoted 8 lines
Quoted 6 lines

[1] https://urldefense.proofpoint.com/v2/url?u=https-3A__lore.kernel.org_qemu-2Ddevel_20260503073541.790215-2D1-2Deric.auger-40redhat.com_&d=DwIDaQ&c=s883GpUCOChKOHiocYtGcg&r=sY-XeNqcuy_ruBQ9T7A2LmG6ktyYXXSxRB1ljkxMepI&m=fpNKdg99IJhj_lpxANCw1YCGZfWRAyz1YWNycq_dH0Rdg8U46NwjIJ3BvFyYb-e7&s=xzjnJMwOvSYbQjuaej-yNezaOn0DWWfAJho6IG_AEto&e=

Problems with defining "named" CPU models for ARM64 KVM guests:
* Features are not single CPUID bits. They are mostly multi-bit fields encoding version/level instead of just presence. A single field encodes multiple ARM ARM defined features (FEAT_s) at different thresholds.

would be good to provide an example for each challenge. I remember Connie provided some in the past though her KVM forum presentations.

Acked. Will add in v2.

Quoted 6 lines
Quoted 4 lines

* KVM does not allow all registers and fields to be modified for a guest. Some fields KVM does not virtualise at all (SME) or only support host values (BRPs, CWG, etc.). This is evolving and differs between kernel versions.

this seems to be contradictory to [1]. Do you have a mix of host inherited values and hardcoded value or do you only have hardcoded values?

Quoted 7 lines
Quoted 6 lines
Quoted 3 lines

A named model will not be realizable on a given host if any of the above non-writable fields differ between the host and the named model. We realize the named model fully from a zeroed-out cpu->isar.idregs[] (no host features) exposed. A model is also not

why is it mandated to start from zeroed cpu->isar.idregs[]? Why can't you start with host initialized cpu->isar.idregs[] and overwrite everything that characterizes the named vcpu model.

As explained above, we leak host features.

OK understood. cpu->isar.idregs[] needs to be fully determined. My assumption was that you are not going to run any vcpu model on any host and there was minimal adherence between both, hence my original statement.

Quoted 43 lines
Quoted 33 lines
Quoted 27 lines

realizable on a host if it over-promises features that are not actually available on the host (the need for safe-value tags).

Quoted 23 lines
Quoted 23 lines

* ARM does not have a single natural granularity for CPU models unlike x86. ARM has architecture, reference core and SoC levels each becoming more granular.
* ARM has dozens of vendors and it will be tricky to maintain models for all of them.
* Previous designs started from the host values and then subtracted undesirable features. This is not forward-compatible; the design should work when a new ID register or field is introduced.

With the above problems in mind, the design has 3 layers:

1. ARM ID Register Field Table:
- This layer maintains all architecturally defined ID registers and ID register fields. It includes:
* Field name
* Field shift
* Field length
* Safe-value tag: LOWER, HIGHER, HIGHER_OR_ZERO, SIGNED_LOWER, EXACT, ANY
This will be used to validate user-provided values during CPU realization time against the host's value. I.e., if the host only supports "aes", a CPU model that sets "pmull" should be rejected.

Quoted 6 lines
Quoted 2 lines

why isn't the kernel doing that job already. Setting a value not compatible with the host shall be rejected by the kernel, no?

KVM will reject. But how will management stack know which values are supported? x86 is simpler; a feature is a single-bit toggle. All management stacks infer that if the value of a property is true, false is supported. And, for -cpu host if the property value is false, the feature is not supported on the host.

Quoted 10 lines

Well I would imagine that a cloud vendor wants to migrate between different hosts which call for a specific named model (so there is minimal alignment between the vcpu model and the host cpu). In the worst case it is always possible to instantiate scratch named model vcpus and see if the vcpu init succeeds. We could even provide a qmp utility or any other scheme that returns all valid vcpu models for that host. Anyway I think this will be needed. or -cpu help may be enhanced to do that, not simply returning the theoretical named models that are available but the ones which actually apply on that kernel. I can help you investigating that direction if it can come as an alternative.

Quoted 2 lines

This is fine, we always want to know which model is realisable on host. But also want to know "why a model is not realizable?".

Practically what kind of tools do you bring to know that? which qmp command to you plan to implement?

Quoted 10 lines
Quoted 7 lines
Quoted 4 lines

On ARM, we don’t have that luxury; the management stack does not know which values are valid for a property. Ambiguity is:
1. How will management stack even know that a property is writable/modifiable?

this is already available in the original series through

query-cpu-model-expansion

Again as the example above, I feel all fields (nonetheless writable or non-writable) should have a SYSREG_REG_FIELD prop.

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

2. For a 4-bit nibble, are all 16 values valid if it is writable?
a) Lower values than the host?
b) Higher values than the host? etc.

try to apply it and the kernel will simply let you know. Why reimplementing this in qemu as it is done on the kernel with the safe policy/value infra.

qmp query-cpu-definitions, users maybe okay with giving up some blocker features for a named model to run on a host.

I do not catch sorry.

Quoted 6 lines
Quoted 6 lines
Quoted 3 lines

Having a safe value tag in QEMU allows us to provide useful information like named model ‘blockers’/‘unsupported-features’ and supported property values.

This can be achieved in a different way, relying on the kernel. Instantiate a scratch vcpu model and see if it inits. Some scratch vcpu inits are already in place in qemu.

Quoted 8 lines

This is interesting, sadly it only gives us the faulting ID register and not the faulting field.

For example on a non realizable named model, we just get:

```
qemu-system-aarch64: Could not set register system register op0:3 op1:0 crn:0 crm:7 op2:4 to 100000 (is 0)
```

We can find out the faulting register from this, but not the faulting field.

You have the host ID reg (0) and the value you try to apply. An xor can easily give you the fields that differ but not necessarily the field that caused the actual write issue if several of them differ. But what are you proposing to improve that atm?

Quoted 47 lines

Without per-field information, libvirt cannot translate this into a <blocker name='feat_AES'/> element. It can only say 'something in ID_AA64ISAR0_EL1 is wrong'.

Quoted 7 lines
Quoted 3 lines

I feel the above should also be present for the customizable host model series [1], providing valid values along with properties is much more useful for management stack.

you can already introspect which ID reg are writables. You cannot get the values that are valid for that host but any attempt to write invalid values already fail the vcpu init. I tested that with kernel ID_FILTERED id regs.

Again, I feel there should be properties for all fields not just the writable fields.

Quoted 33 lines
Quoted 33 lines
Quoted 21 lines
Quoted 21 lines

* Default value: The value to which the field is reset. This gives CPU models a clean cpu.isar.idregs[] baseline instead of the host view provided by the kernel, as in previous designs. This also complements the forward-compatibility story. Given the "default" values, higher levels need not worry about new fields/registers being introduced.
* Architecturally defined named values like "off", "aes", "pmull", etc.
* These values are derived from the kernel's ftr_bits array and tools/sysreg file.
E.g:

   IDREG_START(ID_AA64ISAR0)
   IDREG_FIELD_START(ID_AA64ISAR0, AES, 4, 4, LOWER, 0)
   IDREG_FIELD_ARCH_VAL(0b0000, "off")
   IDREG_FIELD_ARCH_VAL(0b0001, "aes")
   IDREG_FIELD_ARCH_VAL(0b0010, "pmull")
   IDREG_FIELD_END(ID_AA64ISAR0, AES)
      ....
      IDREG_END(ID_AA64ISAR0)
Quoted 4 lines
Quoted 1 line

- This layer is the single source of truth for ARM64 ID registers.

single source of truth extracted from the kernel and not from the spec. What if we discover a bug in ARM64_FTR_BITS chang default or safe value for instance. How does the change propagate to qemu and existing models?

Relaxation of safe value tag is safe, (EXACT -> LOWER -> ANY). Change in default value should not happen; instead, that should be handled with the “kvm-base” model, which is defined for KVM quirks. Same implications as ARM ARM changes the field’s semantics.

Quoted 3 lines
Quoted 1 line

The default values and safe-value tags are manually derived from the

default value, if equal to reset value could be extracted from the spec directly.

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

Again, I checked AARCHMRS_OPENSOURCE_A_profile_FAT-2026-03/Registers.json, and the reset values were null. I may be missing something. Is there any other place we can get ARM ARM defined reset values? We can modify the script in [1] to also have default values for named model infra.

I guess it is normal because those regs are ID regs. The minimum level of support comes from the various revisions and reference core

NI vals from kernel’s sysreg are very useful… I will let community decide on how we should maintain default values.

NI?

Quoted 34 lines
Quoted 3 lines

implementations. To me this is the huge job that needs to be done while defining the various named models you drafted.

That absolutely needs to be done if we don’t want to leak host features and provide strict migration contract.

Quoted 19 lines
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines

kernel's ftr_bits array. Other boilerplate and arch-defined values are script-generated.

- AArch32 ID registers are added with a single field so they can be zeroed out on hosts that support AArch32.

- This layer also defines helpers for higher layers to extract and manipulate ID register fields.
* arm_idregs_reset_to_defaults(): Reset all ID registers to their default values.
* arm_idreg_field_read/write(): Read the value of an ID register field.
* arm_arch_val_name/from_name(): Look up the arch-defined name for a numeric field value.
* ...

Quoted 4 lines
Quoted 3 lines

this is a pity we have not exchanged on this earlier because that code could have been shared instead of rewriting things and resetting all credits.

Let’s work together from now on :)

Quoted 9 lines

yeah the problem is you reimplemented a different infrastructure for the same prop granularity as you did not rely nor ever commented on the original series. So the first thing is to converge on the base infra (props) definition and then build layered named models on top of it. As we do not agree for now, let's wait for other's comments... I a bit frustrated you did not communicate with us before so that we could have initiated cooperation before and even make the original series evolve in the direction you needed for named vcpu models.

Quoted 3 lines

Our intention was not to reimplement the infrastructure, We first thought of implementing on top of v3 of [1], but that looked like not being actively worked on. For business deadlines we had to implement model realization.

You may have seen we did not get that many feedbacks either (including yours) and some prerequisite series were needed ;-) I hope we will now have more traction in the community.

Quoted 222 lines

Our model realisation code can work on [1] if just default values/reset values are present.

If complexities of safe-value tags and their advantage (as mentioned previously) are not acceptable by the community, we will rebase our model realization logic on top of [1] while also adding default values.

Quoted 3 lines

But anyway, my end goal is to get those named models in a decent timeframe so I am obviously willing to cooperate, hence the time I spend reviewing your alternative implementation ;-)

Thanks for the detailed review, I am certain we both can make progress.

Quoted 95 lines
Quoted 31 lines
Quoted 6 lines
Quoted 6 lines

- This layer creates the following tables using X-macro expansion:
* arm_idregs[]: Array of ID register descriptors.
* arm_field_locs[]: Array of field location descriptors. (fieldIDx -> registerIndex, fieldIndex)
* ...

Quoted 6 lines
Quoted 4 lines

- The ArmIdReg struct also includes a writable_mask to track which bits are writable by KVM. This is populated at runtime during scratch VM creation, and is further used to validate that only the writable bits are modified by the CPU model.

this is an interesting idea that could have been also used in previous contributions.

Acked.

Quoted 17 lines
Quoted 17 lines

2. ARM Properties Layer:
A small property layer on top of the ID Register Field table is defined. This series defines two types of properties with plans for one more in the future:
- Single field properties: These represent ARM FEAT_X features that correspond to a single ID register field. Example: feat_AES, feat_SHA2, etc.

The property name is set as "feat_<FieldName>" and possible values are the arch-defined named values. This can be further categorized into:
* STRING: multi-bit fields (>=2 bits) with arch-defined named values, example: feat_AES, feat_SHA2, etc.
* BOOLEAN: 1-bit fields only (true/false)
example: hw_prop_IDC, hw_prop_DIC, etc.
* NUMERIC: IDREG_ANY fields with no named values (raw integer)
example: hw_prop_BS, hw_prop_DZP, etc.

Quoted 7 lines
Quoted 2 lines

I just wonder if we need all that complexity if eventually we hardcode values in named vcpu models

Then we are just delegating the complexity to the management stack. For example, without fractional prop, the management stack must know CSV2, CSV2_Frac relation, and not all value combination of <CSV2>.<CSV2_Frac> are valid. Rather than having different management software solving the same problem, we can solve it once in QEMU.

well, named vcpu models hardcode 90% of the values, aren't they. Scratch vcpu init attempts can let management layers know what named vcpu models would work on that host I guess.

Quoted 10 lines

We also have very active plans to hook up cpu-definitions, cpu-model-expansion, and more.

Quoted 8 lines
Quoted 8 lines

String property values are validated against the arch-defined named values.

ID register fields that are not covered by single field properties are also exposed as a property named hw_prop_FieldName. These are usually implementation-defined values like cache geometry, debug counter widths, etc. (CTR_EL0.*, DCZID_EL0.*, etc.)
Example: hw_prop_BS, hw_prop_DZP, etc.

Quoted 4 lines
Quoted 2 lines

how do you discriminate between those and field_ props? Again do we need that complexity?

Ummm, there is no special code for these props. They are just named differently as no ARM ARM FEAT_ relate to them.

Yes but I mean for the end user, this ends up with different prop names which does not make their life easier to me, instead of SYS_REG_FIELD pattern. also keep in mind that FEAT_ props are not, strictly speaking what the spec call FEAT.

Quoted 36 lines
Quoted 36 lines
Quoted 36 lines

Single field properties are defined as:

ARM_PROP("prop_name", type, reg, field) Example:
ARM_PROP("feat_AES", STRING, ID_AA64ISAR0, AES)

* Validation based on safe-value tags is yet to be implemented.

- Fractional properties: These represent ARM FEAT_X features that use two fields (base + frac) across registers. Example: feat_CSV2, feat_MPAM, etc.

The property name is set as "feat_<BaseFieldName>" and possible values are the arch-defined string values like "0.0", "1.0", "1.1", etc.

Fractional properties are defined as:
ARM_FRACTIONAL_PROP("prop_name", base_reg, base_field, frac_reg, frac_field) Example:
ARM_FRACTIONAL_PROP("feat_CSV2", ID_AA64PFR0, CSV2, ID_AA64PFR1, CSV2_FRAC)

When a fractional property is set, both the base field and frac field values are set to the corresponding values.
E.g: feat_CSV2=1.1 will set ID_AA64PFR0.CSV2=1 and ID_AA64PFR1.CSV2_FRAC=1.

- Composite properties (planned for v2):
These will act as master boolean switches that control a list of fields. Example: pauth, sve, etc. Setting sve=on with a named model will set all the SVE-related fields (ID_AA64ZFR0_EL1.*) along with sveNNN vector-length. Similarly, setting pauth=on will set APA, GPA, API, GPA3, GPI, GPA3 fields based on the named model.

- cpu_revision, cpu_partnum, etc. properties are introduced to expose MIDR, REVIDR, AIDR fields.

Quoted 6 lines
Quoted 5 lines
Quoted 3 lines
Quoted 2 lines

Exceptions to the property naming are made for ID_AA64PFR0_EL1.ELx fields, which are named elx_mode.

yet another naming exception.

A better name is always welcome! We can iterate over both the prop name and the value name.

yeah but is it making end user life easier?

We believe so.

Quoted 10 lines
Quoted 5 lines
Quoted 4 lines
Quoted 2 lines

This series defines over 130 single field properties plus 4 fractional properties. All properties work with -cpu host also.

Similary as with the host "custom" series, one needs to address collision between legacy cpu properties and low level ones too.

Agreed, This needs more thoughts. It is not a part of this RFC.

I have further thought on this when respinning the original series into v5. I believe the props can follow a hierarchy. ID reg field props are the lowest level props and apply first. Then come the higher level legacy options that are likely to override them. I am waiting for comments on the series but this is proposal I would make.

Interesting, will look through the v5 code.

Quoted 21 lines
Quoted 21 lines
Quoted 21 lines
Quoted 21 lines

All properties change the cpu.isar.idregs[] values which are later written back to KVM at the end of kvm_arch_init_vcpu().

* The arch-defined named values and property names can be iterated until they make sense.

3. ARM CPU Model Hierarchy:

A small named model layer is defined on top of the properties. An ARM named CPU model defines a list of property values and a parent model. A child model naturally inherits all the properties from its parent and can override them when needed.

The initial model hierarchy shipped here is:

  kvm-base-v1                  KVM-imposed quirks
    arm-v8_4-a-v1              ARMv8.4-A architectural mandate
        neoverse-v1-v1         Neoverse V1

graviton3-v1 AWS Graviton3
arm-v9_0-a-v1 ARMv9.0-A architectural deltas on top of ARM-v8_4-a-v1
neoverse-v2-v1 Neoverse V2
grace-v1 NVIDIA Grace

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

Do you have a strategy for named model validation, besides code review. At least each vcpu named model shall be introduced in separate patch, overrides clearly explained and links to the reference spec shall be precisely given for review.

Agreed, each model should be in a separate patch, with overrides and new introductions clearly mentioned/documented with supporting ID register dumps.

Yes I believe it is a huge work to assess the correctness of the definition.

I hope in long term vendors will chime in.

Quoted 54 lines
Quoted 29 lines
Quoted 6 lines
Quoted 6 lines

(kvm-base-v1 and arm-vX are not meant to be realizable unless the user provides values for implementation-defined fields)

So for example, grace-v1 defines Crypto fields and CTR_EL0.IDC/DIC on top of neoverse-v2-v1, which leaves those fields vendor-configurable.

Quoted 8 lines
Quoted 7 lines

The hierarchy reflects a deliberate trade-off:
- Architecture-level models (arm-v8_4-a-v1) maximize migration compatibility but lack implementation-defined values.
- Reference-core models (neoverse-v2-v1) enable migration across SoCs sharing the same core design.
- SoC models (grace-v1) expose the full hardware feature set but limit migration to hosts with the same SoC.

What kind of migration did you exercise up to now?

Successful same host migration with named models and migration from grace to graviton3 with neoverse-v1.

Quoted 12 lines
Quoted 12 lines

At model realization time,
1. a clean slate of cpu.isar.idregs[] is created using arm_idregs_reset_to_defaults().
2. Then, a model's full parent-chain is walked and all properties are applied in order from parent to child.
3. Finally, kvm_arm_writeback_idregs() compares the model's desired ID-register values against the host-provided cpreg snapshot and writes back the writable bits, warning on any non-writable difference.

Models will follow a monotonic versioning convention (grace-v1, grace-v2, ...) mirroring x86's scheme.

Quoted 7 lines
Quoted 4 lines
Quoted 3 lines

* Please take the CPU model property values with a grain of salt. They are added based on what the guest-visible values are with "host" model on available hardware.

I don't catch the above statement.

They don’t match the exact hardware specs. For example feat_CSV2 is capped at “1.0” by KVM regardless of what the hardware says. On Neoverse-v2, TRM says FEAT_CSV2_2 is implemented (i.e “2.0”)

OK. This is effectively an important aspect that, despite the value we attempt to set on an ID reg field, KVM eventually does what he wants with it according to its policy. I think it can ignore, sanitize, ...

Quoted 15 lines
Quoted 15 lines
Quoted 9 lines

Benefits of this design:
- General benefits that come with properties and named CPU models, like cross-host live migration, management-stack control over feature exposure, etc.
- Forward compatibility: when a new ID register or field is introduced, CPU models need not change; during realization they will be populated with the default values. Only ID register/field information needs to be added to the field table.
- As CPU models are hierarchical, defining a new model is much easier.

I like the hierarchical approach but to be honest, at the moment, I miss knowledge on whether it safely applies. I agree that named vcpu models are the end target goal while [1] is rather an intermediate step that was paving the way for it. I rather saw [1] as a tool box for enhaving the host model and understanding issues when migrating. I wish we could share the foundations instead of having totally separate contributions.

Quoted 6 lines
Quoted 3 lines

Definitely, let’s build a common foundation. We need to agree on safe-value tags, default values, and value names. We can build our solution on top of [1], if at least safe-value tags and default values are present.

To me there are several aspects
1) decide which ID reg properties are needed/better (unique uint64_t or your various prop flavours)

We will agree on whatever community agrees on. If our names are discouraged we will move to [1]’s prop names.

Quoted 70 lines
Quoted 3 lines

2) usage of safe policy/value (is it really mandated). Why can't we use scratch vcpus. Possibly if it is proven to be mandatory this is independent on 1

Default-values/reset-values are absolutely needed. safe-value tags are also a must have if we want parity with x86 QEMU’s qmp capabilities.

Warm Regards,
Khushit

Quoted 61 lines

3) definition of named models

Thanks

Eric

Quoted 56 lines
Quoted 3 lines
Quoted 1 line

- The property names and values are self-documenting.

not really sorry (because it does not match the spec). I don't think we can ask the end-user to read the kernel code.

Acked, We will add appropriate documentation in QEMU.

Quoted 9 lines
Quoted 8 lines

NOTE: ~2200 of the ~3300 added lines are declarative (field table, model definitions, properties, etc.)

Tested with KVM on an NVIDIA Grace host.

Relationship with existing code base:
- It does not change any TCG-based code paths.
- For KVM host passthrough it just adds property support.

with hardcoded reset values, correct? Instead of host retrived values?

Reset values are not used with the -cpu host. Only for the named model realization, reset values are used.

Quoted 3 lines
Quoted 1 line

- Does not change any existing properties or other code paths.

yes but if it words along with legacy options, you share our concern to coexist with them

Yes, it requires some more thoughts.

Quoted 8 lines
Quoted 1 line

- Can layer on top of the SYSREG_ property series [1].

but in that case why don't you simply reuse it to build the named vcpu model. I don't say the previous properties are the ideal solution but I am not sure the mix or heterogenously named ones introduced here + value strings retrieved from the kernel are better. At least the SYSREG ones matched the spec with raw values, which bring simplicity in the code. And since the end user shall be so much involved in provided extra SYSREG values himself on top of named vcpu models, ...

We can build on [1] as long as we have default values and safe-value tags. They are required for the proper model realization and QMP integration.

Quoted 16 lines
Quoted 2 lines

Planned Follow-ups:
- Composite properties with handling of sve, pauth for named models.

yes this is needed and I am currently working on this on [1]

Quoted 5 lines

- CLIDR_EL1 and CCSIDR_EL1 handling.
- Safe-value based validation logic.
- QMP commands like query-cpu-model-expansion are not hooked yet. Blockers and supported values (calculated using safe-value tags and runtime KVM writable masks) will be reported through them.

Quoted 8 lines

E.g. libvirt could report:
<property name='feat_AES' type='string' value='pmull'
supports='off,aes,pmull'/>
and:
<cpu type='kvm' name='nvidia-grace-v1'
typename='arm-nvidia-grace-v1-arm-cpu' usable='no'>
<blocker name='feat_AES'/>
</cpu>

Quoted 5 lines

adding Andrea for libvirt inputs

Thanks

Eric

Warm Regards,
Khushit

Thanks

Eric

#34 lore raw
Quoted 124 lines · Eric Auger

!-------------------------------------------------------------------|
CAUTION: External Email

|-------------------------------------------------------------------!

Hi Khushit,

Quoted 113 lines · Khushit Shah
Quoted 101 lines · Eric Auger

!-------------------------------------------------------------------|
CAUTION: External Email

|-------------------------------------------------------------------!

Hi Khushit,

Quoted 90 lines · Khushit Shah
Quoted 46 lines · Shaju Abraham

Get Outlook for Mac
From: Eric Auger <[email protected]>
Date: Monday, 18 May 2026 at 3:57 PM
To: Shaju Abraham <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, Andrea Bolognani <[email protected]>
Subject: Re: [RFC PATCH v1 00/13] named CPU models for ARM64 on KVM

!-------------------------------------------------------------------|
CAUTION: External Email

|-------------------------------------------------------------------!

Hi Shaju,˝

Quoted 19 lines · Shaju Abraham

Hi All,

This RFC introduces "named" CPU models for ARM64 KVM guests. This is foundational for cross-host live migration and management-stack control over individual CPU features exposed to the guest.

TL;DR Examples:
# Boot with Grace CPU model
qemu-system-aarch64 -cpu grace-v1 -machine virt,accel=kvm ...

# Grace with a feature disabled qemu-system-aarch64 -cpu grace-v1,feat_SHA1=off ...

# Host passthrough with individual feature control qemu-system-aarch64 -cpu host,feat_AES=aes ...

# Neoverse v2 on Grace.
qemu-system-aarch64 -cpu neoverse-v2-v1

Quoted 8 lines

# Migration from Grace to Graviton3 (TBD)
qemu-system-aarch64 -cpu neoverse-v1-v1 ...

Relationship with Auger/Huck's customizable host model [1]:
We have been working on this series in parallel with [1]. Eric Auger and Cornelia Huck's series [1] exposes raw SYSREG_<REG>_<FIELD> uint64 properties on -cpu host, providing the essential low-level knobs for ID register customization. This RFC builds on the same KVM capability

Please find some comments/questions below.

Quoted 8 lines
Quoted 4 lines

and can be layered on top of [1]:
- Human-readable property names: feat_AES=pmull instead of SYSREG_ID_AA64ISAR0_EL1_AES=2, with arch-defined named values validated at set time.

From what I understand what you call feature here refers to an ARM64_FTR_BITS definition in kernel arch/arm64/kernel/cpufeatures.c. Named string values, safe policy and safe value are all extracted from the kernel implementation and do not stem from the ARM ARM itself.

Correct, a CPU feature (that we talk about) is not the same as ARM ARM defined FEAT_*. As you say below, they really are much more complex to model. But sve, pauth defined by QEMU, are also not an ARM ARM defined FEAT. Because of the complexities of ARM ARM FEAT_s, we decided to go with ID register field-based properties with abstractions like (fractional and composites) on top.

Yes, value names, safe policy, and safe value are taken from the kernel. But in most cases, value names already correlate with ARM ARM.

For example,ID_AA64ISAR1_EL1.LS64:

ARM ARM says:
FEAT_LS64 implements the functionality identified by 0b0001. FEAT_LS64_V implements the functionality identified by 0b0010. FEAT_LS64_ACCDATA implements the functionality identified by 0b0011. FEAT_LS64WB implements the functionality identified by 0b0100.

Named values in cpu-idregs.h.inc:
IDREG_FIELD_START(ID_AA64ISAR1, LS64, 60, 4, EXACT, 0) IDREG_FIELD_ARCH_VAL(0b0000, "off") IDREG_FIELD_ARCH_VAL(0b0001, "ls64") IDREG_FIELD_ARCH_VAL(0b0010, "ls64_v") IDREG_FIELD_ARCH_VAL(0b0011, "ls64_accdata") IDREG_FIELD_ARCH_VAL(0b0100, "ls64wb") IDREG_FIELD_END(ID_AA64ISAR1, LS64)

Values names are: lowered feat names with FEAT_ removed.

For “on”/“off” toggle features: for example (XS, just below LS64):
We have:
IDREG_FIELD_START(ID_AA64ISAR1, XS, 56, 4, LOWER, 0) IDREG_FIELD_ARCH_VAL(0b0000, "off") IDREG_FIELD_ARCH_VAL(0b0001, "on") IDREG_FIELD_END(ID_AA64ISAR1, XS)

Quoted 6 lines
Quoted 2 lines

ARM ARM says:
FEAT_XS implements the functionality identified by 0b0001.

I agree with you on the fact that in general the association is fine. I am confident that developpers who wrote

arch/arm64/kernel/cpufeatures.c did it in a sensible way. Still the problem comes when the end user/layered products have to guess those string values which are documented/defined nowhere besides in cpufeatures.c. How will they come to know which string values are supported and how they map onto any valid ARM ARM ID reg value? You cannot point them to any reference doc. Refering to past comments, Marc said he would even prefer not using

We can absolutely point them to a reference doc, like cpu-features.rst, where we can document, property names, supported values and their meaning.

Quoted 1 line

kernel sysreg as a root of trust (hence the choice of extracting info from AARCHMRS) so I anticipate using arch/arm64/kernel/cpufeatures.c as input may be frown upon. But I may be wrong.

Okay, will wait for community to reply on this.

Quoted 7 lines
Quoted 6 lines
Quoted 4 lines

I guess the usage of string values really depends on how many props layered products or user will need to set explicitly. Assuming we expose named models and this will be the main use case, my assumption is quite a few props will remain to be overriden on top of named model hardcorded values. And since the prop granularity is very low level anyway, if the end user has to identify and set an ID reg field, it can also set the associated uint64 value directly.

My point is that compared to the original series Connie and I have been pushing,
- you still use the same prop granularity (ID reg field), somehow abusively called feature

Not all are prop granularity are field level, FRAC and COMPOSITES (like sve, pauth for named models, will be in v2) are higher level constructs.

Currently only FRAC prop abstraction differ.

Yes. Composites on the way.

Quoted 22 lines
Quoted 9 lines
Quoted 6 lines

- you add significant complexity related to the string values (which are not referenced anywhere in the spec)
- you also add significant complexity related to different kinds and name patterns of props (FRAC, STRING, BOOLEAN, NUMERIC) while we only used SYSREG_REG_FIELD uint64_t props.

While I am really interested in layering up named models on top of ID reg field properties, or even a real feature upper level abstraction, I am not sure the above extra complexity is worth while keeping the original IDreg field granularity.

Ignoring the prop names and value names which seems to be your main concern, our named model realization are not tied to those. They can work on top of SYSREG_<REG>_<FIELD> props.

Well, there is also the need/usage of safe policy and default value, see below.

Quoted 11 lines
Quoted 11 lines
Quoted 8 lines

There may be a few value names that do not make sense right now, but that does not de-merit the idea that perfectly works for most fields.

Regarding the safe-value tag, I feel that it is the one thing that must come from the kernel; in the end, KVM is gonna validate based on that. If the static file feels problematic, another option is to introduce a new KVM ioctl. We are fine with both.

safe policy and value are kernel defined. To be honest I still fail to understand why they are mandated for named vcpu models. Please could elaborate again?

Quoted 7 lines
Quoted 6 lines

Use of safe-policy tag in QEMU:
- validate the configuration generated by named model or -cpu host, with modified props are valid and not over promising host capability. (Which you say to just delegate to KVM, x86 also validates in:
x86_cpu_filter_features, and blocks realization in x86_cpu_realizefn if enforce is passed.).

where is the safe rule currently used in this series?

Scope of v2. As replied on your series, with safe rules QEMU can let layered products know what values a property can be set to on the given host.

Like with a qmp command like query-props-info:

       ...
       {
           "name": "feat_RDM",
           "supported-values": [
               "off",
               "on"
           ],
           "type": "string"
       },
       {
           "name": "feat_ATOMIC",
           "supported-values": [
               "off",
               "on"
           ],
           "type": "string"
       },
       {
           "name": "feat_CRC32",
           "supported-values": [
               "off",
               "on"
           ],
           "type": "string"
       },
       {
           "name": "feat_SHA2",
           "supported-values": [
               "off",
               "sha256",
               "sha512"
           ],
           "type": "string"
       },
       {
           "name": "feat_SHA1",
           "supported-values": [
               "off",
               "on"
           ],
           "type": "string"
       },
       {
           "name": "feat_AES",
           "supported-values": [
               "off",
               "aes",
               "pmull"
           ],
           "type": "string"
       }
       {
           "name": "feat_NV",
           "supported-values": [
               "0.0"
           ],
           "type": "string"
       },
       {
           "name": "feat_RAS",
           "supported-values": [
               "0.0",
               "1.0",
               "1.1_base"
           ],
           "type": "string"
       },
       {
           "name": "feat_MPAM",
           "supported-values": [
               "0.0"
           ],
           "type": "string"
       },
       {
           "name": "feat_CSV2",
           "supported-values": [
               "0.0",
               "1.0"
           ],
           "type": "string"
       },
       ...

We get values supported for a property on the given host.
For example MPAM is not writable by KVM, hence only one supported value “0.0”,
CSV2 on the host is only “1.0” (architecturally, 2.0 is also valid), hence only “0.0” and “1.0” in the supported values.

Quoted 8 lines
Quoted 7 lines

- Properly report blockers in query-cpu-definitions. Without safe-value tag, it is not possible to report per ID reg field blockers in query-cpu-defnitions.

Quoted 5 lines

How does query-cpu-definitions help today? query-cpu-definitions does not seem to return that kind of info. Filtering host cpu model it just returns:
{"name": "host", "typename": "host-arm-cpu", "static": false, "deprecated": false}]]

With our v2 patches: qeury-cpu-definitions will return along the lines of:

(Notice the blockers for named models we define in v1)
(Collected on Graviton3 host; hence no blockers for neoverse-v1-v1 or graviton3-v1)

{
"execute": "query-cpu-definitions"
},

{
    "return": [
        {
            "name": "neoverse-n2",
            "typename": "neoverse-n2-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-a15",
            "typename": "cortex-a15-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-m4",
            "typename": "cortex-m4-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-a57",
            "typename": "cortex-a57-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "arm1176",
            "typename": "arm1176-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-a7",
            "typename": "cortex-a7-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-a76",
            "typename": "cortex-a76-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "a64fx",
            "typename": "a64fx-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-a8",
            "typename": "cortex-a8-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "neoverse-v1",
            "typename": "neoverse-v1-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "kvm-base-v1",
            "typename": "kvm-base-v1-arm-cpu",
            "unavailable-features": [
                "hw_prop_BS",
                "hw_prop_CWG",
                "hw_prop_ERG",
                "feat_E2H0",
                "feat_EVT",
                "hw_prop_FWB",
                "hw_prop_IDS",
                "feat_XNX",
                "feat_VH",
                "hw_prop_VMIDBITS",
                "hw_prop_ASIDBITS",
                "hw_prop_CTX_CMPs",
                "hw_prop_BRPS",
                "feat_AdvSIMD",
                "feat_FP"
            ],
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-r5",
            "typename": "cortex-r5-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "grace-v1",
            "typename": "grace-v1-arm-cpu",
            "unavailable-features": [
                "feat_E0PD",
                "feat_TTL",
                "hw_prop_ST",
                "feat_PAN",
                "hw_prop_TGRAN4_2",
                "hw_prop_TGRAN64_2",
                "hw_prop_TGRAN16_2",
                "feat_SPECRES",
                "feat_SB",
                "feat_FRINTTS",
                "hw_prop_APA",
                "feat_TLB",
                "feat_TS",
                "feat_PMU",
                "feat_BT",
                "feat_SEL2"
            ],
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-r5f",
            "typename": "cortex-r5f-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "ti925t",
            "typename": "ti925t-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "arm1026",
            "typename": "arm1026-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-a9",
            "typename": "cortex-a9-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-m7",
            "typename": "cortex-m7-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "neoverse-v1-v1",
            "typename": "neoverse-v1-v1-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "graviton3-v1",
            "typename": "graviton3-v1-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-a710",
            "typename": "cortex-a710-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "arm-v9_0-a-v1",
            "typename": "arm-v9_0-a-v1-arm-cpu",
            "unavailable-features": [
                "hw_prop_BS",
                "hw_prop_CWG",
                "hw_prop_ERG",
                "feat_E2H0",
                "feat_E0PD",
                "feat_EVT",
                "hw_prop_FWB",
                "hw_prop_VMIDBITS",
                "hw_prop_ASIDBITS",
                "feat_SPECRES",
                "feat_SB",
                "feat_FRINTTS",
                "feat_TS",
                "hw_prop_CTX_CMPs",
                "hw_prop_BRPS",
                "feat_BT",
                "feat_SEL2",
                "feat_AdvSIMD",
                "feat_FP"
            ],
            "static": false,
            "deprecated": false
        },
        {
            "name": "neoverse-v2-v1",
            "typename": "neoverse-v2-v1-arm-cpu",
            "unavailable-features": [
                "feat_E0PD",
                "feat_TTL",
                "hw_prop_ST",
                "feat_PAN",
                "hw_prop_TGRAN4_2",
                "hw_prop_TGRAN64_2",
                "hw_prop_TGRAN16_2",
                "feat_SPECRES",
                "feat_SB",
                "feat_FRINTTS",
                "hw_prop_APA",
                "feat_TLB",
                "feat_TS",
                "feat_PMU",
                "feat_BT",
                "feat_SEL2"
            ],
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-r52",
            "typename": "cortex-r52-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "sa1110",
            "typename": "sa1110-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "sa1100",
            "typename": "sa1100-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "max",
            "typename": "max-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-m0",
            "typename": "cortex-m0-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-a53",
            "typename": "cortex-a53-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "arm-v8_4-a-v1",
            "typename": "arm-v8_4-a-v1-arm-cpu",
            "unavailable-features": [
                "hw_prop_BS",
                "hw_prop_CWG",
                "hw_prop_ERG",
                "feat_E2H0",
                "feat_EVT",
                "hw_prop_FWB",
                "feat_XNX",
                "feat_VH",
                "hw_prop_VMIDBITS",
                "hw_prop_ASIDBITS",
                "hw_prop_CTX_CMPs",
                "hw_prop_BRPS",
                "feat_AdvSIMD",
                "feat_FP"
            ],
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-m33",
            "typename": "cortex-m33-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-a72",
            "typename": "cortex-a72-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-a78ae",
            "typename": "cortex-a78ae-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "arm946",
            "typename": "arm946-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-a55",
            "typename": "cortex-a55-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "host",
            "typename": "host-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "arm11mpcore",
            "typename": "arm11mpcore-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-m55",
            "typename": "cortex-m55-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "neoverse-n1",
            "typename": "neoverse-n1-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "arm926",
            "typename": "arm926-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "arm1136",
            "typename": "arm1136-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-a35",
            "typename": "cortex-a35-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "arm1136-r2",
            "typename": "arm1136-r2-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-m3",
            "typename": "cortex-m3-arm-cpu",
            "static": false,
            "deprecated": false
        }
    ]
}

Now imagine a layered product which sets some properties values on top of named models Like -cpu graviton3,feat_AES=aes, “feat_AES” might be a blocker for the graviton3 named model (assume graviton3 named model sets feat_AES="pmull" and host only supports "aes”)

Then with the two json qmp outputs from above can be used by layered products to infer that even tho graviton3 is blocked by feat_AES, It setting a valid value on top so, The model + (feat_AES=aes) will be realisable on the given host.

Quoted 19 lines
Quoted 7 lines
Quoted 5 lines

Why can't you start from the host values and override them with the named vcpu model settings? If the new value cannot be applied by KVM, it will reject it and fail the vcpu init.

I think you are mixing up two things. For safe-value tag argument, Yes, but then what about proper query-cpu-definitions integration?

See above, what do you mean?

Quoted 4 lines

For named model we cannot start with host-values. As different KVM versions or host might expose different set of fields, or ARM ARM defining a new ID register or a new field in existing ID register.

I understand a named vcpu model shall be fully determined, ie. all ID regs shall be set to a relevant value determined by the vcpu model. To me those default values rather depend on the VCPU model. a v8 default value may not be the same as a v9 value because a feature has become mandated. So why aren't the default values set within the vcpu model definition instead of intarget/arm/cpu-idregs.h.inc?

Quoted 4 lines

Then you have 2 categories of fields: writable or not. If you want to try and set all field values, effectively you may need to define props for fields which are even not writable. This can easily evolve from the original series [1].

What if a new id register is introduced? This is need all the already defined named models to have values for those also.

Quoted 9 lines
Quoted 3 lines

A model needs to be future compatible and provide exact set of ID register values on any host/kernel it runs on.

I am not really sure this is always feasible. Assuming there is a bug fix in the kernel that changes the way an ID reg access is sanitized/accepted/rejected, you may break the vcpu model. ie. a former ID reg value may have been accepted and is not anymore or conversely.

But on the principle I agree with you.

If a value cannot be shown to the guest, the model should not be realisable, simple right? For these cases we will have -v2, -v3, …. But v1 should never Change the set of ID register values it shows to the guest.

Quoted 6 lines
Quoted 5 lines

This is the exact reason why we have default values. Simply 0ing the whole idregs[] does not work because of SIGNED_LOWER features like FP (and more) or RES1 fields in CTR_EL0 etc; Something should say what the default value of a register should be.

yeah but still isn't it named model specific?

This also works if we know what happens when a new ID register is introduced.

Quoted 32 lines
Quoted 6 lines
Quoted 4 lines

Moreover if one ID reg field that needs to be overriden is not writable with that host kernel, the prop won't exist and the named model won't work on that host either.

Why only add prop for writable fields in [1]? There must be props for all fields. Anyway if non writable fields differ, it will be caught by KVM.

Up to now the goal of [1] was slighly different, ie. allowing to slighly alter ID reg values compared to host passthrough values so that the model becomes migratable between 2 machines. We had cases where only altering one CTR_EL0 field made it migratable for instance. Also in [1] there was not real point exposing a property for an ID reg field that was not writable. However I agree on the fact that for named models things need to be more determistic and you also need to try applying values that are not writable and see if they are the same that host default value.

Quoted 8 lines

For example, a named model might be blocked because of a non-writable field is differing from host and the prop for the same is not present. (Let’s say model abc, wants field FP=fp16 (not writable by KVM), but the host has value FP=on).

But user should be absolutely be able to make the model realisable by passing -cpu abc,FP=on.

agreed

Quoted 7 lines

Even without named models, I assume end goal of customisable host models would be a way to see if on a cluster of slightly differing cpus can we have a common denominator of features to expose to enable migration between hosts. If we do not exposes non-writable fields, how will higher stack know what are the values of non-writable fields on a host? And if non-writable fields are ignored, we can not provide a strict migration contract.

Quoted 8 lines

At the moment it was more a trial and error process I acknowledge. You try to migrate. You get what's wrong through traces on destination side. Then you alter the ID reg fields that cause trouble in case they are writable (ie. props are exposed). This is not production grade I agree. But even with your current approach you still fail to provide tools for layered products to understand what named model applies to this host and can be migrated to another one, I think.

we just sent v1 for comments, v2 as mentioned already takes care of all this cases. It is WIP and needs some polishing. But main qmp reponses I have shared above.

Quoted 5 lines

Note that if we expose everything through props, you well get all the values on src and dst that mismatch but you will fail to know which mismatches are correctable (because you don't know whether fields are writable) ;-) How can you eventually determine the mismatch is fixable?

Some new qmp command like “query-props-info” I shared above.

Quoted 113 lines
Quoted 60 lines
Quoted 11 lines
Quoted 11 lines

Regarding default values, I do not see any reset values populated in AARCHMRS_OPENSOURCE_A_profile_FAT-2026-03/Registers.json, I may be missing something here. Is there some other place where we can find ARM ARM defined reset values?

Quoted 3 lines

If the named vcpu models anyway use hardcoded values I wonder if it is so important to have named string values whereas a comment would do the job in the named vcpu model definition?

Quoted 8 lines
Quoted 3 lines

While true, for a named model, numerical field values will suffice as well. It’s just a way of representation. But for end users, I will argue, named values are more user-friendly.

to me, again, it would be if those values were properly specified which is not the case.

Quoted 2 lines

On x86, the user does not modify a specific cpuid leaf to turn a feature on or off. They have assigned a name to each leaf in the spec. Our value names in most

in the spec ;-) That's a big difference.

As above mentioned example of LS64 (in most cases) ARM ARM does say FEAT_ABC for a value ‘y’. and our name for value 'y' is ‘abc’. We can keep the value names same as ARM ARM (i.e val y = “FEAT_ABC”) if that suits better.

Quoted 37 lines
Quoted 37 lines

cases already make perfect sense, as mentioned above.

Quoted 3 lines

From a spec pov I had in mind that a defintion of a FEAT could be much more complex that just 1 field (for instance could be a combination of several of them)

Agreed. Hence, the ID register field-based properties.

Quoted 2 lines

It is not clear to be if you allow the end-user to overwrite a property on top of a named model setting.

Yes, the end user can change the property on top of the named model as illustrated in the examples.

Quoted 9 lines
Quoted 2 lines

- Default values and forward compatibility: CPU models start from a known-zero baseline rather than the host view, so new fields/registers

[1]

Quoted 6 lines

introduced in future kernels do not silently leak into existing models.
- Named CPU models with hierarchical inheritance: grace-v1, neoverse-v2-v1, etc.

The two series can coexist; this series can be rebased on top of [1].

Quoted 8 lines
Quoted 6 lines

[1] https://urldefense.proofpoint.com/v2/url?u=https-3A__lore.kernel.org_qemu-2Ddevel_20260503073541.790215-2D1-2Deric.auger-40redhat.com_&d=DwIDaQ&c=s883GpUCOChKOHiocYtGcg&r=sY-XeNqcuy_ruBQ9T7A2LmG6ktyYXXSxRB1ljkxMepI&m=fpNKdg99IJhj_lpxANCw1YCGZfWRAyz1YWNycq_dH0Rdg8U46NwjIJ3BvFyYb-e7&s=xzjnJMwOvSYbQjuaej-yNezaOn0DWWfAJho6IG_AEto&e=

Problems with defining "named" CPU models for ARM64 KVM guests:
* Features are not single CPUID bits. They are mostly multi-bit fields encoding version/level instead of just presence. A single field encodes multiple ARM ARM defined features (FEAT_s) at different thresholds.

would be good to provide an example for each challenge. I remember Connie provided some in the past though her KVM forum presentations.

Acked. Will add in v2.

Quoted 6 lines
Quoted 4 lines

* KVM does not allow all registers and fields to be modified for a guest. Some fields KVM does not virtualise at all (SME) or only support host values (BRPs, CWG, etc.). This is evolving and differs between kernel versions.

this seems to be contradictory to [1]. Do you have a mix of host inherited values and hardcoded value or do you only have hardcoded values?

Quoted 7 lines
Quoted 6 lines
Quoted 3 lines

A named model will not be realizable on a given host if any of the above non-writable fields differ between the host and the named model. We realize the named model fully from a zeroed-out cpu->isar.idregs[] (no host features) exposed. A model is also not

why is it mandated to start from zeroed cpu->isar.idregs[]? Why can't you start with host initialized cpu->isar.idregs[] and overwrite everything that characterizes the named vcpu model.

As explained above, we leak host features.

OK understood. cpu->isar.idregs[] needs to be fully determined. My assumption was that you are not going to run any vcpu model on any host and there was minimal adherence between both, hence my original statement.

Quoted 43 lines
Quoted 43 lines
Quoted 27 lines

realizable on a host if it over-promises features that are not actually available on the host (the need for safe-value tags).

Quoted 23 lines
Quoted 23 lines

* ARM does not have a single natural granularity for CPU models unlike x86. ARM has architecture, reference core and SoC levels each becoming more granular.
* ARM has dozens of vendors and it will be tricky to maintain models for all of them.
* Previous designs started from the host values and then subtracted undesirable features. This is not forward-compatible; the design should work when a new ID register or field is introduced.

With the above problems in mind, the design has 3 layers:

1. ARM ID Register Field Table:
- This layer maintains all architecturally defined ID registers and ID register fields. It includes:
* Field name
* Field shift
* Field length
* Safe-value tag: LOWER, HIGHER, HIGHER_OR_ZERO, SIGNED_LOWER, EXACT, ANY
This will be used to validate user-provided values during CPU realization time against the host's value. I.e., if the host only supports "aes", a CPU model that sets "pmull" should be rejected.

Quoted 6 lines
Quoted 2 lines

why isn't the kernel doing that job already. Setting a value not compatible with the host shall be rejected by the kernel, no?

KVM will reject. But how will management stack know which values are supported? x86 is simpler; a feature is a single-bit toggle. All management stacks infer that if the value of a property is true, false is supported. And, for -cpu host if the property value is false, the feature is not supported on the host.

Well I would imagine that a cloud vendor wants to migrate between different hosts which call for a specific named model (so there is minimal alignment between the vcpu model and the host cpu). In the worst case it is always possible to instantiate scratch named model vcpus and see if the vcpu init succeeds. We could even provide a qmp utility or any other scheme that returns all valid vcpu models for that host. Anyway I think this will be needed. or -cpu help may be enhanced to do that, not simply returning the theoretical named models that are available but the ones which actually apply on that kernel. I can help you investigating that direction if it can come as an alternative.

Quoted 4 lines
Quoted 2 lines

This is fine, we always want to know which model is realisable on host. But also want to know "why a model is not realizable?".

Practically what kind of tools do you bring to know that? which qmp command to you plan to implement?

On v2, we have implemented:
-> cpu-model-expansion: for host and named models, return the property values.
-> cpu-definitions: returned named models, and also populate blockers list with
the properties that makes a model not realisable on the give host.
-> a new qmp command props-info (name not fixed): return what property values can be set on the give host.

Output blurb of query-cpu-definitions and query-props-info are attached above.

Quoted 15 lines
Quoted 15 lines
Quoted 9 lines
Quoted 6 lines

On ARM, we don’t have that luxury; the management stack does not know which values are valid for a property. Ambiguity is:
1. How will management stack even know that a property is writable/modifiable?

this is already available in the original series through

query-cpu-model-expansion

Again as the example above, I feel all fields (nonetheless writable or non-writable) should have a SYSREG_REG_FIELD prop.

Quoted 3 lines
Quoted 3 lines

2. For a 4-bit nibble, are all 16 values valid if it is writable?
a) Lower values than the host?
b) Higher values than the host? etc.

Quoted 6 lines
Quoted 5 lines
Quoted 3 lines

try to apply it and the kernel will simply let you know. Why reimplementing this in qemu as it is done on the kernel with the safe policy/value infra.

qmp query-cpu-definitions, users maybe okay with giving up some blocker features for a named model to run on a host.

I do not catch sorry.

For example on a Grace host, neoverse-v1 model has the following blockers.

{
	"name": "neoverse-v1-v1”,
	"typename": "neoverse-v1-v1-arm-cpu”,
	"unavailable-features": [
		"hw_prop_TGRAN4_2”,
		"hw_prop_TGRAN64_2”,
		"hw_prop_TGRAN16_2”,
		“hw_prop_APA"
	],
	"static": false,
	"deprecated": false
},

I might be okay with giving up pauth (APA) and TGRAN*_2 (nested page sizes) to make neoverse-v1 realizable. With query-props-info I will know all 4 props supports value “off” on the host. So, -cpu neoverse-v1-v1,hw_prop_TGRAN*_2=off,hw_prop_APA=off is actually realizable.

Quoted 14 lines
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines

Having a safe value tag in QEMU allows us to provide useful information like named model ‘blockers’/‘unsupported-features’ and supported property values.

This can be achieved in a different way, relying on the kernel. Instantiate a scratch vcpu model and see if it inits. Some scratch vcpu inits are already in place in qemu.

Quoted 8 lines

This is interesting, sadly it only gives us the faulting ID register and not the faulting field.

For example on a non realizable named model, we just get:

```
qemu-system-aarch64: Could not set register system register op0:3 op1:0 crn:0 crm:7 op2:4 to 100000 (is 0)
```

We can find out the faulting register from this, but not the faulting field.

Quoted 4 lines

You have the host ID reg (0) and the value you try to apply. An xor can easily give you the fields that differ but not necessarily the field that caused the actual write issue if several of them differ. But what are you proposing to improve that atm?

Safe rules.

Quoted 51 lines
Quoted 51 lines

Without per-field information, libvirt cannot translate this into a <blocker name='feat_AES'/> element. It can only say 'something in ID_AA64ISAR0_EL1 is wrong'.

Quoted 7 lines
Quoted 3 lines

I feel the above should also be present for the customizable host model series [1], providing valid values along with properties is much more useful for management stack.

you can already introspect which ID reg are writables. You cannot get the values that are valid for that host but any attempt to write invalid values already fail the vcpu init. I tested that with kernel ID_FILTERED id regs.

Again, I feel there should be properties for all fields not just the writable fields.

Quoted 37 lines
Quoted 37 lines
Quoted 21 lines
Quoted 21 lines

* Default value: The value to which the field is reset. This gives CPU models a clean cpu.isar.idregs[] baseline instead of the host view provided by the kernel, as in previous designs. This also complements the forward-compatibility story. Given the "default" values, higher levels need not worry about new fields/registers being introduced.
* Architecturally defined named values like "off", "aes", "pmull", etc.
* These values are derived from the kernel's ftr_bits array and tools/sysreg file.
E.g:

IDREG_START(ID_AA64ISAR0) IDREG_FIELD_START(ID_AA64ISAR0, AES, 4, 4, LOWER, 0) IDREG_FIELD_ARCH_VAL(0b0000, "off") IDREG_FIELD_ARCH_VAL(0b0001, "aes") IDREG_FIELD_ARCH_VAL(0b0010, "pmull") IDREG_FIELD_END(ID_AA64ISAR0, AES)

     ....
     IDREG_END(ID_AA64ISAR0)
Quoted 4 lines
Quoted 1 line

- This layer is the single source of truth for ARM64 ID registers.

single source of truth extracted from the kernel and not from the spec. What if we discover a bug in ARM64_FTR_BITS chang default or safe value for instance. How does the change propagate to qemu and existing models?

Relaxation of safe value tag is safe, (EXACT -> LOWER -> ANY). Change in default value should not happen; instead, that should be handled with the “kvm-base” model, which is defined for KVM quirks. Same implications as ARM ARM changes the field’s semantics.

Quoted 3 lines
Quoted 1 line

The default values and safe-value tags are manually derived from the

default value, if equal to reset value could be extracted from the spec directly.

Again, I checked AARCHMRS_OPENSOURCE_A_profile_FAT-2026-03/Registers.json, and the reset values were null. I may be missing something. Is there any other place we can get ARM ARM defined reset values? We can modify the script in [1] to also have default values for named model infra.

Quoted 5 lines
Quoted 4 lines
Quoted 2 lines

I guess it is normal because those regs are ID regs. The minimum level of support comes from the various revisions and reference core

NI vals from kernel’s sysreg are very useful… I will let community decide on how we should maintain default values.

NI?

NI is sysreg file indicates the feature is not implemented. That values can be used as the default id reg field value.

Quoted 328 lines
Quoted 34 lines
Quoted 3 lines

implementations. To me this is the huge job that needs to be done while defining the various named models you drafted.

That absolutely needs to be done if we don’t want to leak host features and provide strict migration contract.

Quoted 19 lines
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines

kernel's ftr_bits array. Other boilerplate and arch-defined values are script-generated.

- AArch32 ID registers are added with a single field so they can be zeroed out on hosts that support AArch32.

- This layer also defines helpers for higher layers to extract and manipulate ID register fields.
* arm_idregs_reset_to_defaults(): Reset all ID registers to their default values.
* arm_idreg_field_read/write(): Read the value of an ID register field.
* arm_arch_val_name/from_name(): Look up the arch-defined name for a numeric field value.
* ...

Quoted 4 lines
Quoted 3 lines

this is a pity we have not exchanged on this earlier because that code could have been shared instead of rewriting things and resetting all credits.

Let’s work together from now on :)

Quoted 9 lines

yeah the problem is you reimplemented a different infrastructure for the same prop granularity as you did not rely nor ever commented on the original series. So the first thing is to converge on the base infra (props) definition and then build layered named models on top of it. As we do not agree for now, let's wait for other's comments... I a bit frustrated you did not communicate with us before so that we could have initiated cooperation before and even make the original series evolve in the direction you needed for named vcpu models.

Quoted 3 lines

Our intention was not to reimplement the infrastructure, We first thought of implementing on top of v3 of [1], but that looked like not being actively worked on. For business deadlines we had to implement model realization.

You may have seen we did not get that many feedbacks either (including yours) and some prerequisite series were needed ;-) I hope we will now have more traction in the community.

Quoted 288 lines

Our model realisation code can work on [1] if just default values/reset values are present.

If complexities of safe-value tags and their advantage (as mentioned previously) are not acceptable by the community, we will rebase our model realization logic on top of [1] while also adding default values.

Quoted 3 lines

But anyway, my end goal is to get those named models in a decent timeframe so I am obviously willing to cooperate, hence the time I spend reviewing your alternative implementation ;-)

Thanks for the detailed review, I am certain we both can make progress.

Quoted 95 lines
Quoted 31 lines
Quoted 6 lines
Quoted 6 lines

- This layer creates the following tables using X-macro expansion:
* arm_idregs[]: Array of ID register descriptors.
* arm_field_locs[]: Array of field location descriptors. (fieldIDx -> registerIndex, fieldIndex)
* ...

Quoted 6 lines
Quoted 4 lines

- The ArmIdReg struct also includes a writable_mask to track which bits are writable by KVM. This is populated at runtime during scratch VM creation, and is further used to validate that only the writable bits are modified by the CPU model.

this is an interesting idea that could have been also used in previous contributions.

Acked.

Quoted 17 lines
Quoted 17 lines

2. ARM Properties Layer:
A small property layer on top of the ID Register Field table is defined. This series defines two types of properties with plans for one more in the future:
- Single field properties: These represent ARM FEAT_X features that correspond to a single ID register field. Example: feat_AES, feat_SHA2, etc.

The property name is set as "feat_<FieldName>" and possible values are the arch-defined named values. This can be further categorized into:
* STRING: multi-bit fields (>=2 bits) with arch-defined named values, example: feat_AES, feat_SHA2, etc.
* BOOLEAN: 1-bit fields only (true/false)
example: hw_prop_IDC, hw_prop_DIC, etc.
* NUMERIC: IDREG_ANY fields with no named values (raw integer)
example: hw_prop_BS, hw_prop_DZP, etc.

Quoted 7 lines
Quoted 2 lines

I just wonder if we need all that complexity if eventually we hardcode values in named vcpu models

Then we are just delegating the complexity to the management stack. For example, without fractional prop, the management stack must know CSV2, CSV2_Frac relation, and not all value combination of <CSV2>.<CSV2_Frac> are valid. Rather than having different management software solving the same problem, we can solve it once in QEMU.

well, named vcpu models hardcode 90% of the values, aren't they. Scratch vcpu init attempts can let management layers know what named vcpu models would work on that host I guess.

Quoted 10 lines

We also have very active plans to hook up cpu-definitions, cpu-model-expansion, and more.

Quoted 8 lines
Quoted 8 lines

String property values are validated against the arch-defined named values.

ID register fields that are not covered by single field properties are also exposed as a property named hw_prop_FieldName. These are usually implementation-defined values like cache geometry, debug counter widths, etc. (CTR_EL0.*, DCZID_EL0.*, etc.)
Example: hw_prop_BS, hw_prop_DZP, etc.

Quoted 4 lines
Quoted 2 lines

how do you discriminate between those and field_ props? Again do we need that complexity?

Ummm, there is no special code for these props. They are just named differently as no ARM ARM FEAT_ relate to them.

Yes but I mean for the end user, this ends up with different prop names which does not make their life easier to me, instead of SYS_REG_FIELD pattern. also keep in mind that FEAT_ props are not, strictly speaking what the spec call FEAT.

Quoted 36 lines
Quoted 36 lines
Quoted 36 lines

Single field properties are defined as:

ARM_PROP("prop_name", type, reg, field) Example:
ARM_PROP("feat_AES", STRING, ID_AA64ISAR0, AES)

* Validation based on safe-value tags is yet to be implemented.

- Fractional properties: These represent ARM FEAT_X features that use two fields (base + frac) across registers. Example: feat_CSV2, feat_MPAM, etc.

The property name is set as "feat_<BaseFieldName>" and possible values are the arch-defined string values like "0.0", "1.0", "1.1", etc.

Fractional properties are defined as:
ARM_FRACTIONAL_PROP("prop_name", base_reg, base_field, frac_reg, frac_field) Example:
ARM_FRACTIONAL_PROP("feat_CSV2", ID_AA64PFR0, CSV2, ID_AA64PFR1, CSV2_FRAC)

When a fractional property is set, both the base field and frac field values are set to the corresponding values.
E.g: feat_CSV2=1.1 will set ID_AA64PFR0.CSV2=1 and ID_AA64PFR1.CSV2_FRAC=1.

- Composite properties (planned for v2):
These will act as master boolean switches that control a list of fields. Example: pauth, sve, etc. Setting sve=on with a named model will set all the SVE-related fields (ID_AA64ZFR0_EL1.*) along with sveNNN vector-length. Similarly, setting pauth=on will set APA, GPA, API, GPA3, GPI, GPA3 fields based on the named model.

- cpu_revision, cpu_partnum, etc. properties are introduced to expose MIDR, REVIDR, AIDR fields.

Quoted 6 lines
Quoted 5 lines
Quoted 3 lines
Quoted 2 lines

Exceptions to the property naming are made for ID_AA64PFR0_EL1.ELx fields, which are named elx_mode.

yet another naming exception.

A better name is always welcome! We can iterate over both the prop name and the value name.

yeah but is it making end user life easier?

We believe so.

Quoted 10 lines
Quoted 5 lines
Quoted 4 lines
Quoted 2 lines

This series defines over 130 single field properties plus 4 fractional properties. All properties work with -cpu host also.

Similary as with the host "custom" series, one needs to address collision between legacy cpu properties and low level ones too.

Agreed, This needs more thoughts. It is not a part of this RFC.

I have further thought on this when respinning the original series into v5. I believe the props can follow a hierarchy. ID reg field props are the lowest level props and apply first. Then come the higher level legacy options that are likely to override them. I am waiting for comments on the series but this is proposal I would make.

Interesting, will look through the v5 code.

Quoted 21 lines
Quoted 21 lines
Quoted 21 lines
Quoted 21 lines

All properties change the cpu.isar.idregs[] values which are later written back to KVM at the end of kvm_arch_init_vcpu().

* The arch-defined named values and property names can be iterated until they make sense.

3. ARM CPU Model Hierarchy:

A small named model layer is defined on top of the properties. An ARM named CPU model defines a list of property values and a parent model. A child model naturally inherits all the properties from its parent and can override them when needed.

The initial model hierarchy shipped here is:

 kvm-base-v1                  KVM-imposed quirks
   arm-v8_4-a-v1              ARMv8.4-A architectural mandate
       neoverse-v1-v1         Neoverse V1

graviton3-v1 AWS Graviton3
arm-v9_0-a-v1 ARMv9.0-A architectural deltas on top of ARM-v8_4-a-v1
neoverse-v2-v1 Neoverse V2
grace-v1 NVIDIA Grace

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

Do you have a strategy for named model validation, besides code review. At least each vcpu named model shall be introduced in separate patch, overrides clearly explained and links to the reference spec shall be precisely given for review.

Agreed, each model should be in a separate patch, with overrides and new introductions clearly mentioned/documented with supporting ID register dumps.

Yes I believe it is a huge work to assess the correctness of the definition.

I hope in long term vendors will chime in.

Quoted 54 lines
Quoted 29 lines
Quoted 6 lines
Quoted 6 lines

(kvm-base-v1 and arm-vX are not meant to be realizable unless the user provides values for implementation-defined fields)

So for example, grace-v1 defines Crypto fields and CTR_EL0.IDC/DIC on top of neoverse-v2-v1, which leaves those fields vendor-configurable.

Quoted 8 lines
Quoted 7 lines

The hierarchy reflects a deliberate trade-off:
- Architecture-level models (arm-v8_4-a-v1) maximize migration compatibility but lack implementation-defined values.
- Reference-core models (neoverse-v2-v1) enable migration across SoCs sharing the same core design.
- SoC models (grace-v1) expose the full hardware feature set but limit migration to hosts with the same SoC.

What kind of migration did you exercise up to now?

Successful same host migration with named models and migration from grace to graviton3 with neoverse-v1.

Quoted 12 lines
Quoted 12 lines

At model realization time,
1. a clean slate of cpu.isar.idregs[] is created using arm_idregs_reset_to_defaults().
2. Then, a model's full parent-chain is walked and all properties are applied in order from parent to child.
3. Finally, kvm_arm_writeback_idregs() compares the model's desired ID-register values against the host-provided cpreg snapshot and writes back the writable bits, warning on any non-writable difference.

Models will follow a monotonic versioning convention (grace-v1, grace-v2, ...) mirroring x86's scheme.

Quoted 7 lines
Quoted 4 lines
Quoted 3 lines

* Please take the CPU model property values with a grain of salt. They are added based on what the guest-visible values are with "host" model on available hardware.

I don't catch the above statement.

They don’t match the exact hardware specs. For example feat_CSV2 is capped at “1.0” by KVM regardless of what the hardware says. On Neoverse-v2, TRM says FEAT_CSV2_2 is implemented (i.e “2.0”)

OK. This is effectively an important aspect that, despite the value we attempt to set on an ID reg field, KVM eventually does what he wants with it according to its policy. I think it can ignore, sanitize, ...

Quoted 15 lines
Quoted 15 lines
Quoted 9 lines

Benefits of this design:
- General benefits that come with properties and named CPU models, like cross-host live migration, management-stack control over feature exposure, etc.
- Forward compatibility: when a new ID register or field is introduced, CPU models need not change; during realization they will be populated with the default values. Only ID register/field information needs to be added to the field table.
- As CPU models are hierarchical, defining a new model is much easier.

I like the hierarchical approach but to be honest, at the moment, I miss knowledge on whether it safely applies. I agree that named vcpu models are the end target goal while [1] is rather an intermediate step that was paving the way for it. I rather saw [1] as a tool box for enhaving the host model and understanding issues when migrating. I wish we could share the foundations instead of having totally separate contributions.

Quoted 6 lines
Quoted 3 lines

Definitely, let’s build a common foundation. We need to agree on safe-value tags, default values, and value names. We can build our solution on top of [1], if at least safe-value tags and default values are present.

To me there are several aspects
1) decide which ID reg properties are needed/better (unique uint64_t or your various prop flavours)

We will agree on whatever community agrees on. If our names are discouraged we will move to [1]’s prop names.

Quoted 3 lines

2) usage of safe policy/value (is it really mandated). Why can't we use scratch vcpus. Possibly if it is proven to be mandatory this is independent on 1

Default-values/reset-values are absolutely needed. safe-value tags are also a must have if we want parity with x86 QEMU’s qmp capabilities.

Warm Regards,
Khushit

Quoted 58 lines

3) definition of named models

Thanks

Eric

Quoted 53 lines
Quoted 3 lines
Quoted 1 line

- The property names and values are self-documenting.

not really sorry (because it does not match the spec). I don't think we can ask the end-user to read the kernel code.

Acked, We will add appropriate documentation in QEMU.

Quoted 9 lines
Quoted 8 lines

NOTE: ~2200 of the ~3300 added lines are declarative (field table, model definitions, properties, etc.)

Tested with KVM on an NVIDIA Grace host.

Relationship with existing code base:
- It does not change any TCG-based code paths.
- For KVM host passthrough it just adds property support.

with hardcoded reset values, correct? Instead of host retrived values?

Reset values are not used with the -cpu host. Only for the named model realization, reset values are used.

Quoted 3 lines
Quoted 1 line

- Does not change any existing properties or other code paths.

yes but if it words along with legacy options, you share our concern to coexist with them

Yes, it requires some more thoughts.

Quoted 8 lines
Quoted 1 line

- Can layer on top of the SYSREG_ property series [1].

but in that case why don't you simply reuse it to build the named vcpu model. I don't say the previous properties are the ideal solution but I am not sure the mix or heterogenously named ones introduced here + value strings retrieved from the kernel are better. At least the SYSREG ones matched the spec with raw values, which bring simplicity in the code. And since the end user shall be so much involved in provided extra SYSREG values himself on top of named vcpu models, ...

We can build on [1] as long as we have default values and safe-value tags. They are required for the proper model realization and QMP integration.

Quoted 20 lines
Quoted 2 lines

Planned Follow-ups:
- Composite properties with handling of sve, pauth for named models.

yes this is needed and I am currently working on this on [1]

Quoted 5 lines

- CLIDR_EL1 and CCSIDR_EL1 handling.
- Safe-value based validation logic.
- QMP commands like query-cpu-model-expansion are not hooked yet. Blockers and supported values (calculated using safe-value tags and runtime KVM writable masks) will be reported through them.

Quoted 8 lines

E.g. libvirt could report:
<property name='feat_AES' type='string' value='pmull'
supports='off,aes,pmull'/>
and:
<cpu type='kvm' name='nvidia-grace-v1'
typename='arm-nvidia-grace-v1-arm-cpu' usable='no'>
<blocker name='feat_AES'/>
</cpu>

adding Andrea for libvirt inputs

Thanks

Quoted 7 lines
Quoted 4 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line

Eric

Warm Regards,
Khushit

Thanks

Eric

Warm Regards,
Khushit

#35 lore raw

Hi Khushit,

Quoted 157 lines · Khushit Shah
Quoted 122 lines · Eric Auger

!-------------------------------------------------------------------|
CAUTION: External Email

|-------------------------------------------------------------------!

Hi Khushit,

Quoted 112 lines · Khushit Shah
Quoted 100 lines · Eric Auger

!-------------------------------------------------------------------|
CAUTION: External Email

|-------------------------------------------------------------------!

Hi Khushit,

Quoted 90 lines · Khushit Shah
Quoted 46 lines · Shaju Abraham

Get Outlook for Mac
From: Eric Auger <[email protected]>
Date: Monday, 18 May 2026 at 3:57 PM
To: Shaju Abraham <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, [email protected] <[email protected]>, Andrea Bolognani <[email protected]>
Subject: Re: [RFC PATCH v1 00/13] named CPU models for ARM64 on KVM

!-------------------------------------------------------------------|
CAUTION: External Email

|-------------------------------------------------------------------!

Hi Shaju,˝

Quoted 19 lines · Shaju Abraham

Hi All,

This RFC introduces "named" CPU models for ARM64 KVM guests. This is foundational for cross-host live migration and management-stack control over individual CPU features exposed to the guest.

TL;DR Examples:
# Boot with Grace CPU model
qemu-system-aarch64 -cpu grace-v1 -machine virt,accel=kvm ...

# Grace with a feature disabled qemu-system-aarch64 -cpu grace-v1,feat_SHA1=off ...

# Host passthrough with individual feature control qemu-system-aarch64 -cpu host,feat_AES=aes ...

# Neoverse v2 on Grace.
qemu-system-aarch64 -cpu neoverse-v2-v1

Quoted 8 lines

# Migration from Grace to Graviton3 (TBD)
qemu-system-aarch64 -cpu neoverse-v1-v1 ...

Relationship with Auger/Huck's customizable host model [1]:
We have been working on this series in parallel with [1]. Eric Auger and Cornelia Huck's series [1] exposes raw SYSREG_<REG>_<FIELD> uint64 properties on -cpu host, providing the essential low-level knobs for ID register customization. This RFC builds on the same KVM capability

Please find some comments/questions below.

Quoted 8 lines
Quoted 4 lines

and can be layered on top of [1]:
- Human-readable property names: feat_AES=pmull instead of SYSREG_ID_AA64ISAR0_EL1_AES=2, with arch-defined named values validated at set time.

From what I understand what you call feature here refers to an ARM64_FTR_BITS definition in kernel arch/arm64/kernel/cpufeatures.c. Named string values, safe policy and safe value are all extracted from the kernel implementation and do not stem from the ARM ARM itself.

Correct, a CPU feature (that we talk about) is not the same as ARM ARM defined FEAT_*. As you say below, they really are much more complex to model. But sve, pauth defined by QEMU, are also not an ARM ARM defined FEAT. Because of the complexities of ARM ARM FEAT_s, we decided to go with ID register field-based properties with abstractions like (fractional and composites) on top.

Yes, value names, safe policy, and safe value are taken from the kernel. But in most cases, value names already correlate with ARM ARM.

For example,ID_AA64ISAR1_EL1.LS64:

ARM ARM says:
FEAT_LS64 implements the functionality identified by 0b0001. FEAT_LS64_V implements the functionality identified by 0b0010. FEAT_LS64_ACCDATA implements the functionality identified by 0b0011. FEAT_LS64WB implements the functionality identified by 0b0100.

Named values in cpu-idregs.h.inc:
IDREG_FIELD_START(ID_AA64ISAR1, LS64, 60, 4, EXACT, 0) IDREG_FIELD_ARCH_VAL(0b0000, "off") IDREG_FIELD_ARCH_VAL(0b0001, "ls64") IDREG_FIELD_ARCH_VAL(0b0010, "ls64_v") IDREG_FIELD_ARCH_VAL(0b0011, "ls64_accdata") IDREG_FIELD_ARCH_VAL(0b0100, "ls64wb") IDREG_FIELD_END(ID_AA64ISAR1, LS64)

Values names are: lowered feat names with FEAT_ removed.

For “on”/“off” toggle features: for example (XS, just below LS64):
We have:
IDREG_FIELD_START(ID_AA64ISAR1, XS, 56, 4, LOWER, 0) IDREG_FIELD_ARCH_VAL(0b0000, "off") IDREG_FIELD_ARCH_VAL(0b0001, "on") IDREG_FIELD_END(ID_AA64ISAR1, XS)

Quoted 6 lines
Quoted 2 lines

ARM ARM says:
FEAT_XS implements the functionality identified by 0b0001.

I agree with you on the fact that in general the association is fine. I am confident that developpers who wrote

arch/arm64/kernel/cpufeatures.c did it in a sensible way. Still the problem comes when the end user/layered products have to guess those string values which are documented/defined nowhere besides in cpufeatures.c. How will they come to know which string values are supported and how they map onto any valid ARM ARM ID reg value? You cannot point them to any reference doc. Refering to past comments, Marc said he would even prefer not using

We can absolutely point them to a reference doc, like cpu-features.rst, where we can document, property names, supported values and their meaning.

Quoted 1 line

kernel sysreg as a root of trust (hence the choice of extracting info from AARCHMRS) so I anticipate using arch/arm64/kernel/cpufeatures.c as input may be frown upon. But I may be wrong.

Okay, will wait for community to reply on this.

Quoted 7 lines
Quoted 6 lines
Quoted 4 lines

I guess the usage of string values really depends on how many props layered products or user will need to set explicitly. Assuming we expose named models and this will be the main use case, my assumption is quite a few props will remain to be overriden on top of named model hardcorded values. And since the prop granularity is very low level anyway, if the end user has to identify and set an ID reg field, it can also set the associated uint64 value directly.

My point is that compared to the original series Connie and I have been pushing,
- you still use the same prop granularity (ID reg field), somehow abusively called feature

Not all are prop granularity are field level, FRAC and COMPOSITES (like sve, pauth for named models, will be in v2) are higher level constructs.

Currently only FRAC prop abstraction differ.

Yes. Composites on the way.

Quoted 26 lines
Quoted 8 lines
Quoted 5 lines

- you add significant complexity related to the string values (which are not referenced anywhere in the spec)
- you also add significant complexity related to different kinds and name patterns of props (FRAC, STRING, BOOLEAN, NUMERIC) while we only used SYSREG_REG_FIELD uint64_t props.

While I am really interested in layering up named models on top of ID reg field properties, or even a real feature upper level abstraction, I am not sure the above extra complexity is worth while keeping the original IDreg field granularity.

Ignoring the prop names and value names which seems to be your main concern, our named model realization are not tied to those. They can work on top of SYSREG_<REG>_<FIELD> props.

Well, there is also the need/usage of safe policy and default value, see below.

Quoted 16 lines
Quoted 10 lines
Quoted 7 lines

There may be a few value names that do not make sense right now, but that does not de-merit the idea that perfectly works for most fields.

Regarding the safe-value tag, I feel that it is the one thing that must come from the kernel; in the end, KVM is gonna validate based on that. If the static file feels problematic, another option is to introduce a new KVM ioctl. We are fine with both.

safe policy and value are kernel defined. To be honest I still fail to understand why they are mandated for named vcpu models. Please could elaborate again?

Use of safe-policy tag in QEMU:
- validate the configuration generated by named model or -cpu host, with modified props are valid and not over promising host capability. (Which you say to just delegate to KVM, x86 also validates in:
x86_cpu_filter_features, and blocks realization in x86_cpu_realizefn if enforce is passed.).

Quoted 5 lines
Quoted 1 line

where is the safe rule currently used in this series?

Scope of v2. As replied on your series, with safe rules QEMU can let layered products know what values a property can be set to on the given host.

Like with a qmp command like query-props-info:

That looks promising.

Quoted 84 lines
       ...
       {
           "name": "feat_RDM",
           "supported-values": [
               "off",
               "on"
           ],
           "type": "string"
       },
       {
           "name": "feat_ATOMIC",
           "supported-values": [
               "off",
               "on"
           ],
           "type": "string"
       },
       {
           "name": "feat_CRC32",
           "supported-values": [
               "off",
               "on"
           ],
           "type": "string"
       },
       {
           "name": "feat_SHA2",
           "supported-values": [
               "off",
               "sha256",
               "sha512"
           ],
           "type": "string"
       },
       {
           "name": "feat_SHA1",
           "supported-values": [
               "off",
               "on"
           ],
           "type": "string"
       },
       {
           "name": "feat_AES",
           "supported-values": [
               "off",
               "aes",
               "pmull"
           ],
           "type": "string"
       }
       {
           "name": "feat_NV",
           "supported-values": [
               "0.0"
           ],
           "type": "string"
       },
       {
           "name": "feat_RAS",
           "supported-values": [
               "0.0",
               "1.0",
               "1.1_base"
           ],
           "type": "string"
       },
       {
           "name": "feat_MPAM",
           "supported-values": [
               "0.0"
           ],
           "type": "string"
       },
       {
           "name": "feat_CSV2",
           "supported-values": [
               "0.0",
               "1.0"
           ],
           "type": "string"
       },
       ...
Quoted 2 lines

We get values supported for a property on the given host.
For example MPAM is not writable by KVM, hence only one supported value “0.0”,

I guess this 0.0 value is retrieved from the host and does not come from a default value, right?.

Quoted 1 line

CSV2 on the host is only “1.0” (architecturally, 2.0 is also valid), hence only “0.0” and “1.0” in the supported values.

OK so here you use the safe rule to determine what valid values are left.

Quoted 91 lines
Quoted 10 lines
Quoted 5 lines

- Properly report blockers in query-cpu-definitions. Without safe-value tag, it is not possible to report per ID reg field blockers in query-cpu-defnitions.

How does query-cpu-definitions help today? query-cpu-definitions does not seem to return that kind of info. Filtering host cpu model it just returns:
{"name": "host", "typename": "host-arm-cpu", "static": false, "deprecated": false}]]

With our v2 patches: qeury-cpu-definitions will return along the lines of:

(Notice the blockers for named models we define in v1)
(Collected on Graviton3 host; hence no blockers for neoverse-v1-v1 or graviton3-v1)

{
"execute": "query-cpu-definitions"
},

{
    "return": [
        {
            "name": "neoverse-n2",
            "typename": "neoverse-n2-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-a15",
            "typename": "cortex-a15-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-m4",
            "typename": "cortex-m4-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-a57",
            "typename": "cortex-a57-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "arm1176",
            "typename": "arm1176-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-a7",
            "typename": "cortex-a7-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-a76",
            "typename": "cortex-a76-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "a64fx",
            "typename": "a64fx-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-a8",
            "typename": "cortex-a8-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "neoverse-v1",
            "typename": "neoverse-v1-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "kvm-base-v1",
            "typename": "kvm-base-v1-arm-cpu",
            "unavailable-features": [
                "hw_prop_BS",
                "hw_prop_CWG",
                "hw_prop_ERG",
                "feat_E2H0",
                "feat_EVT",
                "hw_prop_FWB",
                "hw_prop_IDS",
Quoted 8 lines
                "feat_XNX",
                "feat_VH",
                "hw_prop_VMIDBITS",
                "hw_prop_ASIDBITS",
                "hw_prop_CTX_CMPs",
                "hw_prop_BRPS",
                "feat_AdvSIMD",
                "feat_FP"

what are unavailable features? not writable? not settable because the host already supports the only value regarding the safe rule? This will need to be documented

Quoted 278 lines
            ],
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-r5",
            "typename": "cortex-r5-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "grace-v1",
            "typename": "grace-v1-arm-cpu",
            "unavailable-features": [
                "feat_E0PD",
                "feat_TTL",
                "hw_prop_ST",
                "feat_PAN",
                "hw_prop_TGRAN4_2",
                "hw_prop_TGRAN64_2",
                "hw_prop_TGRAN16_2",
                "feat_SPECRES",
                "feat_SB",
                "feat_FRINTTS",
                "hw_prop_APA",
                "feat_TLB",
                "feat_TS",
                "feat_PMU",
                "feat_BT",
                "feat_SEL2"
            ],
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-r5f",
            "typename": "cortex-r5f-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "ti925t",
            "typename": "ti925t-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "arm1026",
            "typename": "arm1026-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-a9",
            "typename": "cortex-a9-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-m7",
            "typename": "cortex-m7-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "neoverse-v1-v1",
            "typename": "neoverse-v1-v1-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "graviton3-v1",
            "typename": "graviton3-v1-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-a710",
            "typename": "cortex-a710-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "arm-v9_0-a-v1",
            "typename": "arm-v9_0-a-v1-arm-cpu",
            "unavailable-features": [
                "hw_prop_BS",
                "hw_prop_CWG",
                "hw_prop_ERG",
                "feat_E2H0",
                "feat_E0PD",
                "feat_EVT",
                "hw_prop_FWB",
                "hw_prop_VMIDBITS",
                "hw_prop_ASIDBITS",
                "feat_SPECRES",
                "feat_SB",
                "feat_FRINTTS",
                "feat_TS",
                "hw_prop_CTX_CMPs",
                "hw_prop_BRPS",
                "feat_BT",
                "feat_SEL2",
                "feat_AdvSIMD",
                "feat_FP"
            ],
            "static": false,
            "deprecated": false
        },
        {
            "name": "neoverse-v2-v1",
            "typename": "neoverse-v2-v1-arm-cpu",
            "unavailable-features": [
                "feat_E0PD",
                "feat_TTL",
                "hw_prop_ST",
                "feat_PAN",
                "hw_prop_TGRAN4_2",
                "hw_prop_TGRAN64_2",
                "hw_prop_TGRAN16_2",
                "feat_SPECRES",
                "feat_SB",
                "feat_FRINTTS",
                "hw_prop_APA",
                "feat_TLB",
                "feat_TS",
                "feat_PMU",
                "feat_BT",
                "feat_SEL2"
            ],
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-r52",
            "typename": "cortex-r52-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "sa1110",
            "typename": "sa1110-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "sa1100",
            "typename": "sa1100-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "max",
            "typename": "max-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-m0",
            "typename": "cortex-m0-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-a53",
            "typename": "cortex-a53-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "arm-v8_4-a-v1",
            "typename": "arm-v8_4-a-v1-arm-cpu",
            "unavailable-features": [
                "hw_prop_BS",
                "hw_prop_CWG",
                "hw_prop_ERG",
                "feat_E2H0",
                "feat_EVT",
                "hw_prop_FWB",
                "feat_XNX",
                "feat_VH",
                "hw_prop_VMIDBITS",
                "hw_prop_ASIDBITS",
                "hw_prop_CTX_CMPs",
                "hw_prop_BRPS",
                "feat_AdvSIMD",
                "feat_FP"
            ],
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-m33",
            "typename": "cortex-m33-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-a72",
            "typename": "cortex-a72-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-a78ae",
            "typename": "cortex-a78ae-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "arm946",
            "typename": "arm946-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-a55",
            "typename": "cortex-a55-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "host",
            "typename": "host-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "arm11mpcore",
            "typename": "arm11mpcore-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-m55",
            "typename": "cortex-m55-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "neoverse-n1",
            "typename": "neoverse-n1-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "arm926",
            "typename": "arm926-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "arm1136",
            "typename": "arm1136-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-a35",
            "typename": "cortex-a35-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "arm1136-r2",
            "typename": "arm1136-r2-arm-cpu",
            "static": false,
            "deprecated": false
        },
        {
            "name": "cortex-m3",
            "typename": "cortex-m3-arm-cpu",
            "static": false,
            "deprecated": false
        }
    ]
}
Quoted 7 lines

Now imagine a layered product which sets some properties values on top of named models Like -cpu graviton3,feat_AES=aes, “feat_AES” might be a blocker for the graviton3 named model (assume graviton3 named model sets feat_AES="pmull" and host only supports "aes”)

Then with the two json qmp outputs from above can be used by layered products to infer that even tho graviton3 is blocked by feat_AES, It setting a valid value on top so, The model + (feat_AES=aes) will be realisable on the given host.

makes sense

Quoted 18 lines
Quoted 18 lines
Quoted 7 lines
Quoted 5 lines

Why can't you start from the host values and override them with the named vcpu model settings? If the new value cannot be applied by KVM, it will reject it and fail the vcpu init.

I think you are mixing up two things. For safe-value tag argument, Yes, but then what about proper query-cpu-definitions integration?

See above, what do you mean?

Quoted 3 lines

For named model we cannot start with host-values. As different KVM versions or host might expose different set of fields, or ARM ARM defining a new ID register or a new field in existing ID register.

I understand a named vcpu model shall be fully determined, ie. all ID regs shall be set to a relevant value determined by the vcpu model. To me those default values rather depend on the VCPU model. a v8 default value may not be the same as a v9 value because a feature has become mandated. So why aren't the default values set within the vcpu model definition instead of intarget/arm/cpu-idregs.h.inc?

Quoted 6 lines
Quoted 4 lines

Then you have 2 categories of fields: writable or not. If you want to try and set all field values, effectively you may need to define props for fields which are even not writable. This can easily evolve from the original series [1].

What if a new id register is introduced? This is need all the already defined named models to have values for those also.

yes

Quoted 8 lines
Quoted 8 lines
Quoted 3 lines

A model needs to be future compatible and provide exact set of ID register values on any host/kernel it runs on.

I am not really sure this is always feasible. Assuming there is a bug fix in the kernel that changes the way an ID reg access is sanitized/accepted/rejected, you may break the vcpu model. ie. a former ID reg value may have been accepted and is not anymore or conversely.

Quoted 4 lines
Quoted 1 line

But on the principle I agree with you.

If a value cannot be shown to the guest, the model should not be realisable, simple right? For these cases we will have -v2, -v3, …. But v1 should never Change the set of ID register values it shows to the guest.

yes. version increment is requested in that case

Quoted 7 lines
Quoted 6 lines
Quoted 5 lines

This is the exact reason why we have default values. Simply 0ing the whole idregs[] does not work because of SIGNED_LOWER features like FP (and more) or RES1 fields in CTR_EL0 etc; Something should say what the default value of a register should be.

yeah but still isn't it named model specific?

This also works if we know what happens when a new ID register is introduced.

Somehow each ID reg should have an initialized state and we should make sure it gets a properly set value from the hierarchy of named models.

Quoted 40 lines
Quoted 29 lines
Quoted 6 lines
Quoted 4 lines

Moreover if one ID reg field that needs to be overriden is not writable with that host kernel, the prop won't exist and the named model won't work on that host either.

Why only add prop for writable fields in [1]? There must be props for all fields. Anyway if non writable fields differ, it will be caught by KVM.

Up to now the goal of [1] was slighly different, ie. allowing to slighly alter ID reg values compared to host passthrough values so that the model becomes migratable between 2 machines. We had cases where only altering one CTR_EL0 field made it migratable for instance. Also in [1] there was not real point exposing a property for an ID reg field that was not writable. However I agree on the fact that for named models things need to be more determistic and you also need to try applying values that are not writable and see if they are the same that host default value.

Quoted 7 lines

For example, a named model might be blocked because of a non-writable field is differing from host and the prop for the same is not present. (Let’s say model abc, wants field FP=fp16 (not writable by KVM), but the host has value FP=on).

But user should be absolutely be able to make the model realisable by passing -cpu abc,FP=on.

agreed

Quoted 6 lines

Even without named models, I assume end goal of customisable host models would be a way to see if on a cluster of slightly differing cpus can we have a common denominator of features to expose to enable migration between hosts. If we do not exposes non-writable fields, how will higher stack know what are the values of non-writable fields on a host? And if non-writable fields are ignored, we can not provide a strict migration contract.

Quoted 8 lines

At the moment it was more a trial and error process I acknowledge. You try to migrate. You get what's wrong through traces on destination side. Then you alter the ID reg fields that cause trouble in case they are writable (ie. props are exposed). This is not production grade I agree. But even with your current approach you still fail to provide tools for layered products to understand what named model applies to this host and can be migrated to another one, I think.

we just sent v1 for comments, v2 as mentioned already takes care of all this cases. It is WIP and needs some polishing. But main qmp reponses I have shared above.

Quoted 6 lines
Quoted 5 lines

Note that if we expose everything through props, you well get all the values on src and dst that mismatch but you will fail to know which mismatches are correctable (because you don't know whether fields are writable) ;-) How can you eventually determine the mismatch is fixable?

Some new qmp command like “query-props-info” I shared above.

This is indeed needed to get the full picture.

Quoted 115 lines
Quoted 111 lines
Quoted 59 lines
Quoted 10 lines
Quoted 10 lines

Regarding default values, I do not see any reset values populated in AARCHMRS_OPENSOURCE_A_profile_FAT-2026-03/Registers.json, I may be missing something here. Is there some other place where we can find ARM ARM defined reset values?

Quoted 3 lines

If the named vcpu models anyway use hardcoded values I wonder if it is so important to have named string values whereas a comment would do the job in the named vcpu model definition?

Quoted 8 lines
Quoted 3 lines

While true, for a named model, numerical field values will suffice as well. It’s just a way of representation. But for end users, I will argue, named values are more user-friendly.

to me, again, it would be if those values were properly specified which is not the case.

Quoted 2 lines

On x86, the user does not modify a specific cpuid leaf to turn a feature on or off. They have assigned a name to each leaf in the spec. Our value names in most

in the spec ;-) That's a big difference.

As above mentioned example of LS64 (in most cases) ARM ARM does say FEAT_ABC for a value ‘y’. and our name for value 'y' is ‘abc’. We can keep the value names same as ARM ARM (i.e val y = “FEAT_ABC”) if that suits better.

Quoted 37 lines
Quoted 37 lines

cases already make perfect sense, as mentioned above.

Quoted 3 lines

From a spec pov I had in mind that a defintion of a FEAT could be much more complex that just 1 field (for instance could be a combination of several of them)

Agreed. Hence, the ID register field-based properties.

Quoted 2 lines

It is not clear to be if you allow the end-user to overwrite a property on top of a named model setting.

Yes, the end user can change the property on top of the named model as illustrated in the examples.

Quoted 9 lines
Quoted 2 lines

- Default values and forward compatibility: CPU models start from a known-zero baseline rather than the host view, so new fields/registers

[1]

Quoted 6 lines

introduced in future kernels do not silently leak into existing models.
- Named CPU models with hierarchical inheritance: grace-v1, neoverse-v2-v1, etc.

The two series can coexist; this series can be rebased on top of [1].

Quoted 8 lines
Quoted 6 lines

[1] https://urldefense.proofpoint.com/v2/url?u=https-3A__lore.kernel.org_qemu-2Ddevel_20260503073541.790215-2D1-2Deric.auger-40redhat.com_&d=DwIDaQ&c=s883GpUCOChKOHiocYtGcg&r=sY-XeNqcuy_ruBQ9T7A2LmG6ktyYXXSxRB1ljkxMepI&m=fpNKdg99IJhj_lpxANCw1YCGZfWRAyz1YWNycq_dH0Rdg8U46NwjIJ3BvFyYb-e7&s=xzjnJMwOvSYbQjuaej-yNezaOn0DWWfAJho6IG_AEto&e=

Problems with defining "named" CPU models for ARM64 KVM guests:
* Features are not single CPUID bits. They are mostly multi-bit fields encoding version/level instead of just presence. A single field encodes multiple ARM ARM defined features (FEAT_s) at different thresholds.

would be good to provide an example for each challenge. I remember Connie provided some in the past though her KVM forum presentations.

Acked. Will add in v2.

Quoted 6 lines
Quoted 4 lines

* KVM does not allow all registers and fields to be modified for a guest. Some fields KVM does not virtualise at all (SME) or only support host values (BRPs, CWG, etc.). This is evolving and differs between kernel versions.

this seems to be contradictory to [1]. Do you have a mix of host inherited values and hardcoded value or do you only have hardcoded values?

Quoted 7 lines
Quoted 6 lines
Quoted 3 lines

A named model will not be realizable on a given host if any of the above non-writable fields differ between the host and the named model. We realize the named model fully from a zeroed-out cpu->isar.idregs[] (no host features) exposed. A model is also not

why is it mandated to start from zeroed cpu->isar.idregs[]? Why can't you start with host initialized cpu->isar.idregs[] and overwrite everything that characterizes the named vcpu model.

As explained above, we leak host features.

OK understood. cpu->isar.idregs[] needs to be fully determined. My assumption was that you are not going to run any vcpu model on any host and there was minimal adherence between both, hence my original statement.

Quoted 42 lines
Quoted 42 lines
Quoted 26 lines

realizable on a host if it over-promises features that are not actually available on the host (the need for safe-value tags).

Quoted 23 lines
Quoted 23 lines

* ARM does not have a single natural granularity for CPU models unlike x86. ARM has architecture, reference core and SoC levels each becoming more granular.
* ARM has dozens of vendors and it will be tricky to maintain models for all of them.
* Previous designs started from the host values and then subtracted undesirable features. This is not forward-compatible; the design should work when a new ID register or field is introduced.

With the above problems in mind, the design has 3 layers:

1. ARM ID Register Field Table:
- This layer maintains all architecturally defined ID registers and ID register fields. It includes:
* Field name
* Field shift
* Field length
* Safe-value tag: LOWER, HIGHER, HIGHER_OR_ZERO, SIGNED_LOWER, EXACT, ANY
This will be used to validate user-provided values during CPU realization time against the host's value. I.e., if the host only supports "aes", a CPU model that sets "pmull" should be rejected.

Quoted 6 lines
Quoted 2 lines

why isn't the kernel doing that job already. Setting a value not compatible with the host shall be rejected by the kernel, no?

KVM will reject. But how will management stack know which values are supported? x86 is simpler; a feature is a single-bit toggle. All management stacks infer that if the value of a property is true, false is supported. And, for -cpu host if the property value is false, the feature is not supported on the host.

Well I would imagine that a cloud vendor wants to migrate between different hosts which call for a specific named model (so there is minimal alignment between the vcpu model and the host cpu). In the worst case it is always possible to instantiate scratch named model vcpus and see if the vcpu init succeeds. We could even provide a qmp utility or any other scheme that returns all valid vcpu models for that host. Anyway I think this will be needed. or -cpu help may be enhanced to do that, not simply returning the theoretical named models that are available but the ones which actually apply on that kernel. I can help you investigating that direction if it can come as an alternative.

Quoted 4 lines
Quoted 2 lines

This is fine, we always want to know which model is realisable on host. But also want to know "why a model is not realizable?".

Practically what kind of tools do you bring to know that? which qmp command to you plan to implement?

Quoted 7 lines

On v2, we have implemented:
-> cpu-model-expansion: for host and named models, return the property values.
-> cpu-definitions: returned named models, and also populate blockers list with
the properties that makes a model not realisable on the give host.
-> a new qmp command props-info (name not fixed): return what property values can be set on the give host.

Output blurb of query-cpu-definitions and query-props-info are attached above.

OK

Quoted 51 lines
Quoted 13 lines
Quoted 13 lines
Quoted 7 lines
Quoted 4 lines

On ARM, we don’t have that luxury; the management stack does not know which values are valid for a property. Ambiguity is:
1. How will management stack even know that a property is writable/modifiable?

this is already available in the original series through

query-cpu-model-expansion

Again as the example above, I feel all fields (nonetheless writable or non-writable) should have a SYSREG_REG_FIELD prop.

Quoted 3 lines
Quoted 3 lines

2. For a 4-bit nibble, are all 16 values valid if it is writable?
a) Lower values than the host?
b) Higher values than the host? etc.

Quoted 6 lines
Quoted 5 lines
Quoted 3 lines

try to apply it and the kernel will simply let you know. Why reimplementing this in qemu as it is done on the kernel with the safe policy/value infra.

qmp query-cpu-definitions, users maybe okay with giving up some blocker features for a named model to run on a host.

I do not catch sorry.

For example on a Grace host, neoverse-v1 model has the following blockers.

{
	"name": "neoverse-v1-v1”,
	"typename": "neoverse-v1-v1-arm-cpu”,
	"unavailable-features": [
		"hw_prop_TGRAN4_2”,
		"hw_prop_TGRAN64_2”,
		"hw_prop_TGRAN16_2”,
		“hw_prop_APA"
	],
	"static": false,
	"deprecated": false
},

I might be okay with giving up pauth (APA) and TGRAN*_2 (nested page sizes) to make neoverse-v1 realizable. With query-props-info I will know all 4 props supports value “off” on the host. So, -cpu neoverse-v1-v1,hw_prop_TGRAN*_2=off,hw_prop_APA=off is actually realizable.

Quoted 13 lines
Quoted 13 lines
Quoted 5 lines
Quoted 2 lines

Having a safe value tag in QEMU allows us to provide useful information like named model ‘blockers’/‘unsupported-features’ and supported property values.

This can be achieved in a different way, relying on the kernel. Instantiate a scratch vcpu model and see if it inits. Some scratch vcpu inits are already in place in qemu.

This is interesting, sadly it only gives us the faulting ID register and not the faulting field.

For example on a non realizable named model, we just get:

```
qemu-system-aarch64: Could not set register system register op0:3 op1:0 crn:0 crm:7 op2:4 to 100000 (is 0)
```

We can find out the faulting register from this, but not the faulting field.

Quoted 5 lines
Quoted 4 lines

You have the host ID reg (0) and the value you try to apply. An xor can easily give you the fields that differ but not necessarily the field that caused the actual write issue if several of them differ. But what are you proposing to improve that atm?

Safe rules.

OK

Quoted 51 lines
Quoted 51 lines
Quoted 51 lines

Without per-field information, libvirt cannot translate this into a <blocker name='feat_AES'/> element. It can only say 'something in ID_AA64ISAR0_EL1 is wrong'.

Quoted 7 lines
Quoted 3 lines

I feel the above should also be present for the customizable host model series [1], providing valid values along with properties is much more useful for management stack.

you can already introspect which ID reg are writables. You cannot get the values that are valid for that host but any attempt to write invalid values already fail the vcpu init. I tested that with kernel ID_FILTERED id regs.

Again, I feel there should be properties for all fields not just the writable fields.

Quoted 37 lines
Quoted 37 lines
Quoted 21 lines
Quoted 21 lines

* Default value: The value to which the field is reset. This gives CPU models a clean cpu.isar.idregs[] baseline instead of the host view provided by the kernel, as in previous designs. This also complements the forward-compatibility story. Given the "default" values, higher levels need not worry about new fields/registers being introduced.
* Architecturally defined named values like "off", "aes", "pmull", etc.
* These values are derived from the kernel's ftr_bits array and tools/sysreg file.
E.g:

IDREG_START(ID_AA64ISAR0) IDREG_FIELD_START(ID_AA64ISAR0, AES, 4, 4, LOWER, 0) IDREG_FIELD_ARCH_VAL(0b0000, "off") IDREG_FIELD_ARCH_VAL(0b0001, "aes") IDREG_FIELD_ARCH_VAL(0b0010, "pmull") IDREG_FIELD_END(ID_AA64ISAR0, AES)

     ....
     IDREG_END(ID_AA64ISAR0)
Quoted 4 lines
Quoted 1 line

- This layer is the single source of truth for ARM64 ID registers.

single source of truth extracted from the kernel and not from the spec. What if we discover a bug in ARM64_FTR_BITS chang default or safe value for instance. How does the change propagate to qemu and existing models?

Relaxation of safe value tag is safe, (EXACT -> LOWER -> ANY). Change in default value should not happen; instead, that should be handled with the “kvm-base” model, which is defined for KVM quirks. Same implications as ARM ARM changes the field’s semantics.

Quoted 3 lines
Quoted 1 line

The default values and safe-value tags are manually derived from the

default value, if equal to reset value could be extracted from the spec directly.

Again, I checked AARCHMRS_OPENSOURCE_A_profile_FAT-2026-03/Registers.json, and the reset values were null. I may be missing something. Is there any other place we can get ARM ARM defined reset values? We can modify the script in [1] to also have default values for named model infra.

Quoted 7 lines
Quoted 5 lines
Quoted 4 lines
Quoted 2 lines

I guess it is normal because those regs are ID regs. The minimum level of support comes from the various revisions and reference core

NI vals from kernel’s sysreg are very useful… I will let community decide on how we should maintain default values.

NI?

NI is sysreg file indicates the feature is not implemented. That values can be used as the default id reg field value.

OK

Quoted 326 lines
Quoted 326 lines
Quoted 34 lines
Quoted 3 lines

implementations. To me this is the huge job that needs to be done while defining the various named models you drafted.

That absolutely needs to be done if we don’t want to leak host features and provide strict migration contract.

Quoted 19 lines
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines

kernel's ftr_bits array. Other boilerplate and arch-defined values are script-generated.

- AArch32 ID registers are added with a single field so they can be zeroed out on hosts that support AArch32.

- This layer also defines helpers for higher layers to extract and manipulate ID register fields.
* arm_idregs_reset_to_defaults(): Reset all ID registers to their default values.
* arm_idreg_field_read/write(): Read the value of an ID register field.
* arm_arch_val_name/from_name(): Look up the arch-defined name for a numeric field value.
* ...

Quoted 4 lines
Quoted 3 lines

this is a pity we have not exchanged on this earlier because that code could have been shared instead of rewriting things and resetting all credits.

Let’s work together from now on :)

Quoted 9 lines

yeah the problem is you reimplemented a different infrastructure for the same prop granularity as you did not rely nor ever commented on the original series. So the first thing is to converge on the base infra (props) definition and then build layered named models on top of it. As we do not agree for now, let's wait for other's comments... I a bit frustrated you did not communicate with us before so that we could have initiated cooperation before and even make the original series evolve in the direction you needed for named vcpu models.

Quoted 3 lines

Our intention was not to reimplement the infrastructure, We first thought of implementing on top of v3 of [1], but that looked like not being actively worked on. For business deadlines we had to implement model realization.

You may have seen we did not get that many feedbacks either (including yours) and some prerequisite series were needed ;-) I hope we will now have more traction in the community.

Quoted 286 lines

Our model realisation code can work on [1] if just default values/reset values are present.

If complexities of safe-value tags and their advantage (as mentioned previously) are not acceptable by the community, we will rebase our model realization logic on top of [1] while also adding default values.

Quoted 3 lines

But anyway, my end goal is to get those named models in a decent timeframe so I am obviously willing to cooperate, hence the time I spend reviewing your alternative implementation ;-)

Thanks for the detailed review, I am certain we both can make progress.

Quoted 95 lines
Quoted 31 lines
Quoted 6 lines
Quoted 6 lines

- This layer creates the following tables using X-macro expansion:
* arm_idregs[]: Array of ID register descriptors.
* arm_field_locs[]: Array of field location descriptors. (fieldIDx -> registerIndex, fieldIndex)
* ...

Quoted 6 lines
Quoted 4 lines

- The ArmIdReg struct also includes a writable_mask to track which bits are writable by KVM. This is populated at runtime during scratch VM creation, and is further used to validate that only the writable bits are modified by the CPU model.

this is an interesting idea that could have been also used in previous contributions.

Acked.

Quoted 17 lines
Quoted 17 lines

2. ARM Properties Layer:
A small property layer on top of the ID Register Field table is defined. This series defines two types of properties with plans for one more in the future:
- Single field properties: These represent ARM FEAT_X features that correspond to a single ID register field. Example: feat_AES, feat_SHA2, etc.

The property name is set as "feat_<FieldName>" and possible values are the arch-defined named values. This can be further categorized into:
* STRING: multi-bit fields (>=2 bits) with arch-defined named values, example: feat_AES, feat_SHA2, etc.
* BOOLEAN: 1-bit fields only (true/false)
example: hw_prop_IDC, hw_prop_DIC, etc.
* NUMERIC: IDREG_ANY fields with no named values (raw integer)
example: hw_prop_BS, hw_prop_DZP, etc.

Quoted 7 lines
Quoted 2 lines

I just wonder if we need all that complexity if eventually we hardcode values in named vcpu models

Then we are just delegating the complexity to the management stack. For example, without fractional prop, the management stack must know CSV2, CSV2_Frac relation, and not all value combination of <CSV2>.<CSV2_Frac> are valid. Rather than having different management software solving the same problem, we can solve it once in QEMU.

well, named vcpu models hardcode 90% of the values, aren't they. Scratch vcpu init attempts can let management layers know what named vcpu models would work on that host I guess.

Quoted 10 lines

We also have very active plans to hook up cpu-definitions, cpu-model-expansion, and more.

Quoted 8 lines
Quoted 8 lines

String property values are validated against the arch-defined named values.

ID register fields that are not covered by single field properties are also exposed as a property named hw_prop_FieldName. These are usually implementation-defined values like cache geometry, debug counter widths, etc. (CTR_EL0.*, DCZID_EL0.*, etc.)
Example: hw_prop_BS, hw_prop_DZP, etc.

Quoted 4 lines
Quoted 2 lines

how do you discriminate between those and field_ props? Again do we need that complexity?

Ummm, there is no special code for these props. They are just named differently as no ARM ARM FEAT_ relate to them.

Yes but I mean for the end user, this ends up with different prop names which does not make their life easier to me, instead of SYS_REG_FIELD pattern. also keep in mind that FEAT_ props are not, strictly speaking what the spec call FEAT.

Quoted 36 lines
Quoted 36 lines
Quoted 36 lines

Single field properties are defined as:

ARM_PROP("prop_name", type, reg, field) Example:
ARM_PROP("feat_AES", STRING, ID_AA64ISAR0, AES)

* Validation based on safe-value tags is yet to be implemented.

- Fractional properties: These represent ARM FEAT_X features that use two fields (base + frac) across registers. Example: feat_CSV2, feat_MPAM, etc.

The property name is set as "feat_<BaseFieldName>" and possible values are the arch-defined string values like "0.0", "1.0", "1.1", etc.

Fractional properties are defined as:
ARM_FRACTIONAL_PROP("prop_name", base_reg, base_field, frac_reg, frac_field) Example:
ARM_FRACTIONAL_PROP("feat_CSV2", ID_AA64PFR0, CSV2, ID_AA64PFR1, CSV2_FRAC)

When a fractional property is set, both the base field and frac field values are set to the corresponding values.
E.g: feat_CSV2=1.1 will set ID_AA64PFR0.CSV2=1 and ID_AA64PFR1.CSV2_FRAC=1.

- Composite properties (planned for v2):
These will act as master boolean switches that control a list of fields. Example: pauth, sve, etc. Setting sve=on with a named model will set all the SVE-related fields (ID_AA64ZFR0_EL1.*) along with sveNNN vector-length. Similarly, setting pauth=on will set APA, GPA, API, GPA3, GPI, GPA3 fields based on the named model.

- cpu_revision, cpu_partnum, etc. properties are introduced to expose MIDR, REVIDR, AIDR fields.

Quoted 6 lines
Quoted 5 lines
Quoted 3 lines
Quoted 2 lines

Exceptions to the property naming are made for ID_AA64PFR0_EL1.ELx fields, which are named elx_mode.

yet another naming exception.

A better name is always welcome! We can iterate over both the prop name and the value name.

yeah but is it making end user life easier?

We believe so.

Quoted 10 lines
Quoted 5 lines
Quoted 4 lines
Quoted 2 lines

This series defines over 130 single field properties plus 4 fractional properties. All properties work with -cpu host also.

Similary as with the host "custom" series, one needs to address collision between legacy cpu properties and low level ones too.

Agreed, This needs more thoughts. It is not a part of this RFC.

I have further thought on this when respinning the original series into v5. I believe the props can follow a hierarchy. ID reg field props are the lowest level props and apply first. Then come the higher level legacy options that are likely to override them. I am waiting for comments on the series but this is proposal I would make.

Interesting, will look through the v5 code.

Quoted 21 lines
Quoted 21 lines
Quoted 21 lines
Quoted 21 lines

All properties change the cpu.isar.idregs[] values which are later written back to KVM at the end of kvm_arch_init_vcpu().

* The arch-defined named values and property names can be iterated until they make sense.

3. ARM CPU Model Hierarchy:

A small named model layer is defined on top of the properties. An ARM named CPU model defines a list of property values and a parent model. A child model naturally inherits all the properties from its parent and can override them when needed.

The initial model hierarchy shipped here is:

 kvm-base-v1                  KVM-imposed quirks
   arm-v8_4-a-v1              ARMv8.4-A architectural mandate
       neoverse-v1-v1         Neoverse V1

graviton3-v1 AWS Graviton3
arm-v9_0-a-v1 ARMv9.0-A architectural deltas on top of ARM-v8_4-a-v1
neoverse-v2-v1 Neoverse V2
grace-v1 NVIDIA Grace

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

Do you have a strategy for named model validation, besides code review. At least each vcpu named model shall be introduced in separate patch, overrides clearly explained and links to the reference spec shall be precisely given for review.

Agreed, each model should be in a separate patch, with overrides and new introductions clearly mentioned/documented with supporting ID register dumps.

Yes I believe it is a huge work to assess the correctness of the definition.

I hope in long term vendors will chime in.

Quoted 54 lines
Quoted 29 lines
Quoted 6 lines
Quoted 6 lines

(kvm-base-v1 and arm-vX are not meant to be realizable unless the user provides values for implementation-defined fields)

So for example, grace-v1 defines Crypto fields and CTR_EL0.IDC/DIC on top of neoverse-v2-v1, which leaves those fields vendor-configurable.

Quoted 8 lines
Quoted 7 lines

The hierarchy reflects a deliberate trade-off:
- Architecture-level models (arm-v8_4-a-v1) maximize migration compatibility but lack implementation-defined values.
- Reference-core models (neoverse-v2-v1) enable migration across SoCs sharing the same core design.
- SoC models (grace-v1) expose the full hardware feature set but limit migration to hosts with the same SoC.

What kind of migration did you exercise up to now?

Successful same host migration with named models and migration from grace to graviton3 with neoverse-v1.

Quoted 12 lines
Quoted 12 lines

At model realization time,
1. a clean slate of cpu.isar.idregs[] is created using arm_idregs_reset_to_defaults().
2. Then, a model's full parent-chain is walked and all properties are applied in order from parent to child.
3. Finally, kvm_arm_writeback_idregs() compares the model's desired ID-register values against the host-provided cpreg snapshot and writes back the writable bits, warning on any non-writable difference.

Models will follow a monotonic versioning convention (grace-v1, grace-v2, ...) mirroring x86's scheme.

Quoted 7 lines
Quoted 4 lines
Quoted 3 lines

* Please take the CPU model property values with a grain of salt. They are added based on what the guest-visible values are with "host" model on available hardware.

I don't catch the above statement.

They don’t match the exact hardware specs. For example feat_CSV2 is capped at “1.0” by KVM regardless of what the hardware says. On Neoverse-v2, TRM says FEAT_CSV2_2 is implemented (i.e “2.0”)

OK. This is effectively an important aspect that, despite the value we attempt to set on an ID reg field, KVM eventually does what he wants with it according to its policy. I think it can ignore, sanitize, ...

Quoted 15 lines
Quoted 15 lines
Quoted 9 lines

Benefits of this design:
- General benefits that come with properties and named CPU models, like cross-host live migration, management-stack control over feature exposure, etc.
- Forward compatibility: when a new ID register or field is introduced, CPU models need not change; during realization they will be populated with the default values. Only ID register/field information needs to be added to the field table.
- As CPU models are hierarchical, defining a new model is much easier.

I like the hierarchical approach but to be honest, at the moment, I miss knowledge on whether it safely applies. I agree that named vcpu models are the end target goal while [1] is rather an intermediate step that was paving the way for it. I rather saw [1] as a tool box for enhaving the host model and understanding issues when migrating. I wish we could share the foundations instead of having totally separate contributions.

Quoted 6 lines
Quoted 3 lines

Definitely, let’s build a common foundation. We need to agree on safe-value tags, default values, and value names. We can build our solution on top of [1], if at least safe-value tags and default values are present.

To me there are several aspects
1) decide which ID reg properties are needed/better (unique uint64_t or your various prop flavours)

We will agree on whatever community agrees on. If our names are discouraged we will move to [1]’s prop names.

Quoted 3 lines

2) usage of safe policy/value (is it really mandated). Why can't we use scratch vcpus. Possibly if it is proven to be mandatory this is independent on 1

Default-values/reset-values are absolutely needed. safe-value tags are also a must have if we want parity with x86 QEMU’s qmp capabilities.

Warm Regards,
Khushit

Quoted 58 lines

3) definition of named models

Thanks

Eric

Quoted 53 lines
Quoted 3 lines
Quoted 1 line

- The property names and values are self-documenting.

not really sorry (because it does not match the spec). I don't think we can ask the end-user to read the kernel code.

Acked, We will add appropriate documentation in QEMU.

Quoted 9 lines
Quoted 8 lines

NOTE: ~2200 of the ~3300 added lines are declarative (field table, model definitions, properties, etc.)

Tested with KVM on an NVIDIA Grace host.

Relationship with existing code base:
- It does not change any TCG-based code paths.
- For KVM host passthrough it just adds property support.

with hardcoded reset values, correct? Instead of host retrived values?

Reset values are not used with the -cpu host. Only for the named model realization, reset values are used.

Quoted 3 lines
Quoted 1 line

- Does not change any existing properties or other code paths.

yes but if it words along with legacy options, you share our concern to coexist with them

Yes, it requires some more thoughts.

Quoted 8 lines
Quoted 1 line

- Can layer on top of the SYSREG_ property series [1].

but in that case why don't you simply reuse it to build the named vcpu model. I don't say the previous properties are the ideal solution but I am not sure the mix or heterogenously named ones introduced here + value strings retrieved from the kernel are better. At least the SYSREG ones matched the spec with raw values, which bring simplicity in the code. And since the end user shall be so much involved in provided extra SYSREG values himself on top of named vcpu models, ...

We can build on [1] as long as we have default values and safe-value tags. They are required for the proper model realization and QMP integration.

Quoted 20 lines
Quoted 2 lines

Planned Follow-ups:
- Composite properties with handling of sve, pauth for named models.

yes this is needed and I am currently working on this on [1]

Quoted 5 lines

- CLIDR_EL1 and CCSIDR_EL1 handling.
- Safe-value based validation logic.
- QMP commands like query-cpu-model-expansion are not hooked yet. Blockers and supported values (calculated using safe-value tags and runtime KVM writable masks) will be reported through them.

Quoted 8 lines

E.g. libvirt could report:
<property name='feat_AES' type='string' value='pmull'
supports='off,aes,pmull'/>
and:
<cpu type='kvm' name='nvidia-grace-v1'
typename='arm-nvidia-grace-v1-arm-cpu' usable='no'>
<blocker name='feat_AES'/>
</cpu>

adding Andrea for libvirt inputs

Thanks

Quoted 10 lines
Quoted 6 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line

Eric

Warm Regards,
Khushit

Thanks

Eric

Warm Regards,
Khushit

Thanks

Eric