1 use core::any::Any; 2 3 use alloc::sync::Arc; 4 use system_error::SystemError; 5 6 use crate::exception::{irqdesc::IrqReturn, IrqNumber}; 7 8 use super::base::device::DeviceId; 9 10 pub(super) mod irq; 11 pub mod transport_pci; 12 #[allow(clippy::module_inception)] 13 pub mod virtio; 14 pub mod virtio_impl; 15 16 pub trait VirtIODevice: Send + Sync + Any { 17 fn handle_irq(&self, _irq: IrqNumber) -> Result<IrqReturn, SystemError>; 18 19 fn dev_id(&self) -> &Arc<DeviceId>; 20 } 21