diff options
author | Andreas Sandberg <andreas@sandberg.pp.se> | 2014-02-20 15:43:53 +0100 |
---|---|---|
committer | Andreas Sandberg <andreas@sandberg.pp.se> | 2014-02-20 15:43:53 +0100 |
commit | 0d6009e8dc3ab8419ca7daf9c79c9c987464e3ae (patch) | |
tree | a996eafa5fe69192cadd21fc0c3de0fa26fad530 /src/sim/process.cc | |
parent | fd9343eb857493ba7bade90d99a945f5577ab7ab (diff) | |
download | gem5-0d6009e8dc3ab8419ca7daf9c79c9c987464e3ae.tar.xz |
kvm: Add support for multi-system simulation
The introduction of parallel event queues added most of the support
needed to run multiple VMs (systems) within the same gem5
instance. This changeset fixes up signal delivery so that KVM's
control signals are delivered to the thread that executes the CPU's
event queue. Specifically:
* Timers and counters are now initialized from a separate method
(startupThread) that is scheduled as the first event in the
thread-specific event queue. This ensures that they are
initialized from the thread that is going to execute the CPUs
event queue and enables signal delivery to the right thread when
exiting from KVM.
* The POSIX-timer-based KVM timer (used to force exits from KVM) has
been updated to deliver signals to the thread that's executing KVM
instead of the process (thread is undefined in that case). This
assumes that the timer is instantiated from the thread that is
going to execute the KVM vCPU.
* Signal masking is now done using pthread_sigmask instead of
sigprocmask. The behavior of the latter is undefined in threaded
applications.
* Since signal masks can be inherited, make sure to actively unmask
the control signals when setting up the KVM signal mask.
There are currently no facilities to multiplex between multiple KVM
CPUs in the same event queue, we are therefore limited to
configurations where there is only one KVM CPU per event queue. In
practice, this means that multi-system configurations can be
simulated, but not multiple CPUs in a shared-memory configuration.
Diffstat (limited to 'src/sim/process.cc')
0 files changed, 0 insertions, 0 deletions