Giacomo Travaglini has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/36795 )

Change subject: kvm, arm: Add parameter to force simulation of Gicv2
......................................................................

kvm, arm: Add parameter to force simulation of Gicv2

By setting simulate_gic to True it will be possible to prevent
the simulation from using the host interrupt controller

Signed-off-by: Giacomo Travaglini <[email protected]>
Change-Id: I7c7df798e07bfaddbc2f1e7dd981b6aff621a9d1
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/36795
Reviewed-by: Andreas Sandberg <[email protected]>
Reviewed-by: Hsuan Hsu <[email protected]>
Maintainer: Andreas Sandberg <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/arch/arm/kvm/KvmGic.py
M src/arch/arm/kvm/gic.cc
2 files changed, 5 insertions(+), 1 deletion(-)

Approvals:
  Andreas Sandberg: Looks good to me, approved; Looks good to me, approved
  Hsuan Hsu: Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/arch/arm/kvm/KvmGic.py b/src/arch/arm/kvm/KvmGic.py
index 9796908..ce85ecb 100644
--- a/src/arch/arm/kvm/KvmGic.py
+++ b/src/arch/arm/kvm/KvmGic.py
@@ -41,3 +41,6 @@
 class MuxingKvmGic(GicV2):
     type = 'MuxingKvmGic'
     cxx_header = "arch/arm/kvm/gic.hh"
+
+    simulate_gic = Param.Bool(False,
+ "Forcing the simulation to use the gem5 GIC instead of the host GIC")
diff --git a/src/arch/arm/kvm/gic.cc b/src/arch/arm/kvm/gic.cc
index 6767833..feb764f 100644
--- a/src/arch/arm/kvm/gic.cc
+++ b/src/arch/arm/kvm/gic.cc
@@ -170,7 +170,8 @@
       kernelGic(nullptr),
       usingKvm(false)
 {
-    if (auto vm = system.getKvmVM()) {
+    auto vm = system.getKvmVM();
+    if (vm && !p.simulate_gic) {
         kernelGic = new KvmKernelGicV2(*vm, p.cpu_addr, p.dist_addr,
                                        p.it_lines);
     }

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/36795
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: I7c7df798e07bfaddbc2f1e7dd981b6aff621a9d1
Gerrit-Change-Number: 36795
Gerrit-PatchSet: 2
Gerrit-Owner: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Ciro Santilli <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Hsuan Hsu <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to