Skip to main content

Module cdev

Module cdev 

Source
Expand description

VFIO cdev (per-device fd) support.

VFIO cdev is the modern device-access interface (/dev/vfio/devices/vfioN) that replaces the legacy group/container model. Each device gets its own character device node. The device is bound to an iommufd instance via VFIO_DEVICE_BIND_IOMMUFD, and DMA is configured by attaching an iommufd IOAS or HWPT via VFIO_DEVICE_ATTACH_IOMMUFD_PT.

Once bound and attached, the device fd supports the same VFIO_DEVICE_* ioctls as the legacy group path (get_info, get_region_info, set_irqs, reset, mmap). The CdevDevice type wraps the fd and provides these operations, producing a super::Device for the common ioctl surface.

Structsยง

CdevDevice
A VFIO device opened via the cdev interface (/dev/vfio/devices/vfioN).
VfioDeviceAttachIommufdPt
VfioDeviceBindIommufd
VfioDeviceDetachIommufdPt