arch-arm: Add el2Enabled cached variable
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Fri, 18 Sep 2020 10:12:09 +0000 (11:12 +0100)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Tue, 3 Nov 2020 09:55:11 +0000 (09:55 +0000)
commite268bc35a42cb67896f93e641832104902e11896
tree1f661bdc52cc6a7c27b5faa077e03bb7e5e017fe
parent2fc4a0803d835bc87c7047f1695886e4128d708e
arch-arm: Add el2Enabled cached variable

Several TLB invalidation instructions rely on VMID matching.  This is
only applicable is EL2 is implemented and enabled in the current state.

The code prior to this patch was making the now invalid assumption that
we shouldn't consider the VMID if we are doing a secure lookup. This is
because in the past if we were in secure mode we were sure EL2 was not
enabled.
This is fishy and not valid anymore anyway after the introduction of
secure EL2.

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