cpu-kvm: Initialize _hasKernelIRQChip in the constructor
authorHsuan Hsu <hsuan.hsu@mediatek.com>
Wed, 22 Apr 2020 08:39:56 +0000 (16:39 +0800)
committerHsuan Hsu <kugwa2000@gmail.com>
Fri, 10 Jul 2020 18:03:15 +0000 (18:03 +0000)
This class member was only correctly set to true when using an in-kernel
interrupt controller, but was un-initialized when trying to use a user-
space one and would cause trouble.

JIRA: https://gem5.atlassian.net/browse/GEM5-663

Change-Id: I71b052c6da7e8790b05a15c07e7933bc4f912785
Signed-off-by: Hsuan Hsu <hsuan.hsu@mediatek.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30917
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/cpu/kvm/vm.cc

index 720548c8f4bf2d1930776ce74922fa4734246ac3..4640ca16fe21a35619158b2d58daab7b477a89ed 100644 (file)
@@ -294,6 +294,7 @@ KvmVM::KvmVM(KvmVMParams *params)
       kvm(new Kvm()), system(nullptr),
       vmFD(kvm->createVM()),
       started(false),
+      _hasKernelIRQChip(false),
       nextVCPUID(0)
 {
     maxMemorySlot = kvm->capNumMemSlots();