pub struct VirtIoBlockCfg(_);
Expand description

Device configuration layout

The capacity of the device (expressed in 512-byte sectors) is always present. The availability of the others all depend on various feature bits as indicated above. The parameters in the configuration space of the device max_discard_sectors discard_sector_alignment are expressed in 512-byte units if the VIRTIO_BLK_F_DISCARD feature bit is negotiated. The max_write_zeroes_sectors is expressed in 512-byte units if the VIRTIO_BLK_F_WRITE_ZEROES feature bit is negotiated.

Implementations§

source§

impl VirtIoBlockCfg

source

pub fn new_from_mmio_area(area: MmioArea) -> Self

Create new mmio area.

source

pub fn va(&self) -> Va

Get starting virtual address.

source§

impl VirtIoBlockCfg

source

pub fn capacity(&self) -> MmioAccessor<u64, { _ }, { _ }>

source§

impl VirtIoBlockCfg

source

pub fn size_max(&self) -> MmioAccessor<u32, { _ }, { _ }>

source§

impl VirtIoBlockCfg

source

pub fn seg_max(&self) -> MmioAccessor<u32, { _ }, { _ }>

source§

impl VirtIoBlockCfg

source

pub fn geometry_cylinders(&self) -> MmioAccessor<u16, { _ }, { _ }>

source§

impl VirtIoBlockCfg

source

pub fn geometry_heads(&self) -> MmioAccessor<u8, { _ }, { _ }>

source§

impl VirtIoBlockCfg

source

pub fn geometry_sectors(&self) -> MmioAccessor<u8, { _ }, { _ }>

source§

impl VirtIoBlockCfg

source

pub fn blk_size(&self) -> MmioAccessor<u16, { _ }, { _ }>

source§

impl VirtIoBlockCfg

source§

impl VirtIoBlockCfg

source

pub fn topology_alignment_offset(&self) -> MmioAccessor<u8, { _ }, { _ }>

offset of first aligned logical block

source§

impl VirtIoBlockCfg

source

pub fn topology_min_io_size(&self) -> MmioAccessor<u16, { _ }, { _ }>

suggested minimum I/O size in blocks

source§

impl VirtIoBlockCfg

source

pub fn topology_opt_io_size(&self) -> MmioAccessor<u32, { _ }, { _ }>

optimal (suggested maximum) I/O size in blocks

source§

impl VirtIoBlockCfg

source

pub fn writeback(&self) -> MmioAccessor<u8, { _ }, { _ }>

source§

impl VirtIoBlockCfg

source

pub fn max_discard_sectors(&self) -> MmioAccessor<u32, { _ }, { _ }>

source§

impl VirtIoBlockCfg

source

pub fn max_discard_seg(&self) -> MmioAccessor<u32, { _ }, { _ }>

source§

impl VirtIoBlockCfg

source

pub fn discard_sector_alignment(&self) -> MmioAccessor<u32, { _ }, { _ }>

source§

impl VirtIoBlockCfg

source

pub fn max_write_zeros_sectors(&self) -> MmioAccessor<u32, { _ }, { _ }>

source§

impl VirtIoBlockCfg

source

pub fn max_write_zeros_seg(&self) -> MmioAccessor<u32, { _ }, { _ }>

source§

impl VirtIoBlockCfg

source

pub fn write_zeros_may_unmap(&self) -> MmioAccessor<u8, { _ }, { _ }>

Auto Trait Implementations§

§

impl RefUnwindSafe for VirtIoBlockCfg

§

impl Send for VirtIoBlockCfg

§

impl Sync for VirtIoBlockCfg

§

impl Unpin for VirtIoBlockCfg

§

impl UnwindSafe for VirtIoBlockCfg

Blanket Implementations§

§

impl<T> Any for Twhere T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

const: unstable§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.