arch-arm: Templatize MuxingKvmGic to support flexible hierarchy

By templatizing the MuxingKvmGic we decouple it from the GicV2
class, unlocking non GICv2 (e.g. GICv3) KVM and guest implementations

Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Change-Id: I26838903fa7c9f8b9de40678021329cb3390cc74
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/55611
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Giacomo Travaglini
2021-12-10 15:52:40 +00:00
parent 0865772b28
commit c28feb20f2
5 changed files with 89 additions and 66 deletions

View File

@@ -73,8 +73,8 @@ from m5.objects.CfiMemory import CfiMemory
# emulation. Use a GIC model that automatically switches between
# gem5's GIC model and KVM's GIC model if KVM is available.
try:
from m5.objects.KvmGic import MuxingKvmGic
kvm_gicv2_class = MuxingKvmGic
from m5.objects.KvmGic import MuxingKvmGicV2
kvm_gicv2_class = MuxingKvmGicV2
except ImportError:
# KVM support wasn't compiled into gem5. Fallback to a
# software-only GIC.