diff options
author | Andreas Sandberg <andreas@sandberg.pp.se> | 2013-10-16 18:12:15 +0200 |
---|---|---|
committer | Andreas Sandberg <andreas@sandberg.pp.se> | 2013-10-16 18:12:15 +0200 |
commit | cc42e87b85cf651b21e77d36fbd7351b23cb86d1 (patch) | |
tree | c308c14cd87ccba5e1e9e27e23b2c49b167d5759 | |
parent | 10e64501206b72901c266855fde2909523b875e0 (diff) | |
download | gem5-cc42e87b85cf651b21e77d36fbd7351b23cb86d1.tar.xz |
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.
-rw-r--r-- | src/cpu/kvm/base.cc | 2 |
1 files changed, 1 insertions, 1 deletions
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); } |