From 6b6ac525f7bcb4259ef2065919bc9985c48ef35d Mon Sep 17 00:00:00 2001 From: Giacomo Travaglini Date: Thu, 5 Sep 2019 10:52:47 +0100 Subject: [PATCH] arch-arm: PSTATE.PAN changes should inval cached regs in TLB Change-Id: Id94e355fec345d2e952539a7dce7fbd21ed220c6 Signed-off-by: Giacomo Travaglini Reviewed-by: Andreas Sandberg Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20983 Maintainer: Andreas Sandberg Tested-by: kokoro --- src/arch/arm/isa.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/arch/arm/isa.cc b/src/arch/arm/isa.cc index b95710506..6e65102b6 100644 --- a/src/arch/arm/isa.cc +++ b/src/arch/arm/isa.cc @@ -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(); -- 2.30.2