summaryrefslogtreecommitdiff
path: root/configs/example/se.py
diff options
context:
space:
mode:
authorAndreas Sandberg <andreas.sandberg@arm.com>2018-08-28 11:56:55 +0100
committerAndreas Sandberg <andreas.sandberg@arm.com>2018-09-03 16:05:46 +0000
commit215d5e4096cb4b06aa7fd5e9936440b28d8fe034 (patch)
tree280a6ea01b449ac3592157baadd61382025b7edc /configs/example/se.py
parent2b4b94d0556c2d03172ebff63f7fc502c3c26ff8 (diff)
downloadgem5-215d5e4096cb4b06aa7fd5e9936440b28d8fe034.tar.xz
config: Move KVM CPU checking to CpuConfig helper module
Both se.py and fs.py need to check if a CPU is a KVM CPU. This is somewhat involved since CPUs can be disabled at compile time. Enable better code reuse by moving it to the CpuConfig module. Change-Id: I47b1512ecb62e757399a407a0e41be83b9f83be3 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/12418 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'configs/example/se.py')
-rw-r--r--configs/example/se.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/configs/example/se.py b/configs/example/se.py
index 99d79bc57..015a953da 100644
--- a/configs/example/se.py
+++ b/configs/example/se.py
@@ -65,13 +65,6 @@ from common import MemConfig
from common.Caches import *
from common.cpu2000 import *
-# Check if KVM support has been enabled, we might need to do VM
-# configuration if that's the case.
-have_kvm_support = 'BaseKvmCPU' in globals()
-def is_kvm_cpu(cpu_class):
- return have_kvm_support and cpu_class != None and \
- issubclass(cpu_class, BaseKvmCPU)
-
def get_processes(options):
"""Interprets provided options and returns a list of processes"""
@@ -210,7 +203,7 @@ if options.elastic_trace_en:
for cpu in system.cpu:
cpu.clk_domain = system.cpu_clk_domain
-if is_kvm_cpu(CPUClass) or is_kvm_cpu(FutureClass):
+if CpuConfig.is_kvm_cpu(CPUClass) or CpuConfig.is_kvm_cpu(FutureClass):
if buildEnv['TARGET_ISA'] == 'x86':
system.kvm_vm = KvmVM()
for process in multiprocesses: