ARM / OFFLINE REFERENCE

On this page
← Home

HDFGWTR2_EL2

Hypervisor Debug Fine-Grained Write Trap Register 2

Provides controls for traps of MSR and MCR writes of debug, trace, PMU, and Statistical Profiling System registers.

Configuration

This register is present only when FEAT_FGT2 is implemented and FEAT_AA64 is implemented. Otherwise, direct accesses to HDFGWTR2_EL2 are UNDEFINED.

If EL2 is not implemented, this register is RES0 from EL3.

Attributes

HDFGWTR2_EL2 is a 64-bit register.

Field descriptions

63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RES0
RES0 nPMBMAR_EL1 nMDSTEPOP_EL1 nTRBMPAM_EL1 nPMZR_EL0 nTRCITECR_EL1 nPMSDSFR_EL1 RES0 nSPMSCR_EL1 nSPMACCESSR_EL1 nSPMCR_EL0 nSPMOVS nSPMINTEN nSPMCNTEN nSPMSELR_EL0 nSPMEVTYPERn_EL0 nSPMEVCNTRn_EL0 nPMSSCR_EL1 RES0 nMDSELR_EL1 nPMUACR_EL1 nPMICFILTR_EL0 nPMICNTR_EL0 RES0 nPMECR_EL1

Bits [63:25]:

Reserved, RES0.

nPMBMAR_EL1, bit [24] when FEAT_SPE_nVM is implemented:

Trap MSR writes of PMBMAR_EL1 at EL1 using AArch64 to EL2.

nPMBMAR_EL1 Meaning
0b0

If EL2 is implemented and enabled in the current Security state, then MSR writes of PMBMAR_EL1 at EL1 using AArch64 are trapped to EL2 and reported with EC syndrome value 0x18, unless the write generates a higher priority exception.

0b1

MSR writes of PMBMAR_EL1 are not trapped by this mechanism.

This field is ignored by the PE and treated as zero when all of the following are true:

The reset behavior of this field is:

Otherwise:

Reserved, RES0.

nMDSTEPOP_EL1, bit [23] when FEAT_STEP2 is implemented:

Trap MSR writes of MDSTEPOP_EL1 at EL1 using AArch64 to EL2.

nMDSTEPOP_EL1 Meaning
0b0

If EL2 is implemented and enabled in the current Security state, then MSR writes of MDSTEPOP_EL1 at EL1 using AArch64 are trapped to EL2 and reported with EC syndrome value 0x18, unless the write generates a higher priority exception.

0b1

MSR writes of MDSTEPOP_EL1 are not trapped by this mechanism.

This field is ignored by the PE and treated as zero when all of the following are true:

The reset behavior of this field is:

Otherwise:

Reserved, RES0.

nTRBMPAM_EL1, bit [22] when FEAT_TRBE_MPAM is implemented:

Trap MSR writes of TRBMPAM_EL1 at EL1 using AArch64 to EL2.

nTRBMPAM_EL1 Meaning
0b0

If EL2 is implemented and enabled in the current Security state, then MSR writes of TRBMPAM_EL1 at EL1 using AArch64 are trapped to EL2 and reported with EC syndrome value 0x18, unless the write generates a higher priority exception.

0b1

MSR writes of TRBMPAM_EL1 are not trapped by this mechanism.

This field is ignored by the PE and treated as zero when all of the following are true:

The reset behavior of this field is:

Otherwise:

Reserved, RES0.

nPMZR_EL0, bit [21] when FEAT_PMUv3p9 is implemented:

Trap MSR writes of PMZR_EL0 at EL1 and EL0 using AArch64 to EL2.

nPMZR_EL0 Meaning
0b0

If EL2 is implemented and enabled in the current Security state, and the Effective value of HCR_EL2.{E2H, TGE} is not {1, 1}, then MSR writes of PMZR_EL0 at EL1 and EL0 using AArch64 are trapped to EL2 and reported with EC syndrome value 0x18, unless the write generates a higher priority exception.

