arch-arm: PSTATE.PAN changes should inval cached regs in TLB
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Thu, 5 Sep 2019 09:52:47 +0000 (10:52 +0100)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Thu, 19 Sep 2019 10:54:14 +0000 (10:54 +0000)
Change-Id: Id94e355fec345d2e952539a7dce7fbd21ed220c6
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/+/20983
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/arch/arm/isa.cc

index b9571050632641b107e93ff942a2f28eebf7c5d3..6e65102b6f0d674c213b6c51409fefb9a97ca8d7 100644 (file)
@@ -791,6 +791,10 @@ ISA::setMiscReg(int misc_reg, RegVal val, ThreadContext *tc)
             getDTBPtr(tc)->invalidateMiscReg();
         }
 
+        if (cpsr.pan != old_cpsr.pan) {
+            getDTBPtr(tc)->invalidateMiscReg();
+        }
+
         DPRINTF(Arm, "Updating CPSR from %#x to %#x f:%d i:%d a:%d mode:%#x\n",
                 miscRegs[misc_reg], cpsr, cpsr.f, cpsr.i, cpsr.a, cpsr.mode);
         PCState pc = tc->pcState();