vmm: Support virtio-pci devices attached to a virtual IOMMU

This commit is the glue between the virtio-pci devices attached to the
vIOMMU, and the IORT ACPI table exposing them to the guest as sitting
behind this vIOMMU.

An important thing is the trait implementation provided to the virtio
vrings for each device attached to the vIOMMU, as they need to perform
proper address translation before they can access the buffers.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf
2019-10-02 13:57:20 -07:00
committed by Samuel Ortiz
parent 278ab05cbc
commit b918220b49
3 changed files with 179 additions and 41 deletions

View File

@@ -114,6 +114,10 @@ impl PciBus {
self.devices.push(device);
Ok(())
}
pub fn next_device_id(&self) -> u32 {
self.devices.len() as u32
}
}
pub struct PciConfigIo {