0b1

MSR writes of PMZR_EL0 are not trapped by this mechanism.

This field is ignored by the PE and treated as zero when all of the following are true:

The reset behavior of this field is:

Otherwise:

Reserved, RES0.

nTRCITECR_EL1, bit [20] when FEAT_ITE is implemented:

Trap MSR writes of TRCITECR_EL1 at EL1 using AArch64 to EL2.

nTRCITECR_EL1 Meaning
0b0

If EL2 is implemented and enabled in the current Security state, then MSR writes of TRCITECR_EL1 at EL1 using AArch64 are trapped to EL2 and reported with EC syndrome value 0x18, unless the write generates a higher priority exception.

0b1

MSR writes of TRCITECR_EL1 are not trapped by this mechanism.

This field is ignored by the PE and treated as zero when all of the following are true:

The reset behavior of this field is:

Otherwise:

Reserved, RES0.

nPMSDSFR_EL1, bit [19] when FEAT_SPE_FDS is implemented:

Trap MSR writes of PMSDSFR_EL1 at EL1 using AArch64 to EL2.

nPMSDSFR_EL1 Meaning
0b0

If EL2 is implemented and enabled in the current Security state, then MSR writes of PMSDSFR_EL1 at EL1 using AArch64 are trapped to EL2 and reported with EC syndrome value 0x18, unless the write generates a higher priority exception.

0b1

MSR writes of PMSDSFR_EL1 are not trapped by this mechanism.

This field is ignored by the PE and treated as zero when all of the following are true:

The reset behavior of this field is:

Otherwise:

Reserved, RES0.

Bits [18:17]:

Reserved, RES0.

nSPMSCR_EL1, bit [16] when FEAT_SPMU is implemented:

Trap MSR writes of SPMSCR_EL1 at EL1 using AArch64 to EL2.

nSPMSCR_EL1 Meaning
0b0

If EL2 is implemented and enabled in the current Security state, then MSR writes of SPMSCR_EL1 at EL1 using AArch64 are trapped to EL2 and reported with EC syndrome value 0x18, unless the write generates a higher priority exception.

0b1

MSR writes of SPMSCR_EL1 are not trapped by this mechanism.

This field is ignored by the PE and treated as zero when all of the following are true:

The reset behavior of this field is:

Otherwise:

Reserved, RES0.

nSPMACCESSR_EL1, bit [15] when FEAT_SPMU is implemented:

Trap MSR writes of SPMACCESSR_EL1 at EL1 using AArch64 to EL2.

nSPMACCESSR_EL1 Meaning
0b0

If EL2 is implemented and enabled in the current Security state, then MSR writes of SPMACCESSR_EL1 at EL1 using AArch64 are trapped to EL2 and reported with EC syndrome value 0x18, unless the write generates a higher priority exception.

0b1

MSR writes of SPMACCESSR_EL1 are not trapped by this mechanism.

This field is ignored by the PE and treated as zero when all of the following are true:

The reset behavior of this field is:

Otherwise:

Reserved, RES0.

nSPMCR_EL0, bit [14] when FEAT_SPMU is implemented:

Trap MSR writes of SPMCR_EL0 at EL1 and EL0 using AArch64 to EL2.

nSPMCR_EL0 Meaning
0b0

If EL2 is implemented and enabled in the current Security state, and the Effective value of HCR_EL2.{E2H, TGE} is not {1, 1}, then MSR writes of SPMCR_EL0 at EL1 and EL0 using AArch64 are trapped to EL2 and reported with EC syndrome value 0x18, unless the write generates a higher priority exception.

0b1

MSR writes of SPMCR_EL0 are not trapped by this mechanism.

This field is ignored by the PE and treated as zero when all of the following are true:

The reset behavior of this field is:

Otherwise:

Reserved, RES0.

nSPMOVS, bit [13] when FEAT_SPMU is implemented:

Trap MSR writes at EL1 and EL0 using AArch64 of any of the following AArch64 System registers to EL2:

