arch-arm: ISV bit in DataAbort should check for translation stage
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Fri, 6 Sep 2019 13:44:47 +0000 (14:44 +0100)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Wed, 18 Sep 2019 13:30:01 +0000 (13:30 +0000)
According to the ESR spec, the ISV bit is set to 1 only for stage 2
aborts.

Change-Id: Id524ef36e82184f741e968ddba04ca8ccdd4ad58
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20980
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/arch/arm/faults.cc

index ba515194418381c5774d8d51559e5f21b3aff627..c5858c9aee6bcf7056e985fa21b813ae376c9328 100644 (file)
@@ -1371,7 +1371,7 @@ DataAbort::iss() const
     val  = AbortFault<DataAbort>::iss();
     // ISS is valid if not caused by a stage 1 page table walk, and when taken
     // to AArch64 only when directed to EL2
-    if (!s1ptw && (!to64 || toEL == EL2)) {
+    if (!s1ptw && stage2 && (!to64 || toEL == EL2)) {
         val |= isv << 24;
         if (isv) {
             val |= sas << 22;