Struct virtio_drivers::VirtIOHeader
source · [−]#[repr(C)]pub struct VirtIOHeader { /* private fields */ }
Expand description
MMIO Device Legacy Register Interface.
Ref: 4.2.4 Legacy interface
Implementations
sourceimpl VirtIOHeader
impl VirtIOHeader
sourcepub fn device_type(&self) -> DeviceType
pub fn device_type(&self) -> DeviceType
Get the device type.
sourcepub fn begin_init(&mut self, negotiate_features: impl FnOnce(u64) -> u64)
pub fn begin_init(&mut self, negotiate_features: impl FnOnce(u64) -> u64)
Begin initializing the device.
Ref: virtio 3.1.1 Device Initialization
sourcepub fn finish_init(&mut self)
pub fn finish_init(&mut self)
Finish initializing the device.
sourcepub fn queue_physical_page_number(&mut self, queue: u32) -> u32
pub fn queue_physical_page_number(&mut self, queue: u32) -> u32
Get guest physical page number of the virtual queue.
sourcepub fn queue_used(&mut self, queue: u32) -> bool
pub fn queue_used(&mut self, queue: u32) -> bool
Whether the queue is in used.
sourcepub fn max_queue_size(&self) -> u32
pub fn max_queue_size(&self) -> u32
Get the max size of queue.
sourcepub fn ack_interrupt(&mut self) -> bool
pub fn ack_interrupt(&mut self) -> bool
Acknowledge interrupt and return true if success.
sourcepub fn config_space(&self) -> *mut u64
pub fn config_space(&self) -> *mut u64
Get the pointer to config space (at offset 0x100)
Auto Trait Implementations
impl RefUnwindSafe for VirtIOHeader
impl Send for VirtIOHeader
impl Sync for VirtIOHeader
impl Unpin for VirtIOHeader
impl UnwindSafe for VirtIOHeader
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more