From: Giacomo Travaglini Date: Mon, 9 Sep 2019 11:56:48 +0000 (+0100) Subject: arch-arm: PSTATE.PAN affecting EL2 only when HCR_EL2.E2H=1 X-Git-Tag: v19.0.0.0~541 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0e4c3437fdfb20e0f0d590e0d0abe32fc8393b3c;p=gem5.git arch-arm: PSTATE.PAN affecting EL2 only when HCR_EL2.E2H=1 Change-Id: I6df0cdcbadca17f30d3de3bed887f75c739b00f0 Signed-off-by: Giacomo Travaglini Reviewed-by: Andreas Sandberg Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20979 Maintainer: Andreas Sandberg Tested-by: kokoro --- diff --git a/src/arch/arm/tlb.cc b/src/arch/arm/tlb.cc index a2737b946..1e8003c21 100644 --- a/src/arch/arm/tlb.cc +++ b/src/arch/arm/tlb.cc @@ -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; }