From f791e7b313c6f5c2b30f96c35f675d523def8a3a Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Sun, 16 Mar 2014 17:28:23 +0100 Subject: 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 --- src/cpu/kvm/base.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/cpu/kvm/base.cc') 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. -- cgit v1.2.3