crosvm/gpu_display
Ryan Neph 3d0ece792c gpu: handle unexpected compositor disconnections
If crosvm's connection to the host compositor is suddenly broken
(e.g. from a compositor crash), a single POLLHUP is sent on the listened
file descriptor, but it is ignored. Then the VirtioGpu backend is
repeatedly awoken to handle display events, although there are none.

Since the compositor is lost and there is currently no path for
recovery, we can at least prevent runaway CPU usage by removing the
display from VirtioGpu's WaitContext. For VMs that can continue to
function without a guest display (headless crostini), this is
non-lethal. For VMs that require a display (ARCVM), other mechanisms
already exist for shutting down the VM under such unrecoverable
conditions.

BUG=b:250923109
TEST=Run Crostini and trigger a chrome crash; inspect virtio_gpu CPU
usage

Change-Id: I8b2261a093191dfe142697c4c4adc4e9ffab751a
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3975942
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Ryan Neph <ryanneph@google.com>
2022-10-25 21:39:45 +00:00
..
examples Update all copyright headers to match new style 2022-09-13 18:41:29 +00:00
protocol health-check: Add check for newline at ends of files 2022-08-18 00:17:04 +00:00
src gpu: handle unexpected compositor disconnections 2022-10-25 21:39:45 +00:00
build.rs Update all copyright headers to match new style 2022-09-13 18:41:29 +00:00
Cargo.toml gpu_display: upstream Windows implementation 2022-09-16 17:36:57 +00:00