diff options
Diffstat (limited to 'src/cpu/kvm/base.cc')
-rw-r--r-- | src/cpu/kvm/base.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cpu/kvm/base.cc b/src/cpu/kvm/base.cc index ea0f494e3..bf4d68603 100644 --- a/src/cpu/kvm/base.cc +++ b/src/cpu/kvm/base.cc @@ -69,6 +69,7 @@ BaseKvmCPU::BaseKvmCPU(BaseKvmCPUParams *params) _status(Idle), dataPort(name() + ".dcache_port", this), instPort(name() + ".icache_port", this), + alwaysSyncTC(params->alwaysSyncTC), threadContextDirty(true), kvmStateDirty(false), vcpuID(vm.allocVCPUID()), vcpuFD(-1), vcpuMMapSize(0), @@ -557,6 +558,9 @@ BaseKvmCPU::tick() nextInstEvent > ctrInsts ? curEventQueue()->nextTick() - curTick() : 0); + if (alwaysSyncTC) + threadContextDirty = true; + // We might need to update the KVM state. syncKvmState(); @@ -588,6 +592,9 @@ BaseKvmCPU::tick() // dirty with respect to the cached thread context. kvmStateDirty = true; + if (alwaysSyncTC) + syncThreadContext(); + // Enter into the RunningService state unless the // simulation was stopped by a timer. if (_kvmRun->exit_reason != KVM_EXIT_INTR) { |