summaryrefslogtreecommitdiff
path: root/src/cpu/kvm
diff options
context:
space:
mode:
authorAndreas Sandberg <andreas@sandberg.pp.se>2013-09-19 17:55:04 +0200
committerAndreas Sandberg <andreas@sandberg.pp.se>2013-09-19 17:55:04 +0200
commitcd9cd85ce9b0f3905ecfcd843d128b0fd754871c (patch)
tree5d8ea9adf20c22c91eaa5c21f55776fb45570e69 /src/cpu/kvm
parent211c10b46d9773fb9aacb0a85b641df6434ce475 (diff)
downloadgem5-cd9cd85ce9b0f3905ecfcd843d128b0fd754871c.tar.xz
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.
Diffstat (limited to 'src/cpu/kvm')
-rw-r--r--src/cpu/kvm/base.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cpu/kvm/base.cc b/src/cpu/kvm/base.cc
index 1631fb54c..594c5b7ae 100644
--- a/src/cpu/kvm/base.cc
+++ b/src/cpu/kvm/base.cc
@@ -969,10 +969,10 @@ BaseKvmCPU::doMMIOAccess(Addr paddr, void *data, int size, bool write)
pkt.dataStatic(data);
if (mmio_req.isMmappedIpr()) {
- if (write)
- return TheISA::handleIprWrite(tc, &pkt);
- else
- return TheISA::handleIprRead(tc, &pkt);
+ const Cycles ipr_delay(write ?
+ TheISA::handleIprWrite(tc, &pkt) :
+ TheISA::handleIprRead(tc, &pkt));
+ return clockEdge(ipr_delay);
} else {
return dataPort.sendAtomic(&pkt);
}