kvmVM = Param.KvmVM(Parent.any, 'KVM VM (i.e., shared memory domain)')
useCoalescedMMIO = Param.Bool(False, "Use coalesced MMIO (EXPERIMENTAL)")
usePerfOverflow = Param.Bool(False, "Use perf event overflow counters (EXPERIMENTAL)")
+ alwaysSyncTC = Param.Bool(False,
+ "Always sync thread contexts on entry/exit")
hostFreq = Param.Clock("2GHz", "Host clock frequency")
hostFactor = Param.Float(1.0, "Cycle scale factor")
_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),
nextInstEvent > ctrInsts ?
curEventQueue()->nextTick() - curTick() : 0);
+ if (alwaysSyncTC)
+ threadContextDirty = true;
+
// We might need to update the KVM state.
syncKvmState();
// 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) {
/** Unused dummy port for the instruction interface */
KVMCpuPort instPort;
+ /**
+ * Be conservative and always synchronize the thread context on
+ * KVM entry/exit.
+ */
+ const bool alwaysSyncTC;
+
/**
* Is the gem5 context dirty? Set to true to force an update of
* the KVM vCPU state upon the next call to kvmRun().