mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-23 06:05:21 +00:00
vmm: device_manager: Store legacy interrupt manager
In anticipation for accessing the legacy interrupt manager from the function creating a VFIO PCI device, we store it as part of the DeviceManager, to make it available for all methods. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
parent
8008aad545
commit
b5450ca72c
@ -834,6 +834,9 @@ pub struct DeviceManager {
|
||||
// MSI Interrupt Manager
|
||||
msi_interrupt_manager: Arc<dyn InterruptManager<GroupConfig = MsiIrqGroupConfig>>,
|
||||
|
||||
// Legacy Interrupt Manager
|
||||
legacy_interrupt_manager: Option<Arc<dyn InterruptManager<GroupConfig = LegacyIrqGroupConfig>>>,
|
||||
|
||||
// Passthrough device handle
|
||||
passthrough_device: Option<Arc<dyn hypervisor::Device>>,
|
||||
|
||||
@ -941,6 +944,7 @@ impl DeviceManager {
|
||||
device_id_cnt: Wrapping(0),
|
||||
pci_bus: None,
|
||||
msi_interrupt_manager,
|
||||
legacy_interrupt_manager: None,
|
||||
passthrough_device: None,
|
||||
iommu_device: None,
|
||||
pci_devices_up: 0,
|
||||
@ -1044,6 +1048,8 @@ impl DeviceManager {
|
||||
|
||||
self.console = self.add_console_device(&legacy_interrupt_manager, &mut virtio_devices)?;
|
||||
|
||||
self.legacy_interrupt_manager = Some(legacy_interrupt_manager);
|
||||
|
||||
virtio_devices.append(&mut self.make_virtio_devices()?);
|
||||
|
||||
self.add_pci_devices(virtio_devices.clone())?;
|
||||
|
Loading…
Reference in New Issue
Block a user