mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-10 22:57:43 +00:00
vmm: Do not create virtio devices when missing a transport
If neither PCI or MMIO are built in, we should not bother creating any virtio devices at all. When building a minimal VMM made of a kernel with an initramfs and a serial console, the RNG virtio device is still created even though there is no way it can ever get probed. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
parent
41895d7df1
commit
5788d36583
@ -453,6 +453,7 @@ impl DeviceManager {
|
|||||||
&mut virtio_devices,
|
&mut virtio_devices,
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
|
#[cfg(any(feature = "pci_support", feature = "mmio_support"))]
|
||||||
virtio_devices.append(&mut DeviceManager::make_virtio_devices(
|
virtio_devices.append(&mut DeviceManager::make_virtio_devices(
|
||||||
vm_info,
|
vm_info,
|
||||||
&address_manager,
|
&address_manager,
|
||||||
|
Loading…
Reference in New Issue
Block a user