mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-08-20 23:11:16 +00:00
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 <Henry.Wang@arm.com>
This commit is contained in:
parent
3ea4a0797d
commit
7c40a78b66
@ -196,15 +196,14 @@ pub mod kvm {
|
|||||||
its_required: bool,
|
its_required: bool,
|
||||||
) -> Result<Box<dyn GICDevice>> {
|
) -> Result<Box<dyn GICDevice>> {
|
||||||
if its_required {
|
if its_required {
|
||||||
|
debug!("GICv3-ITS is required, creating a GICv3-ITS here.");
|
||||||
KvmGICv3ITS::new(vm, vcpu_count)
|
KvmGICv3ITS::new(vm, vcpu_count)
|
||||||
} else {
|
} else {
|
||||||
KvmGICv3ITS::new(vm, vcpu_count).or_else(|_| {
|
debug!("GICv3-ITS is not required, will try GICv3 instead.");
|
||||||
debug!("Failed to create GICv3-ITS, will try GICv3 instead.");
|
|
||||||
KvmGICv3::new(vm, vcpu_count).or_else(|_| {
|
KvmGICv3::new(vm, vcpu_count).or_else(|_| {
|
||||||
debug!("Failed to create GICv3, will try GICv2 instead.");
|
debug!("Failed to create GICv3, will try GICv2 instead.");
|
||||||
KvmGICv2::new(vm, vcpu_count)
|
KvmGICv2::new(vm, vcpu_count)
|
||||||
})
|
})
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user