virtio-devices: Shutdown VMM upon worker thread errors

Fixes: #4462

Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
Bo Chen
2022-08-11 17:16:27 -07:00
committed by Rob Bradford
parent 8c38992143
commit df5b803a63
14 changed files with 28 additions and 81 deletions

View File

@@ -324,11 +324,7 @@ impl VirtioDevice for Blk {
Thread::VirtioVhostBlock,
&mut epoll_threads,
&self.exit_evt,
move || {
if let Err(e) = handler.run(paused, paused_sync.unwrap()) {
error!("Error running worker: {:?}", e);
}
},
move || handler.run(paused, paused_sync.unwrap()),
)?;
self.epoll_thread = Some(epoll_threads.remove(0));

View File

@@ -563,11 +563,7 @@ impl VirtioDevice for Fs {
Thread::VirtioVhostFs,
&mut epoll_threads,
&self.exit_evt,
move || {
if let Err(e) = handler.run(paused, paused_sync.unwrap()) {
error!("Error running worker: {:?}", e);
}
},
move || handler.run(paused, paused_sync.unwrap()),
)?;
self.epoll_thread = Some(epoll_threads.remove(0));

View File

@@ -313,11 +313,7 @@ impl VirtioDevice for Net {
Thread::VirtioVhostNetCtl,
&mut epoll_threads,
&self.exit_evt,
move || {
if let Err(e) = ctrl_handler.run_ctrl(paused, paused_sync.unwrap()) {
error!("Error running worker: {:?}", e);
}
},
move || ctrl_handler.run_ctrl(paused, paused_sync.unwrap()),
)?;
self.ctrl_queue_epoll_thread = Some(epoll_threads.remove(0));
}
@@ -352,11 +348,7 @@ impl VirtioDevice for Net {
Thread::VirtioVhostNet,
&mut epoll_threads,
&self.exit_evt,
move || {
if let Err(e) = handler.run(paused, paused_sync.unwrap()) {
error!("Error running worker: {:?}", e);
}
},
move || handler.run(paused, paused_sync.unwrap()),
)?;
self.epoll_thread = Some(epoll_threads.remove(0));