gem5/src/cpu/kvm
Andreas Sandberg ed38e3432c sim: Refactor and simplify the drain API
The drain() call currently passes around a DrainManager pointer, which
is now completely pointless since there is only ever one global
DrainManager in the system. It also contains vestiges from the time
when SimObjects had to keep track of their child objects that needed
draining.

This changeset moves all of the DrainState handling to the Drainable
base class and changes the drain() and drainResume() calls to reflect
this. Particularly, the drain() call has been updated to take no
parameters (the DrainManager argument isn't needed) and return a
DrainState instead of an unsigned integer (there is no point returning
anything other than 0 or 1 any more). Drainable objects should return
either DrainState::Draining (equivalent to returning 1 in the old
system) if they need more time to drain or DrainState::Drained
(equivalent to returning 0 in the old system) if they are already in a
consistent state. Returning DrainState::Running is considered an
error.

Drain done signalling is now done through the signalDrainDone() method
in the Drainable class instead of using the DrainManager directly. The
new call checks if the state of the object is DrainState::Draining
before notifying the drain manager. This means that it is safe to call
signalDrainDone() without first checking if the simulator has
requested draining. The intention here is to reduce the code needed to
implement draining in simple objects.
2015-07-07 09:51:05 +01:00
..
base.cc sim: Refactor and simplify the drain API 2015-07-07 09:51:05 +01:00
base.hh sim: Refactor and simplify the drain API 2015-07-07 09:51:05 +01:00
BaseKvmCPU.py sim: Refactor the serialization base class 2015-07-07 09:51:03 +01:00
device.cc kvm, arm, dev: Add an in-kernel GIC implementation 2015-06-01 19:44:17 +01:00
device.hh kvm, arm, dev: Add an in-kernel GIC implementation 2015-06-01 19:44:17 +01:00
KvmVM.py kvm: Basic support for hardware virtualized CPUs 2013-04-22 13:20:32 -04:00
perfevent.cc kvm: Basic support for hardware virtualized CPUs 2013-04-22 13:20:32 -04:00
perfevent.hh kvm: Set the perf exclude_host attribute if available 2013-10-15 10:09:23 +02:00
SConscript kvm, arm, dev: Add an in-kernel GIC implementation 2015-06-01 19:44:17 +01:00
timer.cc kvm: Add support for multi-system simulation 2014-02-20 15:43:53 +01:00
timer.hh kvm: Add experimental support for a perf-based execution timer 2013-04-22 13:20:32 -04:00
vm.cc kvm, arm: Add support for aarch64 2015-06-01 19:44:19 +01:00
vm.hh kvm, arm: Add support for aarch64 2015-06-01 19:44:19 +01:00
x86_cpu.cc sim: Refactor the serialization base class 2015-07-07 09:51:03 +01:00
x86_cpu.hh sim: Refactor the serialization base class 2015-07-07 09:51:03 +01:00
X86KvmCPU.py kvm: FPU synchronization support on x86 2013-09-30 09:43:43 +02:00