mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
msix: Add SystemAllocator to MsixConfig
The point here is to let MsixConfig take care of the GSI allocation, which means the SystemAllocator must be passed from the vmm crate all the way down to the pci crate. Once this is done, the GSI allocation and irq_fd creation is performed by MsixConfig directly. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
committed by
Samuel Ortiz
parent
f77d2c2d16
commit
86c760a0d9
@@ -1465,12 +1465,17 @@ impl DeviceManager {
|
||||
None
|
||||
};
|
||||
|
||||
let mut virtio_pci_device =
|
||||
VirtioPciDevice::new(memory.clone(), virtio_device, msix_num, iommu_mapping_cb)
|
||||
.map_err(DeviceManagerError::VirtioDevice)?;
|
||||
|
||||
let mut allocator = address_manager.allocator.lock().unwrap();
|
||||
|
||||
let mut virtio_pci_device = VirtioPciDevice::new(
|
||||
memory.clone(),
|
||||
virtio_device,
|
||||
msix_num,
|
||||
iommu_mapping_cb,
|
||||
&mut allocator,
|
||||
)
|
||||
.map_err(DeviceManagerError::VirtioDevice)?;
|
||||
|
||||
let bars = virtio_pci_device
|
||||
.allocate_bars(&mut allocator)
|
||||
.map_err(DeviceManagerError::AllocateBars)?;
|
||||
|
||||
Reference in New Issue
Block a user