virtio-devices: Report events for virtio device activation and reset

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2021-02-18 15:10:51 +00:00
parent 9260c4c10e
commit c89095ab85
16 changed files with 52 additions and 10 deletions
+3
View File
@@ -272,6 +272,7 @@ impl VirtioDevice for Blk {
}
self.common.epoll_threads = Some(epoll_threads);
event!("virtio-device", "activated", "id", &self.id);
Ok(())
}
@@ -291,6 +292,8 @@ impl VirtioDevice for Blk {
let _ = kill_evt.write(1);
}
event!("virtio-device", "reset", "id", &self.id);
// Return the interrupt
Some(self.common.interrupt_cb.take().unwrap())
}
+3
View File
@@ -492,6 +492,7 @@ impl VirtioDevice for Fs {
self.common.epoll_threads = Some(epoll_threads);
event!("virtio-device", "activated", "id", &self.id);
Ok(())
}
@@ -511,6 +512,8 @@ impl VirtioDevice for Fs {
let _ = kill_evt.write(1);
}
event!("virtio-device", "reset", "id", &self.id);
// Return the interrupt
Some(self.common.interrupt_cb.take().unwrap())
}
+2
View File
@@ -347,6 +347,8 @@ impl VirtioDevice for Net {
let _ = kill_evt.write(1);
}
event!("virtio-device", "reset", "id", &self.id);
// Return the interrupt
Some(self.common.interrupt_cb.take().unwrap())
}