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:
parent
10e6450120
commit
cc42e87b85
1 changed files with 1 additions and 1 deletions
|
@ -978,7 +978,7 @@ BaseKvmCPU::doMMIOAccess(Addr paddr, void *data, int size, bool write)
|
||||||
const Cycles ipr_delay(write ?
|
const Cycles ipr_delay(write ?
|
||||||
TheISA::handleIprWrite(tc, &pkt) :
|
TheISA::handleIprWrite(tc, &pkt) :
|
||||||
TheISA::handleIprRead(tc, &pkt));
|
TheISA::handleIprRead(tc, &pkt));
|
||||||
return clockEdge(ipr_delay);
|
return clockPeriod() * ipr_delay;
|
||||||
} else {
|
} else {
|
||||||
return dataPort.sendAtomic(&pkt);
|
return dataPort.sendAtomic(&pkt);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue