pub trait CommonCfgVolatileFieldAccess<'a, A> {
Show 21 methods
// Required methods
fn device_feature_select(self) -> VolatilePtr<'a, le32, A::Restricted>
where A: RestrictAccess<ReadWrite>;
fn device_feature(self) -> VolatilePtr<'a, le32, A::Restricted>
where A: RestrictAccess<ReadOnly>;
fn driver_feature_select(self) -> VolatilePtr<'a, le32, A::Restricted>
where A: RestrictAccess<ReadWrite>;
fn driver_feature(self) -> VolatilePtr<'a, le32, A::Restricted>
where A: RestrictAccess<ReadWrite>;
fn config_msix_vector(self) -> VolatilePtr<'a, le16, A::Restricted>
where A: RestrictAccess<ReadWrite>;
fn num_queues(self) -> VolatilePtr<'a, le16, A::Restricted>
where A: RestrictAccess<ReadOnly>;
fn device_status(self) -> VolatilePtr<'a, DeviceStatus, A::Restricted>
where A: RestrictAccess<ReadWrite>;
fn config_generation(self) -> VolatilePtr<'a, u8, A::Restricted>
where A: RestrictAccess<ReadOnly>;
fn queue_select(self) -> VolatilePtr<'a, le16, A::Restricted>
where A: RestrictAccess<ReadWrite>;
fn queue_size(self) -> VolatilePtr<'a, le16, A::Restricted>
where A: RestrictAccess<ReadWrite>;
fn queue_msix_vector(self) -> VolatilePtr<'a, le16, A::Restricted>
where A: RestrictAccess<ReadWrite>;
fn queue_enable(self) -> VolatilePtr<'a, le16, A::Restricted>
where A: RestrictAccess<ReadWrite>;
fn queue_notify_off(self) -> VolatilePtr<'a, le16, A::Restricted>
where A: RestrictAccess<ReadOnly>;
fn queue_desc_low(self) -> VolatilePtr<'a, le32, A::Restricted>
where A: RestrictAccess<ReadWrite>;
fn queue_desc_high(self) -> VolatilePtr<'a, le32, A::Restricted>
where A: RestrictAccess<ReadWrite>;
fn queue_driver_low(self) -> VolatilePtr<'a, le32, A::Restricted>
where A: RestrictAccess<ReadWrite>;
fn queue_driver_high(self) -> VolatilePtr<'a, le32, A::Restricted>
where A: RestrictAccess<ReadWrite>;
fn queue_device_low(self) -> VolatilePtr<'a, le32, A::Restricted>
where A: RestrictAccess<ReadWrite>;
fn queue_device_high(self) -> VolatilePtr<'a, le32, A::Restricted>
where A: RestrictAccess<ReadWrite>;
fn queue_notify_data(self) -> VolatilePtr<'a, le16, A::Restricted>
where A: RestrictAccess<ReadOnly>;
fn queue_reset(self) -> VolatilePtr<'a, le16, A::Restricted>
where A: RestrictAccess<ReadWrite>;
}
Expand description
Common configuration structure
The common configuration structure is found at the bar and offset within the VIRTIO_PCI_CAP_COMMON_CFG
capability.
Use CommonCfgVolatileFieldAccess
and CommonCfgVolatileWideFieldAccess
to work with this struct.
Required Methods§
Sourcefn device_feature_select(self) -> VolatilePtr<'a, le32, A::Restricted>where
A: RestrictAccess<ReadWrite>,
fn device_feature_select(self) -> VolatilePtr<'a, le32, A::Restricted>where
A: RestrictAccess<ReadWrite>,
The driver uses this to select which feature bits device_feature
shows.
Value 0x0 selects Feature Bits 0 to 31, 0x1 selects Feature Bits 32 to 63, etc.
Sourcefn device_feature(self) -> VolatilePtr<'a, le32, A::Restricted>where
A: RestrictAccess<ReadOnly>,
fn device_feature(self) -> VolatilePtr<'a, le32, A::Restricted>where
A: RestrictAccess<ReadOnly>,
The device uses this to report which feature bits it is
offering to the driver: the driver writes to
device_feature_select
to select which feature bits are presented.
Sourcefn driver_feature_select(self) -> VolatilePtr<'a, le32, A::Restricted>where
A: RestrictAccess<ReadWrite>,
fn driver_feature_select(self) -> VolatilePtr<'a, le32, A::Restricted>where
A: RestrictAccess<ReadWrite>,
The driver uses this to select which feature bits driver_feature
shows.
Value 0x0 selects Feature Bits 0 to 31, 0x1 selects Feature Bits 32 to 63, etc.
Sourcefn driver_feature(self) -> VolatilePtr<'a, le32, A::Restricted>where
A: RestrictAccess<ReadWrite>,
fn driver_feature(self) -> VolatilePtr<'a, le32, A::Restricted>where
A: RestrictAccess<ReadWrite>,
The driver writes this to accept feature bits offered by the device.
Driver Feature Bits selected by driver_feature_select
.
Sourcefn config_msix_vector(self) -> VolatilePtr<'a, le16, A::Restricted>where
A: RestrictAccess<ReadWrite>,
fn config_msix_vector(self) -> VolatilePtr<'a, le16, A::Restricted>where
A: RestrictAccess<ReadWrite>,
The driver sets the Configuration Vector for MSI-X.
Sourcefn num_queues(self) -> VolatilePtr<'a, le16, A::Restricted>where
A: RestrictAccess<ReadOnly>,
fn num_queues(self) -> VolatilePtr<'a, le16, A::Restricted>where
A: RestrictAccess<ReadOnly>,
The device specifies the maximum number of virtqueues supported here.
Sourcefn device_status(self) -> VolatilePtr<'a, DeviceStatus, A::Restricted>where
A: RestrictAccess<ReadWrite>,
fn device_status(self) -> VolatilePtr<'a, DeviceStatus, A::Restricted>where
A: RestrictAccess<ReadWrite>,
The driver writes the device status here (see DeviceStatus
). Writing 0 into this
field resets the device.
Sourcefn config_generation(self) -> VolatilePtr<'a, u8, A::Restricted>where
A: RestrictAccess<ReadOnly>,
fn config_generation(self) -> VolatilePtr<'a, u8, A::Restricted>where
A: RestrictAccess<ReadOnly>,
Configuration atomicity value. The device changes this every time the configuration noticeably changes.
Sourcefn queue_select(self) -> VolatilePtr<'a, le16, A::Restricted>where
A: RestrictAccess<ReadWrite>,
fn queue_select(self) -> VolatilePtr<'a, le16, A::Restricted>where
A: RestrictAccess<ReadWrite>,
Queue Select. The driver selects which virtqueue the following fields refer to.
Sourcefn queue_size(self) -> VolatilePtr<'a, le16, A::Restricted>where
A: RestrictAccess<ReadWrite>,
fn queue_size(self) -> VolatilePtr<'a, le16, A::Restricted>where
A: RestrictAccess<ReadWrite>,
Queue Size. On reset, specifies the maximum queue size supported by the device. This can be modified by the driver to reduce memory requirements. A 0 means the queue is unavailable.
Sourcefn queue_msix_vector(self) -> VolatilePtr<'a, le16, A::Restricted>where
A: RestrictAccess<ReadWrite>,
fn queue_msix_vector(self) -> VolatilePtr<'a, le16, A::Restricted>where
A: RestrictAccess<ReadWrite>,
The driver uses this to specify the queue vector for MSI-X.
Sourcefn queue_enable(self) -> VolatilePtr<'a, le16, A::Restricted>where
A: RestrictAccess<ReadWrite>,
fn queue_enable(self) -> VolatilePtr<'a, le16, A::Restricted>where
A: RestrictAccess<ReadWrite>,
The driver uses this to selectively prevent the device from executing requests from this virtqueue. 1 - enabled; 0 - disabled.
Sourcefn queue_notify_off(self) -> VolatilePtr<'a, le16, A::Restricted>where
A: RestrictAccess<ReadOnly>,
fn queue_notify_off(self) -> VolatilePtr<'a, le16, A::Restricted>where
A: RestrictAccess<ReadOnly>,
The driver reads this to calculate the offset from start of Notification structure at which this virtqueue is located.
This is not an offset in bytes. See Virtio Transport Options / Virtio Over PCI Bus / PCI Device Layout / Notification capability below.
Sourcefn queue_desc_low(self) -> VolatilePtr<'a, le32, A::Restricted>where
A: RestrictAccess<ReadWrite>,
fn queue_desc_low(self) -> VolatilePtr<'a, le32, A::Restricted>where
A: RestrictAccess<ReadWrite>,
The driver writes the physical address of Descriptor Area here. See section Basic Facilities of a Virtio Device / Virtqueues.
Sourcefn queue_desc_high(self) -> VolatilePtr<'a, le32, A::Restricted>where
A: RestrictAccess<ReadWrite>,
fn queue_desc_high(self) -> VolatilePtr<'a, le32, A::Restricted>where
A: RestrictAccess<ReadWrite>,
The driver writes the physical address of Descriptor Area here. See section Basic Facilities of a Virtio Device / Virtqueues.
Sourcefn queue_driver_low(self) -> VolatilePtr<'a, le32, A::Restricted>where
A: RestrictAccess<ReadWrite>,
fn queue_driver_low(self) -> VolatilePtr<'a, le32, A::Restricted>where
A: RestrictAccess<ReadWrite>,
The driver writes the physical address of Driver Area here. See section Basic Facilities of a Virtio Device / Virtqueues.
Sourcefn queue_driver_high(self) -> VolatilePtr<'a, le32, A::Restricted>where
A: RestrictAccess<ReadWrite>,
fn queue_driver_high(self) -> VolatilePtr<'a, le32, A::Restricted>where
A: RestrictAccess<ReadWrite>,
The driver writes the physical address of Driver Area here. See section Basic Facilities of a Virtio Device / Virtqueues.
Sourcefn queue_device_low(self) -> VolatilePtr<'a, le32, A::Restricted>where
A: RestrictAccess<ReadWrite>,
fn queue_device_low(self) -> VolatilePtr<'a, le32, A::Restricted>where
A: RestrictAccess<ReadWrite>,
The driver writes the physical address of Device Area here. See section Basic Facilities of a Virtio Device / Virtqueues.
Sourcefn queue_device_high(self) -> VolatilePtr<'a, le32, A::Restricted>where
A: RestrictAccess<ReadWrite>,
fn queue_device_high(self) -> VolatilePtr<'a, le32, A::Restricted>where
A: RestrictAccess<ReadWrite>,
The driver writes the physical address of Device Area here. See section Basic Facilities of a Virtio Device / Virtqueues.
Sourcefn queue_notify_data(self) -> VolatilePtr<'a, le16, A::Restricted>where
A: RestrictAccess<ReadOnly>,
fn queue_notify_data(self) -> VolatilePtr<'a, le16, A::Restricted>where
A: RestrictAccess<ReadOnly>,
This field exists only if VIRTIO_F_NOTIF_CONFIG_DATA
has been negotiated.
The driver will use this value to put it in the ‘virtqueue number’ field
in the available buffer notification structure.
See section Virtio Transport Options / Virtio Over PCI Bus / PCI-specific Initialization And Device Operation / Available Buffer Notifications.
This field provides the device with flexibility to determine how virtqueues
will be referred to in available buffer notifications.
In a trivial case the device can set queue_notify_data
=vqn. Some devices
may benefit from providing another value, for example an internal virtqueue
identifier, or an internal offset related to the virtqueue number.
Sourcefn queue_reset(self) -> VolatilePtr<'a, le16, A::Restricted>where
A: RestrictAccess<ReadWrite>,
fn queue_reset(self) -> VolatilePtr<'a, le16, A::Restricted>where
A: RestrictAccess<ReadWrite>,
The driver uses this to selectively reset the queue.
This field exists only if VIRTIO_F_RING_RESET
has been
negotiated. (see Basic Facilities of a Virtio Device / Virtqueues / Virtqueue Reset).