kvm: Correctly handle the return value from handleIpr(Read|Write)
The KVM base class incorrectly assumed that handleIprRead and handleIprWrite both return ticks. This is not the case, instead they return cycles. This changeset converts the returned cycles to ticks when handling IPR accesses.
This commit is contained in:
parent
211c10b46d
commit
cd9cd85ce9
1 changed files with 4 additions and 4 deletions
|
@ -969,10 +969,10 @@ BaseKvmCPU::doMMIOAccess(Addr paddr, void *data, int size, bool write)
|
||||||
pkt.dataStatic(data);
|
pkt.dataStatic(data);
|
||||||
|
|
||||||
if (mmio_req.isMmappedIpr()) {
|
if (mmio_req.isMmappedIpr()) {
|
||||||
if (write)
|
const Cycles ipr_delay(write ?
|
||||||
return TheISA::handleIprWrite(tc, &pkt);
|
TheISA::handleIprWrite(tc, &pkt) :
|
||||||
else
|
TheISA::handleIprRead(tc, &pkt));
|
||||||
return TheISA::handleIprRead(tc, &pkt);
|
return clockEdge(ipr_delay);
|
||||||
} else {
|
} else {
|
||||||
return dataPort.sendAtomic(&pkt);
|
return dataPort.sendAtomic(&pkt);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue