virtio-devices: net: Remove "driver_awake" workaround for restore

Now on the generic restore path the worker thread is notified on the
events and also the guest is notified via the interrupt. This avoids the
same "livelock" situation that required this "driver_awake" workaround
when restoring the net device.

Signed-off-by: Rob Bradford <rbradford@meta.com>
This commit is contained in:
Rob Bradford
2026-04-14 12:14:05 +01:00
parent 101c259051
commit 72fc0976f1
2 changed files with 10 additions and 25 deletions

View File

@@ -254,20 +254,15 @@ impl VirtioCommon {
return Err(ActivateError::BadActivate);
}
// Do not retain virtio-net queue eventfds here. Signaling them on
// resume would break its `driver_awake` workaround.
self.queue_evts = match VirtioDeviceType::from(self.device_type) {
VirtioDeviceType::Net => Vec::new(),
_ => queues
.iter()
.map(|(_, _, queue_evt)| {
queue_evt.try_clone().map_err(|e| {
error!("failed cloning queue EventFd: {e}");
ActivateError::BadActivate
})
self.queue_evts = queues
.iter()
.map(|(_, _, queue_evt)| {
queue_evt.try_clone().map_err(|e| {
error!("failed cloning queue EventFd: {e}");
ActivateError::BadActivate
})
.collect::<Result<Vec<_>, _>>()?,
};
})
.collect::<Result<Vec<_>, _>>()?;
let kill_evt = EventFd::new(EFD_NONBLOCK).map_err(|e| {
error!("failed creating kill EventFd: {e}");