arch-arm: VSTCR_EL2/VSTTBR_EL2 accessible in secure mode only
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Tue, 10 Nov 2020 15:16:29 +0000 (15:16 +0000)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Wed, 25 Nov 2020 10:51:14 +0000 (10:51 +0000)
We should trigger an Undefined Instruction if those registers
are accessed in non-secure mode

Change-Id: I45ec01e9e4ae9a38d59e56a51e198b4199a7d814
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Ciro Santilli <ciro.santilli@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/37616
Tested-by: kokoro <noreply+kokoro@google.com>
src/arch/arm/miscregs.cc

index 8110a191dd9b6337c30b19ab9e65120dd7c7fb2b..825811fd1d8a557336a21edb2beb82104ba1d6e3 100644 (file)
@@ -4907,9 +4907,9 @@ ISA::initializeMiscRegMetadata()
       .hyp().mon()
       .mapsTo(MISCREG_VTCR);
     InitReg(MISCREG_VSTTBR_EL2)
-      .hyp().mon();
+      .hypSecure().mon();
     InitReg(MISCREG_VSTCR_EL2)
-      .hyp().mon();
+      .hypSecure().mon();
     InitReg(MISCREG_TTBR0_EL3)
       .mon();
     InitReg(MISCREG_TCR_EL3)