pub struct VfioPciDevice { /* private fields */ }
Expand description

Provides control over a PCI device using VFIO.

Implementations

Creates a new VfioContainer containing only the group that contains the given vfio-pci device, then calls VfioPciDevice::open_in_container with the same path and the created container.

Note that this only works if no other VfioContainer already contains the device’s group, and so you must use VfioPciDevice::open_in_container if you want to drive several devices from the same VFIO group.

Opens a vfio-pci device and adds it to the given container.

sysfs_path must correspond to the device’s sysfs directory, e.g., /sys/bus/pci/devices/0000:00:01.0. container must contain the group to which the device belongs.

Returns a VfioPciDevice corresponding to the opened device.

Returns a reference to the container to which the device’s group belongs.

Trait Implementations

Formats the value using the given formatter. Read more

Returns a thing that lets you access the PCI configuration space. Read more

Returns a region that corresponds to the Base Address Register (BAR) with the given index, or None if there is no such BAR or it is unused by the device. Read more

Returns a region that is the PCI Expansion ROM, or None if the device doesn’t have one. Read more

Returns a thing that lets you manage IOMMU mappings for DMA. Read more

Returns a thing that lets you manage interrupts. Read more

Reset this function, and only it. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.