diff --git a/virtio-devices/src/iommu.rs b/virtio-devices/src/iommu.rs index 8be20d234..a9bfd8892 100644 --- a/virtio-devices/src/iommu.rs +++ b/virtio-devices/src/iommu.rs @@ -745,7 +745,7 @@ pub struct Iommu { ext_mapping: BTreeMap>, queue_evts: Option>, interrupt_cb: Option>, - epoll_threads: Option>>>, + epoll_threads: Option>>, paused: Arc, paused_sync: Arc, } @@ -965,7 +965,11 @@ impl VirtioDevice for Iommu { let mut epoll_threads = Vec::new(); thread::Builder::new() .name("virtio_iommu".to_string()) - .spawn(move || handler.run(paused, paused_sync)) + .spawn(move || { + if let Err(e) = handler.run(paused, paused_sync) { + error!("Error running worker: {:?}", e); + } + }) .map(|thread| epoll_threads.push(thread)) .map_err(|e| { error!("failed to clone the virtio-iommu epoll thread: {}", e);