diff options
author | Xiong Zhang <xiong.y.zhang@intel.corp-partner.google.com> | 2019-09-04 17:55:58 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-11-18 07:58:33 +0000 |
commit | 40a721b434f8bc59aac0010d5612ef3ac39f20c8 (patch) | |
tree | c28b39d53dd4d9e163e95eeff5e933d0849bb49b /devices | |
parent | 1de388ae027a09a8170bf3fb2c4b9f1a2b67e02d (diff) | |
download | crosvm-40a721b434f8bc59aac0010d5612ef3ac39f20c8.tar crosvm-40a721b434f8bc59aac0010d5612ef3ac39f20c8.tar.gz crosvm-40a721b434f8bc59aac0010d5612ef3ac39f20c8.tar.bz2 crosvm-40a721b434f8bc59aac0010d5612ef3ac39f20c8.tar.lz crosvm-40a721b434f8bc59aac0010d5612ef3ac39f20c8.tar.xz crosvm-40a721b434f8bc59aac0010d5612ef3ac39f20c8.tar.zst crosvm-40a721b434f8bc59aac0010d5612ef3ac39f20c8.zip |
vfio: Don't exit at get_region_info failure
At vfio device initialization, it will probe all the defined regions, most device don't have vga region, then when crosvm probe vga region info, kernel vfio will return -EINVAL. So when error happens, it should continue getting the next region info, instead of exit. BUG=None TEST=passthrough non graphic device into guest Change-Id: If4d2f723df45f58ccd733e03c854cdcef3530bdb Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1918486 Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'devices')
-rw-r--r-- | devices/src/vfio.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/devices/src/vfio.rs b/devices/src/vfio.rs index 501a0bb..d376cf9 100644 --- a/devices/src/vfio.rs +++ b/devices/src/vfio.rs @@ -485,7 +485,7 @@ impl VfioDevice { // and we verify the return value. ret = unsafe { ioctl_with_mut_ref(dev, VFIO_DEVICE_GET_REGION_INFO(), &mut reg_info) }; if ret < 0 { - return Err(VfioError::VfioDeviceGetRegionInfo(get_error())); + continue; } let region = VfioRegion { |