stdlib: Only set 'sim_quantum' value of KVM cores included
This commit:
https://gem5-review.googlesource.com/c/public/gem5/+/62471
set `sim_quantum` for any simulation done via the Simulator module.
However, this causes issues when setting exit events at a particular
tick. It resulted in the exit being off by the `sim_quantum` value. This
is required for KVM setups but is undesirable for non-KVM setups. Ergo,
this commit ensures the `sim_quantum` is only set in cases where KVM
cores are included in a simulation.
There are two items of note here:
1. When using the SwitchableProcessor the KVM cores may be switched out
and therefore not accessable via the `get_cores` method. To get round
this we check if the processor is a SwitchableProcessor and run an
additionial check that _any_ of the cores in the SwitchableProcessor
are KVM. This is a big hacky; the Processor API should be changed to
make this easier.
2. This only partially fixes the problem of exit events being off given
a specified tick. This will still occur in the case a
SwitchableProcessor is used containing KVM cores. E.g., non-KVM cores
will still be "off" when KVM cores are switched out. This issue will
be addressed in a later commit.
Change-Id: Id966d76cd1630b6c41c5972fa9423c9e48eafaf6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/63051
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
1 file changed