mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vm-virtio: Translate addresses for devices attached to IOMMU
In case some virtio devices are attached to the virtual IOMMU, their vring addresses need to be translated from IOVA into GPA. Otherwise it makes no sense to try to access them, and they would cause out of range errors. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
committed by
Samuel Ortiz
parent
6566c739e1
commit
0acb1e329d
@@ -943,8 +943,9 @@ impl DeviceManager {
|
||||
0
|
||||
};
|
||||
|
||||
let mut virtio_pci_device = VirtioPciDevice::new(memory.clone(), virtio_device, msix_num)
|
||||
.map_err(DeviceManagerError::VirtioDevice)?;
|
||||
let mut virtio_pci_device =
|
||||
VirtioPciDevice::new(memory.clone(), virtio_device, msix_num, None)
|
||||
.map_err(DeviceManagerError::VirtioDevice)?;
|
||||
|
||||
let bars = virtio_pci_device
|
||||
.allocate_bars(allocator)
|
||||
|
||||
Reference in New Issue
Block a user