vm-virtio: Add IOMMU support to virtio-rng

Adding virtio feature VIRTIO_F_IOMMU_PLATFORM when explicitly asked by
the user. The need for this feature is to be able to attach the virtio
device to a virtual IOMMU.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf
2019-10-04 10:39:42 -07:00
committed by Samuel Ortiz
parent ee1899c6f6
commit 9ab00dcb75
2 changed files with 9 additions and 5 deletions

View File

@@ -634,8 +634,8 @@ impl DeviceManager {
// Add virtio-rng if required
if let Some(rng_path) = vm_info.vm_cfg.rng.src.to_str() {
let virtio_rng_device =
vm_virtio::Rng::new(rng_path).map_err(DeviceManagerError::CreateVirtioRng)?;
let virtio_rng_device = vm_virtio::Rng::new(rng_path, false)
.map_err(DeviceManagerError::CreateVirtioRng)?;
devices.push(Box::new(virtio_rng_device) as Box<dyn vm_virtio::VirtioDevice>);
}