From cc42e87b85cf651b21e77d36fbd7351b23cb86d1 Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Wed, 16 Oct 2013 18:12:15 +0200 Subject: 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. --- src/cpu/kvm/base.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cpu/kvm') 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); } -- cgit v1.2.3