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)")
+
+ hostFreq = Param.Clock("2GHz", "Host clock frequency")
hostFactor = Param.Float(1.0, "Cycle scale factor")
pageSize(sysconf(_SC_PAGE_SIZE)),
tickEvent(*this),
perfControlledByTimer(params->usePerfOverflow),
+ hostFreq(params->hostFreq),
hostFactor(params->hostFactor),
drainManager(NULL),
ctrInsts(0)
runTimer.reset(new PerfKvmTimer(hwCycles,
KVM_TIMER_SIGNAL,
params->hostFactor,
- params->clock));
+ params->hostFreq));
else
runTimer.reset(new PosixKvmTimer(KVM_TIMER_SIGNAL, CLOCK_MONOTONIC,
params->hostFactor,
- params->clock));
+ params->hostFreq));
}
BaseKvmCPU::~BaseKvmCPU()
assert(_status == Idle);
assert(!tickEvent.scheduled());
- numCycles += ticksToCycles(thread->lastActivate - thread->lastSuspend)
- * hostFactor;
+ numCycles += ticksToCycles(thread->lastActivate - thread->lastSuspend);
schedule(tickEvent, clockEdge(delay));
_status = Running;