Giacomo Travaglini has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/44006 )

Change subject: configs: Add --kvm-userspace-gic to fs_bigLITTLE.py
......................................................................

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.travagl...@arm.com>
Change-Id: I30e151b774ddfa7f4e91054a375254e15007af3f
---
M configs/example/arm/fs_bigLITTLE.py
1 file changed, 14 insertions(+), 2 deletions(-)



diff --git a/configs/example/arm/fs_bigLITTLE.py b/configs/example/arm/fs_bigLITTLE.py
index c7edb29..c590fe5 100644
--- a/configs/example/arm/fs_bigLITTLE.py
+++ b/configs/example/arm/fs_bigLITTLE.py
@@ -197,6 +197,9 @@
                         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 @@

     # 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 @@

     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.

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/44006
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I30e151b774ddfa7f4e91054a375254e15007af3f
Gerrit-Change-Number: 44006
Gerrit-PatchSet: 1
Gerrit-Owner: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to