vmm: Use the same set of reserved PCI IRQ routes for all segments

Generate a set of 8 IRQs and round-robin distribute those over all the
slots for a bus. This same set of IRQs is then used for all PCI
segments.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2021-10-11 16:35:52 +01:00
parent e3d6e222a1
commit cf1c2bf0e8
2 changed files with 30 additions and 10 deletions

View File

@@ -948,10 +948,17 @@ impl DeviceManager {
let start_of_device_area = memory_manager.lock().unwrap().start_of_device_area().0;
let end_of_device_area = memory_manager.lock().unwrap().end_of_device_area().0;
let mut pci_irq_slots = [0; 32];
PciSegment::reserve_legacy_interrupts_for_pci_devices(
&address_manager,
&mut pci_irq_slots,
)?;
let mut pci_segments = vec![PciSegment::new_default_segment(
&address_manager,
start_of_device_area,
end_of_device_area,
&pci_irq_slots,
)?];
if let Some(platform_config) = config.lock().unwrap().platform.as_ref() {
@@ -961,6 +968,7 @@ impl DeviceManager {
&address_manager,
start_of_device_area,
end_of_device_area,
&pci_irq_slots,
)?);
}
}