nSPMOVS Meaning
0b0

If EL2 is implemented and enabled in the current Security state, and the Effective value of HCR_EL2.{E2H, TGE} is not {1, 1}, then MSR writes at EL1 and EL0 using AArch64 of any of the specified System registers are trapped to EL2 and reported with EC syndrome value 0x18, unless the write generates a higher priority exception.

0b1

MSR writes of the specified System registers are not trapped by this mechanism.

This field is ignored by the PE and treated as zero when all of the following are true:

The reset behavior of this field is:

Otherwise:

Reserved, RES0.

nSPMINTEN, bit [12] when FEAT_SPMU is implemented:

Trap MSR writes at EL1 using AArch64 of any of the following AArch64 System registers to EL2:

nSPMINTEN Meaning
0b0

If EL2 is implemented and enabled in the current Security state, then MSR writes at EL1 using AArch64 of any of the specified System registers are trapped to EL2 and reported with EC syndrome value 0x18, unless the write generates a higher priority exception.

0b1

MSR writes of the specified System registers are not trapped by this mechanism.

This field is ignored by the PE and treated as zero when all of the following are true:

The reset behavior of this field is:

Otherwise:

Reserved, RES0.

nSPMCNTEN, bit [11] when FEAT_SPMU is implemented:

Trap MSR writes at EL1 and EL0 using AArch64 of any of the following AArch64 System registers to EL2:

nSPMCNTEN Meaning
0b0

If EL2 is implemented and enabled in the current Security state, and the Effective value of HCR_EL2.{E2H, TGE} is not {1, 1}, then MSR writes at EL1 and EL0 using AArch64 of any of the specified System registers are trapped to EL2 and reported with EC syndrome value 0x18, unless the write generates a higher priority exception.

0b1

MSR writes of the specified System registers are not trapped by this mechanism.

This field is ignored by the PE and treated as zero when all of the following are true:

The reset behavior of this field is:

Otherwise:

Reserved, RES0.

nSPMSELR_EL0, bit [10] when FEAT_SPMU is implemented:

Trap MSR writes of SPMSELR_EL0 at EL1 and EL0 using AArch64 to EL2.

nSPMSELR_EL0 Meaning
0b0

If EL2 is implemented and enabled in the current Security state, and the Effective value of HCR_EL2.{E2H, TGE} is not {1, 1}, then MSR writes of SPMSELR_EL0 at EL1 and EL0 using AArch64 are trapped to EL2 and reported with EC syndrome value 0x18, unless the write generates a higher priority exception.

0b1

MSR writes of SPMSELR_EL0 are not trapped by this mechanism.

This field is ignored by the PE and treated as zero when all of the following are true:

The reset behavior of this field is:

Otherwise:

Reserved, RES0.

nSPMEVTYPERn_EL0, bit [9] when FEAT_SPMU is implemented:

Trap MSR writes at EL1 and EL0 using AArch64 of any of the following AArch64 System registers to EL2:

nSPMEVTYPERn_EL0 Meaning
0b0

If EL2 is implemented and enabled in the current Security state, and the Effective value of HCR_EL2.{E2H, TGE} is not {1, 1}, then MSR writes at EL1 and EL0 using AArch64 of any of the specified System registers are trapped to EL2 and reported with EC syndrome value 0x18, unless the write generates a higher priority exception.

0b1

MSR writes of the specified System registers are not trapped by this mechanism.

This field is ignored by the PE and treated as zero when all of the following are true:

The reset behavior of this field is:

Otherwise:

Reserved, RES0.

nSPMEVCNTRn_EL0, bit [8] when FEAT_SPMU is implemented:

Trap MSR writes at EL1 and EL0 using AArch64 of any of the following AArch64 System registers to EL2:

nSPMEVCNTRn_EL0 Meaning
0b0

