.\" Copyright 2015-2017 IBM Corp. .\" .TH CXL_SET_PREFAULT_MODE 3 2017-05-24 "LIBCXL 1.5" "CXL Programmer's Manual" .SH NAME cxl_set_prefault_mode \- set the mode for prefaulting segments .SH SYNOPSIS .B #include .PP .B "int cxl_set_prefault_mode(struct cxl_afu_h" .BI * afu ", enum cxl_prefault_mode " value ); .SH DESCRIPTION .BR cxl_set_prefault_mode () sets the prefault mode of .I afu to .IR value . The current mode will be used for prefaulting in segments into the segment table when performing .BR cxl_afu_attach (), .BR cxl_afu_attach_full () or .BR cxl_afu_attach_work (). Mode must be one of the .B "enum cxl_prefault_mode" values: .TP .B CXL_PREFAULT_MODE_NONE No prefaulting (default). .TP .B CXL_PREFAULT_MODE_WED Treat the work element descriptor as an effective address and prefault what it points to. .TP .B CXL_PREFAULT_MODE_ALL Prefault all the segments mapped by the process calling .BR cxl_afu_attach (). .SH RETURN VALUE On success, 0 is returned. On error, \-1 is returned and .I errno is set appropriately. .SH ERRORS .TP .B EINVAL Invalid argument value. .SH SEE ALSO .BR cxl (3), .BR cxl_adapter_afu_next (3), .BR cxl_afu_attach (3), .BR cxl_afu_attach_full (3), .BR cxl_afu_attach_work (3), .BR cxl_afu_next (3), .BR cxl_get_prefault_mode (3)