From: Andreas Sandberg Date: Wed, 16 Oct 2013 16:12:15 +0000 (+0200) Subject: kvm: Fix latency calculation of IPR accesses X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cc42e87b85cf651b21e77d36fbd7351b23cb86d1;p=gem5.git kvm: Fix latency calculation of IPR accesses When handling IPR accesses in doMMIOAccess, the KVM CPU used clockEdge() to convert between cycles and ticks. This is incorrect since doMMIOAccess is supposed to return a latency in ticks rather than when the access is done. This changeset fixes this issue by returning clockPeriod() * ipr_delay instead. --- diff --git a/src/cpu/kvm/base.cc b/src/cpu/kvm/base.cc index d43288f4f..d03657a88 100644 --- a/src/cpu/kvm/base.cc +++ b/src/cpu/kvm/base.cc @@ -978,7 +978,7 @@ BaseKvmCPU::doMMIOAccess(Addr paddr, void *data, int size, bool write) const Cycles ipr_delay(write ? TheISA::handleIprWrite(tc, &pkt) : TheISA::handleIprRead(tc, &pkt)); - return clockEdge(ipr_delay); + return clockPeriod() * ipr_delay; } else { return dataPort.sendAtomic(&pkt); }