tests: make VFIO memory hotplug more robust

After memory hotplug, it may happen that it takes a few seconds until a
VFIO device is available again (IOMMU/DMA mappings need update).

On-behalf-of: SAP philipp.schuster@sap.com
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
This commit is contained in:
Philipp Schuster
2026-04-14 10:30:26 +02:00
committed by Rob Bradford
parent e6c8b5e816
commit 98aa9d9c12

View File

@@ -8391,8 +8391,10 @@ mod vfio {
}));
assert!(guest.get_total_memory().unwrap_or_default() > 5_760_000);
// Check the VFIO device works when RAM is increased to 6GiB
assert!(guest.check_nvidia_gpu());
// Check the VFIO device works when RAM is increased to 6GiB.
// After guest memory hotplug, the VMM must refresh VFIO/iommufd DMA
// mappings for the passthrough GPU.
assert!(wait_until(Duration::from_secs(10), || guest.check_nvidia_gpu()));
});
let _ = child.kill();