From 7c40a78b6683fcef83a3eaebb2f4b711d8f4b0d5 Mon Sep 17 00:00:00 2001 From: Henry Wang Date: Sat, 5 Sep 2020 21:26:45 +0800 Subject: [PATCH] arch: Fix wrong trial of creating GICv3-ITS for non-PCI use cases Currently for AArch64, the GICv3-ITS is tried to be created first when PCI is not needed, which is unnecessary. This commit fixes the problem. Signed-off-by: Henry Wang --- arch/src/aarch64/gic/mod.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/src/aarch64/gic/mod.rs b/arch/src/aarch64/gic/mod.rs index 2941305e0..d877bf425 100644 --- a/arch/src/aarch64/gic/mod.rs +++ b/arch/src/aarch64/gic/mod.rs @@ -196,14 +196,13 @@ pub mod kvm { its_required: bool, ) -> Result> { if its_required { + debug!("GICv3-ITS is required, creating a GICv3-ITS here."); KvmGICv3ITS::new(vm, vcpu_count) } else { - KvmGICv3ITS::new(vm, vcpu_count).or_else(|_| { - debug!("Failed to create GICv3-ITS, will try GICv3 instead."); - KvmGICv3::new(vm, vcpu_count).or_else(|_| { - debug!("Failed to create GICv3, will try GICv2 instead."); - KvmGICv2::new(vm, vcpu_count) - }) + debug!("GICv3-ITS is not required, will try GICv3 instead."); + KvmGICv3::new(vm, vcpu_count).or_else(|_| { + debug!("Failed to create GICv3, will try GICv2 instead."); + KvmGICv2::new(vm, vcpu_count) }) } }