mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
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:
@@ -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,
|
||||
)?);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user