mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
device: Improvement for BusDevice trait and PciDevice trait
BusDevice includes two methods which are only for PCI devices, which should be as members of PciDevice trait for a better clean high level APIs. Signed-off-by: Jing Liu <jing2.liu@linux.intel.com>
This commit is contained in:
committed by
Sebastien Boeuf
parent
5f7d520dc1
commit
9da2343cb7
@@ -692,7 +692,11 @@ impl DeviceManager {
|
||||
let virtio_pci_device = Arc::new(Mutex::new(virtio_pci_device));
|
||||
|
||||
pci_root
|
||||
.add_device(virtio_pci_device.clone(), mmio_bus, bars)
|
||||
.add_device(virtio_pci_device.clone())
|
||||
.map_err(DeviceManagerError::AddPciDevice)?;
|
||||
|
||||
pci_root
|
||||
.register_mapping(virtio_pci_device.clone(), mmio_bus, bars)
|
||||
.map_err(DeviceManagerError::AddPciDevice)?;
|
||||
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user