arch-arm: Use isSecure variable for Stage2Lookup
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Wed, 12 Aug 2020 12:16:21 +0000 (13:16 +0100)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Fri, 14 Aug 2020 13:07:41 +0000 (13:07 +0000)
TLB entries are tagged with the security state of the cpu instead
of the security attribute of the physical address

Change-Id: I728ba1c841de1ec6c1ee03aee012b185c968d078
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32639
Tested-by: kokoro <noreply+kokoro@google.com>
src/arch/arm/tlb.cc

index dc4296d776ad554b81bd8cc23fdeb156bf72d596..e8bb718050a0d74576c37294426deef90bc626f7 100644 (file)
@@ -1655,7 +1655,7 @@ TLB::getResultTe(TlbEntry **te, const RequestPtr &req,
             fault = checkPermissions(s1Te, req, mode);
         if (stage2Req & (fault == NoFault)) {
             Stage2LookUp *s2Lookup = new Stage2LookUp(this, stage2Tlb, *s1Te,
-                req, translation, mode, timing, functional, !(s1Te->ns),
+                req, translation, mode, timing, functional, isSecure,
                 curTranType);
             fault = s2Lookup->getTe(tc, mergeTe);
             if (s2Lookup->isComplete()) {