mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vm-virtio: Add IOMMU support to virtio-net
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:
committed by
Samuel Ortiz
parent
9ebb1a55bc
commit
9fad680db1
@@ -612,10 +612,10 @@ impl DeviceManager {
|
||||
for net_cfg in net_list_cfg.iter() {
|
||||
let virtio_net_device = if let Some(ref tap_if_name) = net_cfg.tap {
|
||||
let tap = Tap::open_named(tap_if_name).map_err(DeviceManagerError::OpenTap)?;
|
||||
vm_virtio::Net::new_with_tap(tap, Some(&net_cfg.mac))
|
||||
vm_virtio::Net::new_with_tap(tap, Some(&net_cfg.mac), false)
|
||||
.map_err(DeviceManagerError::CreateVirtioNet)?
|
||||
} else {
|
||||
vm_virtio::Net::new(net_cfg.ip, net_cfg.mask, Some(&net_cfg.mac))
|
||||
vm_virtio::Net::new(net_cfg.ip, net_cfg.mask, Some(&net_cfg.mac), false)
|
||||
.map_err(DeviceManagerError::CreateVirtioNet)?
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user