configs: Add --kvm-userspace-gic to fs_bigLITTLE.py
This will allow a user to select gem5 simulation of the GIC via command line; Necessary option when the simulated GIC != than the host GIC Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Change-Id: I30e151b774ddfa7f4e91054a375254e15007af3f Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/44006 Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Reviewed-by: Richard Cooper <richard.cooper@arm.com> Maintainer: Jason Lowe-Power <power.jg@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -197,6 +197,9 @@ def addOptions(parser):
|
||||
help="Custom Linux kernel command")
|
||||
parser.add_argument("--bootloader", action="append",
|
||||
help="executable file that runs before the --kernel")
|
||||
parser.add_argument("--kvm-userspace-gic", action="store_true",
|
||||
default=False,
|
||||
help="Use the gem5 GIC in a KVM simulation")
|
||||
parser.add_argument("-P", "--param", action="append", default=[],
|
||||
help="Set a SimObject parameter relative to the root node. "
|
||||
"An extended Python multi range slicing syntax can be used "
|
||||
@@ -281,7 +284,7 @@ def build(options):
|
||||
|
||||
# Create a KVM VM and do KVM-specific configuration
|
||||
if issubclass(big_model, KvmCluster):
|
||||
_build_kvm(system, all_cpus)
|
||||
_build_kvm(options, system, all_cpus)
|
||||
|
||||
# Linux device tree
|
||||
if options.dtb is not None:
|
||||
@@ -305,9 +308,18 @@ def build(options):
|
||||
|
||||
return root
|
||||
|
||||
def _build_kvm(system, cpus):
|
||||
def _build_kvm(options, system, cpus):
|
||||
system.kvm_vm = KvmVM()
|
||||
|
||||
if options.kvm_userspace_gic:
|
||||
# We will use the simulated GIC.
|
||||
# In order to make it work we need to remove the system interface
|
||||
# of the generic timer from the DTB and we need to inform the
|
||||
# MuxingKvmGic class to use the gem5 GIC instead of relying on the
|
||||
# host interrupt controller
|
||||
GenericTimer.generateDeviceTree = SimObject.generateDeviceTree
|
||||
system.realview.gic.simulate_gic = True
|
||||
|
||||
# Assign KVM CPUs to their own event queues / threads. This
|
||||
# has to be done after creating caches and other child objects
|
||||
# since these mustn't inherit the CPU event queue.
|
||||
|
||||
Reference in New Issue
Block a user