From 1307d31ede3f76d9bf83ef40b0ae4784b63e7e5e Mon Sep 17 00:00:00 2001 From: Bo Chen Date: Mon, 5 May 2025 15:20:24 -0700 Subject: [PATCH] pci: vfio: Report more information with failed `vfio_dma_unmap` Signed-off-by: Bo Chen --- pci/src/vfio.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pci/src/vfio.rs b/pci/src/vfio.rs index bbdbdd747..b76664da8 100644 --- a/pci/src/vfio.rs +++ b/pci/src/vfio.rs @@ -1718,8 +1718,13 @@ impl VfioPciDevice { if let Err(e) = self .container .vfio_dma_unmap(user_memory_region.start, user_memory_region.size) + .map_err(|e| VfioPciError::DmaUnmap(e, self.device_path.clone(), self.bdf)) { - error!("Could not unmap mmio region from vfio container: {}", e); + error!( + "Could not unmap mmio region from vfio container: \ + iova 0x{:x}, size 0x{:x}: {}, ", + user_memory_region.start, user_memory_region.size, e + ); } }