virtio-devices: wire driver_status to EpollHandler

Signed-off-by: Peter Oskolkov <posk@google.com>
This commit is contained in:
Peter Oskolkov
2026-03-12 09:55:03 -07:00
committed by Bo Chen
parent 21bd3ae916
commit b5053ae4de
15 changed files with 34 additions and 4 deletions

View File

@@ -9,7 +9,7 @@
use std::collections::HashMap;
use std::io::Write;
use std::num::Wrapping;
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::atomic::{AtomicBool, AtomicU8, Ordering};
use std::sync::{Arc, Barrier};
use std::thread;
@@ -57,6 +57,7 @@ pub struct ActivationContext {
pub mem: GuestMemoryAtomic<GuestMemoryMmap>,
pub interrupt_cb: Arc<dyn VirtioInterrupt>,
pub queues: Vec<(usize, Queue, EventFd)>,
pub device_status: Arc<AtomicU8>,
}
/// Trait for virtio devices to be driven by a virtio transport.