# Node ID 64b4bc46cce01b575b122e9d2b1c66941f90ccae # Parent 53d5cfcbb5a122a20551e4cbfd4cb5bf4a75d23d diff --git a/configs/example/se.py b/configs/example/se.py --- a/configs/example/se.py +++ b/configs/example/se.py @@ -62,6 +62,13 @@ from Caches import * from 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""" @@ -187,6 +194,15 @@ for cpu in system.cpu: cpu.clk_domain = system.cpu_clk_domain +if is_kvm_cpu(CPUClass) or is_kvm_cpu(FutureClass): + if buildEnv['TARGET_ISA'] == 'x86': + system.vm = KvmVM() + for process in multiprocesses: + process.useArchPT = True + process.KVMinSE = True + else: + fatal("KvmCPU can only be used in SE mode with x86") + # Sanity check if options.fastmem: if CPUClass != AtomicSimpleCPU: