libcxl - Man Page

A library to interact with CXL devices through sysfs(5) and ioctl(2) interfaces


#include <cxl/libcxl.h>
cc ... -lcxl


libcxl provides interfaces to interact with CXL devices in Linux, using sysfs interfaces for most kernel interactions, and the ioctl() interface for command submission.

The starting point for all library interfaces is a cxl_ctx object, returned by cxl_new(3). CXL Type 3 memory devices are children of the cxl_ctx object, and can be iterated through using an iterator API.

Library level interfaces that are agnostic to any device, or a specific subclass of operations have the prefix cxl_

The object representing a CXL Type 3 device is cxl_memdev. Library interfaces related to these devices have the prefix cxl_memdev_. These interfaces are mostly associated with sysfs interactions (unless otherwise noted in their respective documentation pages). They are typically used to retrieve data published by the kernel, or to send data or trigger kernel operations for a given device.

A cxl_cmd is a reference counted object which is used to perform Mailbox commands as described in the CXL Specification. A cxl_cmd object is tied to a cxl_memdev. Associated library interfaces have the prefix cxl_cmd_. Within this sub-class of interfaces, there are:

See Also



01/06/2022 libcxl 72.1 libcxl Manual