Module protocol

Source
Expand description

This file was generated by the following commands and modified manually.

$ bindgen virtio_iommu.h              \
    --allowlist-type "virtio_iommu.*" \
    --allowlist-var "VIRTIO_IOMMU_.*" \
    --with-derive-default            \
    --no-layout-tests                \
    --no-prepend-enum-name > protocol.rs
$ sed -i "s/__u/u/g" protocol.rs
$ sed -i "s/__le/Le/g" protocol.rs

The main points of the manual modifications are as follows:
* Removed `head` and `tail` from each command struct. Instead, we process
  them as separate payloads.
* Derive implementations of zerocopy traits as needed.
* Use of `packed` because removing `head` and `tail` introduces paddings
* Remove `IncompleteArrayField`
* Convert padding of [u8; 64usize] to [u64; 8usize]. According to the rust
  doc, "Arrays of sizes from 0 to 32 (inclusive) implement the Default trait
  if the element type allows it."

Structs§

virtio_iommu_config
virtio_iommu_fault
virtio_iommu_probe_property
virtio_iommu_probe_resv_mem
virtio_iommu_range_32
virtio_iommu_range_64
virtio_iommu_req_attach
virtio_iommu_req_detach
virtio_iommu_req_head
virtio_iommu_req_map
virtio_iommu_req_probe
virtio_iommu_req_tail
virtio_iommu_req_unmap

Constants§

VIRTIO_IOMMU_FAULT_F_ADDRESS
VIRTIO_IOMMU_FAULT_F_EXEC
VIRTIO_IOMMU_FAULT_F_READ
VIRTIO_IOMMU_FAULT_F_WRITE
VIRTIO_IOMMU_FAULT_R_DOMAIN
VIRTIO_IOMMU_FAULT_R_MAPPING
VIRTIO_IOMMU_FAULT_R_UNKNOWN
VIRTIO_IOMMU_F_BYPASS
VIRTIO_IOMMU_F_DOMAIN_RANGE
VIRTIO_IOMMU_F_INPUT_RANGE
VIRTIO_IOMMU_F_MAP_UNMAP
VIRTIO_IOMMU_F_MMIO
VIRTIO_IOMMU_F_PROBE
VIRTIO_IOMMU_MAP_F_MASK
VIRTIO_IOMMU_MAP_F_MMIO
VIRTIO_IOMMU_MAP_F_READ
VIRTIO_IOMMU_MAP_F_WRITE
VIRTIO_IOMMU_PROBE_T_MASK
VIRTIO_IOMMU_PROBE_T_NONE
VIRTIO_IOMMU_PROBE_T_RESV_MEM
VIRTIO_IOMMU_RESV_MEM_T_MSI
VIRTIO_IOMMU_RESV_MEM_T_RESERVED
VIRTIO_IOMMU_S_DEVERR
VIRTIO_IOMMU_S_FAULT
VIRTIO_IOMMU_S_INVAL
VIRTIO_IOMMU_S_IOERR
VIRTIO_IOMMU_S_NOENT
VIRTIO_IOMMU_S_NOMEM
VIRTIO_IOMMU_S_OK
VIRTIO_IOMMU_S_RANGE
VIRTIO_IOMMU_S_UNSUPP
VIRTIO_IOMMU_T_ATTACH
VIRTIO_IOMMU_T_DETACH
VIRTIO_IOMMU_T_MAP
VIRTIO_IOMMU_T_PROBE
VIRTIO_IOMMU_T_UNMAP