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 <rbradford@meta.com>
This commit is contained in:
Rob Bradford
2026-04-14 12:10:55 +01:00
parent 3e3008f365
commit 101c259051

View File

@@ -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(())
}
}