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 <giacomo.travaglini@arm.com>
Change-Id: I7c7df798e07bfaddbc2f1e7dd981b6aff621a9d1
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/36795
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Hsuan Hsu <kugwa2000@gmail.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Giacomo Travaglini
2020-10-29 19:03:45 +00:00
parent c794f56640
commit 6d678694d0
2 changed files with 5 additions and 1 deletions

View File

@@ -41,3 +41,6 @@ from m5.objects.Gic import GicV2
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")

View File

@@ -170,7 +170,8 @@ MuxingKvmGic::MuxingKvmGic(const MuxingKvmGicParams &p)
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);
}