vm_device_ops struct

Backend function table.

Every slot is required unless marked.

ctx is the pointer given to vm_device_register(). q is the native queue (NULL when queue_create is NULL). Ranges and counts are checked before a slot is called, and only supported (op, dtype) pairs reach submit. Slots return VM_DEVICE_OK or a negative code.

Public variables

size_t struct_size
sizeof(vm_device_ops) the module was built with.
uint32_t version
VM_DEVICE_OPS_VERSION.
void(* info
int(* supports
int(* buffer_create
int(* buffer_wrap
Optional; NULL makes vm_buffer_wrap() unsupported.
void(* buffer_destroy
wrapped is nonzero for buffer_wrap buffers; never free their host memory.
int(* queue_create
Optional pair; NULL means the device needs no queue state.
void(* queue_destroy
int(* write
int(* read
int(* copy
int(* submit
int(* finish