pub trait Transport {
Show 13 methods fn device_type(&self) -> DeviceType; fn read_device_features(&mut self) -> u64; fn write_driver_features(&mut self, driver_features: u64); fn max_queue_size(&self) -> u32; fn notify(&mut self, queue: u32); fn set_status(&mut self, status: DeviceStatus); fn set_guest_page_size(&mut self, guest_page_size: u32); fn queue_set(
        &mut self,
        queue: u32,
        size: u32,
        descriptors: PhysAddr,
        driver_area: PhysAddr,
        device_area: PhysAddr
    ); fn queue_used(&mut self, queue: u32) -> bool; fn ack_interrupt(&mut self) -> bool; fn config_space(&self) -> NonNull<u64>; fn begin_init(&mut self, negotiate_features: impl FnOnce(u64) -> u64) { ... } fn finish_init(&mut self) { ... }
}
Expand description

A VirtIO transport layer.

Required Methods

Gets the device type.

Reads device features.

Writes device features.

Gets the max size of queue.

Notifies the given queue on the device.

Sets the device status.

Sets the guest page size.

Sets up the given queue.

Returns whether the queue is in use, i.e. has a nonzero PFN or is marked as ready.

Acknowledges an interrupt.

Returns true on success.

Gets the pointer to the config space.

Provided Methods

Begins initializing the device.

Ref: virtio 3.1.1 Device Initialization

Finishes initializing the device.

Implementors