summaryrefslogtreecommitdiff
path: root/src/cpu/kvm/base.cc
diff options
context:
space:
mode:
authorAndreas Sandberg <andreas@sandberg.pp.se>2014-03-16 17:28:23 +0100
committerAndreas Sandberg <andreas@sandberg.pp.se>2014-03-16 17:28:23 +0100
commitf791e7b313c6f5c2b30f96c35f675d523def8a3a (patch)
tree495096f78ab0ab8ddc0a5a3c0cd2c2768e0e31e7 /src/cpu/kvm/base.cc
parent32bf74cb8ee4c9293636041c05d93fbfd01087da (diff)
downloadgem5-f791e7b313c6f5c2b30f96c35f675d523def8a3a.tar.xz
kvm: x86: Add support for x86 INIT and STARTUP handling
This changeset adds support for INIT and STARTUP IPI handling. We currently handle both of these interrupts in gem5 and transfer the state to KVM. Since we do not have a BIOS loaded, we pretend that the INIT interrupt suspends the CPU after reset. --HG-- extra : rebase_source : 7f3b25f3801d68f668b6cd91eaf50d6f48ee2a6a
Diffstat (limited to 'src/cpu/kvm/base.cc')
-rw-r--r--src/cpu/kvm/base.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cpu/kvm/base.cc b/src/cpu/kvm/base.cc
index 26ffe37a5..1149a3704 100644
--- a/src/cpu/kvm/base.cc
+++ b/src/cpu/kvm/base.cc
@@ -543,6 +543,12 @@ BaseKvmCPU::tick()
delay = kvmRun(ticksToExecute);
}
+ // The CPU might have been suspended before entering into
+ // KVM. Assume that the CPU was suspended /before/ entering
+ // into KVM and skip the exit handling.
+ if (_status == Idle)
+ break;
+
// Entering into KVM implies that we'll have to reload the thread
// context from KVM if we want to access it. Flag the KVM state as
// dirty with respect to the cached thread context.