mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
When the guest writes DRIVER_OK and the device fails to activate, the VMM previously bubbled the error up via VirtioActivate and never released the activation barrier, leaving the vCPU that wrote DRIVER_OK blocked on the barrier and effectively deadlocking the guest. Per virtio 1.3 section 2.1.2, a device that has experienced an error it cannot recover from should set DEVICE_NEEDS_RESET in its status and notify the driver via a configuration change interrupt. Do that on activation failure through the existing mark_device_needs_reset helper, then release the activation barrier so the vCPU can resume. DeviceManager::activate_virtio_devices now logs and continues instead of aborting the whole pending list, so one failing device does not take down the VMM or block pause and migration. The activator has already reported the failure with the device id. Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>