From acc234088f8b69bdfa577c66b78ab11435c21a7b Mon Sep 17 00:00:00 2001 From: LiYa'nan Date: Sun, 14 Jun 2020 22:16:12 +0800 Subject: [PATCH] vfio: fix for bug as below: cloud-hypervisor: 763.978581807s: ERROR:pci/src/vfio.rs:651 -- failed to remove all guest memory regions from iommu table when poweroff a vm with vfio device, clh will finally remove all guest memory region from iommu table with the method unset_dma_map, not method setup_dma_map. Signed-off-by: LiYa'nan --- pci/src/vfio.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pci/src/vfio.rs b/pci/src/vfio.rs index 4186654b5..cf9a96d7a 100644 --- a/pci/src/vfio.rs +++ b/pci/src/vfio.rs @@ -645,7 +645,7 @@ impl Drop for VfioPciDevice { if self .device - .setup_dma_map(self.mem.memory().deref()) + .unset_dma_map(self.mem.memory().deref()) .is_err() { error!("failed to remove all guest memory regions from iommu table");