mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
Worker threads spawned through spawn_virtio_thread previously wrote to exit_evt on any clean Err return, taking the whole VMM down on a single failed device worker. A guest induced fault in any virtio device thus propagated into a host wide failure. Route the Err return through the shared mark_device_needs_reset helper instead. The helper sets the DEVICE_NEEDS_RESET bit on device_status and triggers a config change interrupt, so the device goes idle and the guest is informed. The thread exits cleanly without killing the rest of the VMM. The panic and the seccomp filter apply paths keep writing to exit_evt. A panicked worker may have left poisoned locks or partially mutated state, so a hard exit remains the right policy there. spawn_virtio_thread now takes the device_status and the interrupt callback. Every native virtio and vhost-user call site is updated to pass them in. Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>