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.
This commit is contained in:
Andreas Sandberg 2013-10-16 18:12:15 +02:00
parent 10e6450120
commit cc42e87b85

View file

@ -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);
}