arch-arm: Override ISA::takeOverFrom for the Arm ISA
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Tue, 7 Apr 2020 13:01:56 +0000 (14:01 +0100)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Wed, 15 Apr 2020 07:34:09 +0000 (07:34 +0000)
commit52a96449f5ebfa35196a5358fd58b807fa3ea7c4
treeca1e1381a151633d91f8527a4befc574c9073dd4
parentb4f9e0a02f48205ba39374bfb7e37e2d59841aae
arch-arm: Override ISA::takeOverFrom for the Arm ISA

This is fixing switcheroo tests when using a PMU/GICv3.  When you switch
cpus you usually instantiate multiple cpus at the beginning and you
switch them at runtime with the m5.switchCpus function.

Every cpu will have its own set of ThreadContexts/ISAs.
When you switch cpu/tc/isa, you need to update the tc/isa pointer
cached in the device model otherwise those will still reference
the switched out cpu.

Change-Id: I3aeee890286851189c3a8a4d378c83f32e973361
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27713
Reviewed-by: Ciro Santilli <ciro.santilli@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/arch/arm/isa.cc
src/arch/arm/isa.hh