mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
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:
@@ -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}");
|
||||
|
||||
Reference in New Issue
Block a user