gem5/src
Andreas Sandberg 31199bba53 sim: Handle cases where Drainable::resume() creates objects
There are cases where Drainable objects need to create new objects in
Drainable::resume(). In such cases, the local drain state will be
inherited from the DrainManager. We currently set the state to Running
as soon as we start resuming the simulator. This means that new
objects are created in the Running state rather than the Drained
state, which the resume code assumes. Depending on the traversal order
in DrainManager::resume(), this sometimes triggers a panic because the
object being resumed is in the wrong state.

This change introduces a new drain state, Resuming, that the
DrainManager enters as soon as it starts resuming the
simulator. Objects that are created while resuming are created in this
state. Such objects are then resumed in a subsequent pass over the
list of Drainable objects that need to be resumed. Once all objects
have been resumed, the simulator enters the Running state.

Change-Id: Ieee8645351ffbdec477e9cd2ff86fc795e459617
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/2600
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Weiping Liao <weipingliao@google.com>
2017-04-03 16:38:26 +00:00
..
arch arm, kvm: Override the kernel's default MPIDR value 2017-04-03 16:37:55 +00:00
base dev: Align BAR0 size to power of 2 for VirtIO devices 2017-04-03 16:36:15 +00:00
cpu cpu: Print progress messages in Trace CPU 2017-03-16 13:52:40 +00:00
dev dev, arm: Fix multi-core KVM race in the generic timer 2017-04-03 16:37:55 +00:00
doc sim: Adding support for power models 2016-06-06 17:16:44 +01:00
doxygen MEM: Put memory system document into doxygen 2012-09-25 11:49:41 -05:00
gpu-compute syscall-emul: Move memState into its own file 2017-03-09 19:19:38 +00:00
kern syscall-emul: Add functionality to open syscalls 2017-03-09 22:42:45 +00:00
mem misc: add missing copyright/author information in previous commit 2017-03-09 17:22:52 +00:00
proto proto: Fix warnings for protoc v3 2017-01-27 15:07:20 -06:00
python python: Automatically disable listeners in batch setups 2017-03-21 10:30:02 +00:00
sim sim: Handle cases where Drainable::resume() creates objects 2017-04-03 16:38:26 +00:00
unittest misc: Update #!env calls for python to explicit version 2017-02-10 10:00:18 -05:00
Doxyfile Doxygen: Update the version of the Doxyfile 2012-10-11 06:38:42 -04:00
SConscript python: Move native wrappers to the _m5 namespace 2017-01-27 12:40:01 +00:00