mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-22 03:12:27 +00:00
vmm: Fix KvmInterruptManager when base is different from 0
When the base InterruptIndex is different from 0, the loop allocating GSI and HashMap entries won't work as expected. The for loop needs to start from base, but the limit must be base+count so that we allocate a number of "count" entries. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
parent
e73cb1ff80
commit
d34f31fe7b
@ -272,7 +272,7 @@ impl InterruptManager for KvmInterruptManager {
|
||||
|
||||
let mut irq_routes: HashMap<InterruptIndex, InterruptRoute> =
|
||||
HashMap::with_capacity(count as usize);
|
||||
for i in base..count {
|
||||
for i in base..base + count {
|
||||
irq_routes.insert(i, InterruptRoute::new(&mut allocator)?);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user