···1111/**1212 * DOC: UAPI1313 *1414- * Not all of all commands that the driver supports are always available for use1515- * by userspace. Userspace must check the results from the QUERY command in1616- * order to determine the live set of commands.1414+ * Not all of the commands that the driver supports are available for use by1515+ * userspace at all times. Userspace can check the result of the QUERY command1616+ * to determine the live set of commands. Alternatively, it can issue the1717+ * command and check for failure.1718 */18191920#define CXL_MEM_QUERY_COMMANDS _IOR(0xCE, 1, struct cxl_mem_query_commands)2021#define CXL_MEM_SEND_COMMAND _IOWR(0xCE, 2, struct cxl_send_command)21222323+/*2424+ * NOTE: New defines must be added to the end of the list to preserve2525+ * compatibility because this enum is exported to user space.2626+ */2227#define CXL_CMDS \2328 ___C(INVALID, "Invalid Command"), \2429 ___C(IDENTIFY, "Identify Command"), \···7368 * struct cxl_command_info - Command information returned from a query.7469 * @id: ID number for the command.7570 * @flags: Flags that specify command behavior.7171+ *7272+ * CXL_MEM_COMMAND_FLAG_USER_ENABLED7373+ *7474+ * The given command id is supported by the driver and is supported by7575+ * a related opcode on the device.7676+ *7777+ * CXL_MEM_COMMAND_FLAG_EXCLUSIVE7878+ *7979+ * Requests with the given command id will terminate with EBUSY as the8080+ * kernel actively owns management of the given resource. For example,8181+ * the label-storage-area can not be written while the kernel is8282+ * actively managing that space.8383+ *7684 * @size_in: Expected input size, or ~0 if variable length.7785 * @size_out: Expected output size, or ~0 if variable length.7886 *···9577 * bytes of output.9678 *9779 * - @id = 109898- * - @flags = 08080+ * - @flags = CXL_MEM_COMMAND_FLAG_ENABLED9981 * - @size_in = ~010082 * - @size_out = 010183 *···10587 __u32 id;1068810789 __u32 flags;108108-#define CXL_MEM_COMMAND_FLAG_MASK GENMASK(0, 0)9090+#define CXL_MEM_COMMAND_FLAG_MASK GENMASK(1, 0)9191+#define CXL_MEM_COMMAND_FLAG_ENABLED BIT(0)9292+#define CXL_MEM_COMMAND_FLAG_EXCLUSIVE BIT(1)1099311094 __u32 size_in;11195 __u32 size_out;