summaryrefslogtreecommitdiff
path: root/src/cpu/kvm
diff options
context:
space:
mode:
authorAndreas Sandberg <andreas@sandberg.pp.se>2013-10-03 11:00:18 +0200
committerAndreas Sandberg <andreas@sandberg.pp.se>2013-10-03 11:00:18 +0200
commit0dd6f87e63edcafdb2df9b582d768bfca9e78d6a (patch)
treedbe90f27aca1d101af93a6adc5cd372fc6692914 /src/cpu/kvm
parent05ed2deda679a2651ead92e93bec55c90705a738 (diff)
downloadgem5-0dd6f87e63edcafdb2df9b582d768bfca9e78d6a.tar.xz
kvm: Service events in the instruction event queues
This changset adds calls to the service the instruction event queues that accidentally went missing from commit [0063c7dd18ec]. The original commit only included the code needed to schedule instruction stops from KVM and missed the functionality to actually service the events.
Diffstat (limited to 'src/cpu/kvm')
-rw-r--r--src/cpu/kvm/base.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cpu/kvm/base.cc b/src/cpu/kvm/base.cc
index 5e3ec279a..d43288f4f 100644
--- a/src/cpu/kvm/base.cc
+++ b/src/cpu/kvm/base.cc
@@ -540,6 +540,12 @@ BaseKvmCPU::tick()
_status = Running;
}
+ // Service any pending instruction events. The vCPU should
+ // have exited in time for the event using the instruction
+ // counter configured by setupInstStop().
+ comInstEventQueue[0]->serviceEvents(ctrInsts);
+ system->instEventQueue.serviceEvents(system->totalNumInsts);
+
if (tryDrain())
_status = Idle;
} break;
@@ -1179,7 +1185,6 @@ BaseKvmCPU::ioctlRun()
void
BaseKvmCPU::setupInstStop()
{
-
if (comInstEventQueue[0]->empty()) {
setupInstCounter(0);
} else {