From 24cf15d2b2da8c00f17149b450f44b73c4f42f6c Mon Sep 17 00:00:00 2001 From: Sebastien Boeuf Date: Wed, 8 Jan 2020 18:46:39 +0100 Subject: [PATCH] vfio: Don't throw an error if a region cannot be found Everytime we use VFIO with cloud-hypervisor, we get the following error: ERROR:vfio/src/vfio_device.rs:440 -- Could not get region #8 info But this is not an error per se, and should be considered as a simple warning. Signed-off-by: Sebastien Boeuf --- vfio/src/vfio_device.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vfio/src/vfio_device.rs b/vfio/src/vfio_device.rs index a78d4b8a8..9c40c5189 100644 --- a/vfio/src/vfio_device.rs +++ b/vfio/src/vfio_device.rs @@ -437,7 +437,7 @@ impl VfioDeviceInfo { ioctl_with_mut_ref(&self.device, VFIO_DEVICE_GET_REGION_INFO(), &mut reg_info) }; if ret < 0 { - error!("Could not get region #{} info", i); + warn!("Could not get region #{} info", i); continue; } @@ -463,7 +463,7 @@ impl VfioDeviceInfo { ) }; if ret < 0 { - error!("Could not get region #{} info", i); + warn!("Could not get region #{} info", i); continue; } // region_with_cap[0].cap_info may contain vfio_region_info_cap_sparse_mmap