summaryrefslogtreecommitdiff
path: root/src/arch/arm/kvm/gic.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/arm/kvm/gic.cc')
-rw-r--r--src/arch/arm/kvm/gic.cc18
1 files changed, 2 insertions, 16 deletions
diff --git a/src/arch/arm/kvm/gic.cc b/src/arch/arm/kvm/gic.cc
index 7cf4d07c6..498b79faa 100644
--- a/src/arch/arm/kvm/gic.cc
+++ b/src/arch/arm/kvm/gic.cc
@@ -189,7 +189,7 @@ void
MuxingKvmGic::startup()
{
Pl390::startup();
- usingKvm = (kernelGic != nullptr) && validKvmEnvironment();
+ usingKvm = (kernelGic != nullptr) && system.validKvmEnvironment();
if (usingKvm)
fromPl390ToKvm();
}
@@ -206,7 +206,7 @@ void
MuxingKvmGic::drainResume()
{
Pl390::drainResume();
- bool use_kvm = (kernelGic != nullptr) && validKvmEnvironment();
+ bool use_kvm = (kernelGic != nullptr) && system.validKvmEnvironment();
if (use_kvm != usingKvm) {
// Should only occur due to CPU switches
if (use_kvm) // from simulation to KVM emulation
@@ -287,20 +287,6 @@ MuxingKvmGic::clearPPInt(uint32_t num, uint32_t cpu)
kernelGic->clearPPI(cpu, num);
}
-bool
-MuxingKvmGic::validKvmEnvironment() const
-{
- if (system.threadContexts.empty())
- return false;
-
- for (auto tc : system.threadContexts) {
- if (dynamic_cast<BaseArmKvmCPU*>(tc->getCpuPtr()) == nullptr) {
- return false;
- }
- }
- return true;
-}
-
void
MuxingKvmGic::copyDistRegister(BaseGicRegisters* from, BaseGicRegisters* to,
ContextID ctx, Addr daddr)