arch-arm: PSTATE.PAN affecting EL2 only when HCR_EL2.E2H=1
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Mon, 9 Sep 2019 11:56:48 +0000 (12:56 +0100)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Wed, 18 Sep 2019 13:30:01 +0000 (13:30 +0000)
Change-Id: I6df0cdcbadca17f30d3de3bed887f75c739b00f0
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/+/20979
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/arch/arm/tlb.cc

index a2737b94671a3f25fba5b522111907458c46a23a..1e8003c21d739840c7e799fea9a653a183c0c63e 100644 (file)
@@ -943,7 +943,7 @@ TLB::checkPermissions64(TlbEntry *te, const RequestPtr &req, Mode mode,
             }
             break;
           case EL2:
-            if (checkPAN(tc, ap, req, mode)) {
+            if (hcr.e2h && checkPAN(tc, ap, req, mode)) {
                 grant = false;
                 break;
             }