If EL2 is implemented and enabled in the current Security state, and the Effective value of HCR_EL2.{E2H, TGE} is not {1, 1}, then MSR writes at EL1 and EL0 using AArch64 of any of the specified System registers are trapped to EL2 and reported with EC syndrome value 0x18, unless the write generates a higher priority exception.

0b1

MSR writes of the specified System registers are not trapped by this mechanism.

This field is ignored by the PE and treated as zero when all of the following are true:

The reset behavior of this field is:

Otherwise:

Reserved, RES0.

nPMSSCR_EL1, bit [7] when FEAT_PMUv3_SS is implemented:

Trap MSR writes of PMSSCR_EL1 at EL1 using AArch64 to EL2.

nPMSSCR_EL1 Meaning
0b0

If EL2 is implemented and enabled in the current Security state, then MSR writes of PMSSCR_EL1 at EL1 using AArch64 are trapped to EL2 and reported with EC syndrome value 0x18, unless the write generates a higher priority exception.

0b1

MSR writes of PMSSCR_EL1 are not trapped by this mechanism.

This field is ignored by the PE and treated as zero when all of the following are true:

The reset behavior of this field is:

Otherwise:

Reserved, RES0.

Bit [6]:

Reserved, RES0.

nMDSELR_EL1, bit [5] when FEAT_Debugv8p9 is implemented:

Trap MSR writes of MDSELR_EL1 at EL1 using AArch64 to EL2.

nMDSELR_EL1 Meaning
0b0

If EL2 is implemented and enabled in the current Security state, then MSR writes of MDSELR_EL1 at EL1 using AArch64 are trapped to EL2 and reported with EC syndrome value 0x18, unless the write generates a higher priority exception.

0b1

MSR writes of MDSELR_EL1 are not trapped by this mechanism.

This field is ignored by the PE and treated as zero when all of the following are true:

It is IMPLEMENTATION DEFINED whether this field is implemented or is RES0 when 16 or fewer breakpoints are implemented, 16 or fewer watchpoints are implemented, and MDSELR_EL1 is implemented as RAZ/WI.

The reset behavior of this field is:

Otherwise:

Reserved, RES0.

nPMUACR_EL1, bit [4] when FEAT_PMUv3p9 is implemented:

Trap MSR writes of PMUACR_EL1 at EL1 using AArch64 to EL2.

nPMUACR_EL1 Meaning
0b0

If EL2 is implemented and enabled in the current Security state, then MSR writes of PMUACR_EL1 at EL1 using AArch64 are trapped to EL2 and reported with EC syndrome value 0x18, unless the write generates a higher priority exception.

0b1

MSR writes of PMUACR_EL1 are not trapped by this mechanism.

This field is ignored by the PE and treated as zero when all of the following are true:

The reset behavior of this field is:

Otherwise:

Reserved, RES0.

nPMICFILTR_EL0, bit [3] when FEAT_PMUv3_ICNTR is implemented:

Trap MSR writes of PMICFILTR_EL0 at EL1 and EL0 using AArch64 to EL2.

nPMICFILTR_EL0 Meaning
0b0

If EL2 is implemented and enabled in the current Security state, and the Effective value of HCR_EL2.{E2H, TGE} is not {1, 1}, then:

0b1

MSR writes of PMICFILTR_EL0 are not trapped by this mechanism.

This field is ignored by the PE and treated as zero when all of the following are true:

The reset behavior of this field is:

Otherwise:

Reserved, RES0.

nPMICNTR_EL0, bit [2] when FEAT_PMUv3_ICNTR is implemented:

Trap MSR writes of PMICNTR_EL0 at EL1 and EL0 using AArch64 to EL2.

nPMICNTR_EL0 Meaning
0b0

If EL2 is implemented and enabled in the current Security state, and the Effective value of HCR_EL2.{E2H, TGE} is not {1, 1}, then:

  • MSR writes of PMICNTR_EL0 at EL1 and EL0 using AArch64 are trapped to EL2 and reported with EC syndrome value 0x18, unless the write generates a higher priority exception.
  • PMZR_EL0.F0 ignores writes at EL1 and EL0.
