mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-21 19:02:30 +00:00
virtio-devices: Print out error message from the iommu worker thread
Partially fixes: #1551 Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
parent
d71142277c
commit
dc6c62af09
@ -745,7 +745,7 @@ pub struct Iommu {
|
||||
ext_mapping: BTreeMap<u32, Arc<dyn ExternalDmaMapping>>,
|
||||
queue_evts: Option<Vec<EventFd>>,
|
||||
interrupt_cb: Option<Arc<dyn VirtioInterrupt>>,
|
||||
epoll_threads: Option<Vec<thread::JoinHandle<result::Result<(), EpollHelperError>>>>,
|
||||
epoll_threads: Option<Vec<thread::JoinHandle<()>>>,
|
||||
paused: Arc<AtomicBool>,
|
||||
paused_sync: Arc<Barrier>,
|
||||
}
|
||||
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user