From 101c2590514ffaf53726aaf2a9a636673b6142b5 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Tue, 14 Apr 2026 12:10:55 +0100 Subject: [PATCH] virtio-devices: trigger interrupt into guest on resume This will wake up the guest and avoid a livelock situation by ensuring that it will process any pending queues on its side. Signed-off-by: Rob Bradford --- virtio-devices/src/device.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/virtio-devices/src/device.rs b/virtio-devices/src/device.rs index 96a40a4da..0bab70313 100644 --- a/virtio-devices/src/device.rs +++ b/virtio-devices/src/device.rs @@ -384,6 +384,15 @@ impl Pausable for VirtioCommon { })?; } + // Also trigger interrupts into the guest to wake up the driver to avoid a "livelock" + if let Some(interrupt_cb) = &self.interrupt_cb { + for i in 0..self.queue_evts.len() { + interrupt_cb + .trigger(crate::VirtioInterruptType::Queue(i as u16)) + .ok(); + } + } + Ok(()) } }