mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: Build and set the list of external mappings for VFIO
When VFIO devices are created and if the device is attached to the virtual IOMMU, the ExternalDmaMapping trait implementation is created and associated with the device. The idea is to build a hash map of device IDs with their associated trait implementation. This hash map is provided to the virtual IOMMU device so that it knows how to properly trigger external mappings associated with VFIO devices. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
committed by
Samuel Ortiz
parent
c65ead5de8
commit
63c30a6e79
@@ -2904,7 +2904,7 @@ mod tests {
|
||||
.ssh_command("ls /sys/kernel/iommu_groups/0/devices")
|
||||
.unwrap()
|
||||
.trim(),
|
||||
"0000:00:03.0"
|
||||
"0000:00:02.0"
|
||||
);
|
||||
|
||||
// Verify the second disk is located under IOMMU group 1.
|
||||
@@ -2914,7 +2914,7 @@ mod tests {
|
||||
.ssh_command("ls /sys/kernel/iommu_groups/1/devices")
|
||||
.unwrap()
|
||||
.trim(),
|
||||
"0000:00:04.0"
|
||||
"0000:00:03.0"
|
||||
);
|
||||
|
||||
// Verify the network card is located under IOMMU group 2.
|
||||
@@ -2924,7 +2924,7 @@ mod tests {
|
||||
.ssh_command("ls /sys/kernel/iommu_groups/2/devices")
|
||||
.unwrap()
|
||||
.trim(),
|
||||
"0000:00:05.0"
|
||||
"0000:00:04.0"
|
||||
);
|
||||
|
||||
guest.ssh_command("sudo shutdown -h now")?;
|
||||
|
||||
Reference in New Issue
Block a user