mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
virtio-devices, vmm: Shutdown VMM on virtio thread panic
Shutdown the VMM in the virtio (or VMM side of vhost-user) thread panics. See: #3031 Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
@@ -365,6 +365,7 @@ pub struct Block {
|
||||
counters: BlockCounters,
|
||||
seccomp_action: SeccompAction,
|
||||
rate_limiter_config: Option<RateLimiterConfig>,
|
||||
exit_evt: EventFd,
|
||||
}
|
||||
|
||||
#[derive(Versionize)]
|
||||
@@ -391,6 +392,7 @@ impl Block {
|
||||
queue_size: u16,
|
||||
seccomp_action: SeccompAction,
|
||||
rate_limiter_config: Option<RateLimiterConfig>,
|
||||
exit_evt: EventFd,
|
||||
) -> io::Result<Self> {
|
||||
let disk_size = disk_image.size().map_err(|e| {
|
||||
io::Error::new(
|
||||
@@ -448,6 +450,7 @@ impl Block {
|
||||
counters: BlockCounters::default(),
|
||||
seccomp_action,
|
||||
rate_limiter_config,
|
||||
exit_evt,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -593,6 +596,7 @@ impl VirtioDevice for Block {
|
||||
&self.seccomp_action,
|
||||
Thread::VirtioBlock,
|
||||
&mut epoll_threads,
|
||||
&self.exit_evt,
|
||||
move || {
|
||||
if let Err(e) = handler.run(paused, paused_sync.unwrap()) {
|
||||
error!("Error running worker: {:?}", e);
|
||||
|
||||
Reference in New Issue
Block a user