devices: virtio-gpu: gracefully handle activation errors Previously, the GPU device's activate() function would panic if sending the GpuActivationResources to the worker thread failed; this has been observed in some crash reports, possibly due to activate() running concurrently with a VM shutdown where the worker thread is already torn down. Instead of using expect() to panic if this send() fails, try to handle the failure by putting the GpuActivationReosurces back into the device's worker_snapshot field and bubbling up an Err result. BUG=None TEST=tools/dev_container tools/presubmit Change-Id: Ie52e2ecee353e13ff1105c418722a1a8facf997b Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5634184 Commit-Queue: Daniel Verkamp <dverkamp@chromium.org> Reviewed-by: Frederick Mayle <fmayle@google.com>
crosvm is a virtual machine monitor (VMM) based on Linux’s KVM hypervisor, with a focus on simplicity, security, and speed. crosvm is intended to run Linux guests, originally as a security boundary for running native applications on the ChromeOS platform. Compared to QEMU, crosvm doesn’t emulate architectures or real hardware, instead concentrating on paravirtualized devices, such as the virtio standard.
crosvm is currently used to run Linux/Android guests on ChromeOS devices.