0b1

MSR writes of PMICNTR_EL0 are not trapped by this mechanism.

This field is ignored by the PE and treated as zero when all of the following are true:

The reset behavior of this field is:

Otherwise:

Reserved, RES0.

Bit [1]:

Reserved, RES0.

nPMECR_EL1, bit [0] when FEAT_EBEP is implemented or FEAT_PMUv3_SS is implemented:

Trap MSR writes of PMECR_EL1 at EL1 using AArch64 to EL2.

nPMECR_EL1 Meaning
0b0

If EL2 is implemented and enabled in the current Security state, then MSR writes of PMECR_EL1 at EL1 using AArch64 are trapped to EL2 and reported with EC syndrome value 0x18, unless the write generates a higher priority exception.

0b1

MSR writes of PMECR_EL1 are not trapped by this mechanism.

This field is ignored by the PE and treated as zero when all of the following are true:

The reset behavior of this field is:

Otherwise:

Reserved, RES0.

Access Instructions

Accesses to this register use the following encodings in the System register encoding space:

MRS <Xt>, HDFGWTR2_EL2

(op0 = 0b11, op1 = 0b100, CRn = 0b0011, CRm = 0b0001, op2 = 0b001)


if !(IsFeatureImplemented(FEAT_FGT2) && IsFeatureImplemented(FEAT_AA64)) then
    Undefined();
elsif HaveEL(EL3) && PSTATE.EL == EL2 && EL3SDDUndefPriority() && SCR_EL3().FGTEn2 == '0' then
    Undefined();
elsif PSTATE.EL == EL0 then
    Undefined();
elsif PSTATE.EL == EL1 then
    if EffectiveHCR_EL2_NVx() IN {'1x1'} then
        X{64}(t) = NVMem(0x1B0);
    elsif EffectiveHCR_EL2_NVx() IN {'xx1'} then
        AArch64_SystemAccessTrap(EL2, 0x18);
    else
        Undefined();
    end;
elsif PSTATE.EL == EL2 then
    if HaveEL(EL3) && SCR_EL3().FGTEn2 == '0' then
        if EL3SDDUndef() then
            Undefined();
        else
            AArch64_SystemAccessTrap(EL3, 0x18);
        end;
    else
        X{64}(t) = HDFGWTR2_EL2();
    end;
elsif PSTATE.EL == EL3 then
    X{64}(t) = HDFGWTR2_EL2();
end;
                

MSR HDFGWTR2_EL2, <Xt>

(op0 = 0b11, op1 = 0b100, CRn = 0b0011, CRm = 0b0001, op2 = 0b001)


if !(IsFeatureImplemented(FEAT_FGT2) && IsFeatureImplemented(FEAT_AA64)) then
    Undefined();
elsif HaveEL(EL3) && PSTATE.EL == EL2 && EL3SDDUndefPriority() && SCR_EL3().FGTEn2 == '0' then
    Undefined();
elsif PSTATE.EL == EL0 then
    Undefined();
elsif PSTATE.EL == EL1 then
    if EffectiveHCR_EL2_NVx() IN {'1x1'} then
        NVMem(0x1B0) = X{64}(t);
    elsif EffectiveHCR_EL2_NVx() IN {'xx1'} then
        AArch64_SystemAccessTrap(EL2, 0x18);
    else
        Undefined();
    end;
elsif PSTATE.EL == EL2 then
    if HaveEL(EL3) && SCR_EL3().FGTEn2 == '0' then
        if EL3SDDUndef() then
            Undefined();
        else
            AArch64_SystemAccessTrap(EL3, 0x18);
        end;
    else
        HDFGWTR2_EL2() = X{64}(t);
    end;
elsif PSTATE.EL == EL3 then
    HDFGWTR2_EL2() = X{64}(t);
end;
                

Version 2026.09 — Copyright © 2010-2026 Arm Limited or its affiliates.

This site is provided as a community resource and is NOT affiliated with nor endorsed by Arm Limited.