diff options
Diffstat (limited to 'src/cpu/kvm')
-rw-r--r-- | src/cpu/kvm/base.hh | 1 | ||||
-rw-r--r-- | src/cpu/kvm/x86_cpu.cc | 10 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/cpu/kvm/base.hh b/src/cpu/kvm/base.hh index 7bf518f04..8d1258b4c 100644 --- a/src/cpu/kvm/base.hh +++ b/src/cpu/kvm/base.hh @@ -52,6 +52,7 @@ #include "cpu/kvm/vm.hh" #include "cpu/base.hh" #include "cpu/simple_thread.hh" +#include "sim/faults.hh" /** Signal to use to trigger exits from KVM */ #define KVM_KICK_SIGNAL SIGRTMIN diff --git a/src/cpu/kvm/x86_cpu.cc b/src/cpu/kvm/x86_cpu.cc index 681e14200..5d2250dae 100644 --- a/src/cpu/kvm/x86_cpu.cc +++ b/src/cpu/kvm/x86_cpu.cc @@ -38,6 +38,8 @@ #include "arch/registers.hh" #include "arch/x86/cpuid.hh" +#include "arch/x86/faults.hh" +#include "arch/x86/interrupts.hh" #include "arch/x86/regs/msr.hh" #include "arch/x86/utility.hh" #include "cpu/kvm/base.hh" @@ -1185,8 +1187,10 @@ X86KvmCPU::kvmRun(Tick ticks) { struct kvm_run &kvm_run(*getKvmRunState()); - if (interrupts[0]->checkInterruptsRaw()) { - if (interrupts[0]->hasPendingUnmaskable()) { + auto *lapic = dynamic_cast<X86ISA::Interrupts *>(interrupts[0]); + + if (lapic->checkInterruptsRaw()) { + if (lapic->hasPendingUnmaskable()) { DPRINTF(KvmInt, "Delivering unmaskable interrupt.\n"); syncThreadContext(); @@ -1198,7 +1202,7 @@ X86KvmCPU::kvmRun(Tick ticks) // the thread context and check if there are /really/ // interrupts that should be delivered now. syncThreadContext(); - if (interrupts[0]->checkInterrupts(tc)) { + if (lapic->checkInterrupts(tc)) { DPRINTF(KvmInt, "M5 has pending interrupts, delivering interrupt.\n"); |