15ee52118SGiovanni CabidduWhat:		/sys/bus/pci/devices/<BDF>/qat/state
25ee52118SGiovanni CabidduDate:		June 2022
31d273983SMeadhbhKernelVersion:	6.0
45ee52118SGiovanni CabidduContact:	qat-linux@intel.com
51b466b8cSBagas SanjayaDescription:	(RW) Reports the current state of the QAT device. Write to
61b466b8cSBagas Sanjaya		the file to start or stop the device.
75ee52118SGiovanni Cabiddu
81b466b8cSBagas Sanjaya		The values are:
95ee52118SGiovanni Cabiddu
101b466b8cSBagas Sanjaya		* up: the device is up and running
111b466b8cSBagas Sanjaya		* down: the device is down
125ee52118SGiovanni Cabiddu
135ee52118SGiovanni Cabiddu
145ee52118SGiovanni Cabiddu		It is possible to transition the device from up to down only
155ee52118SGiovanni Cabiddu		if the device is up and vice versa.
165ee52118SGiovanni Cabiddu
175ee52118SGiovanni Cabiddu		This attribute is only available for qat_4xxx devices.
18d4cfb144SGiovanni Cabiddu
19d4cfb144SGiovanni CabidduWhat:		/sys/bus/pci/devices/<BDF>/qat/cfg_services
20d4cfb144SGiovanni CabidduDate:		June 2022
211d273983SMeadhbhKernelVersion:	6.0
22d4cfb144SGiovanni CabidduContact:	qat-linux@intel.com
231b466b8cSBagas SanjayaDescription:	(RW) Reports the current configuration of the QAT device.
241b466b8cSBagas Sanjaya		Write to the file to change the configured services.
25d4cfb144SGiovanni Cabiddu
261b466b8cSBagas Sanjaya		The values are:
27d4cfb144SGiovanni Cabiddu
281b466b8cSBagas Sanjaya		* sym;asym: the device is configured for running crypto
291b466b8cSBagas Sanjaya		  services
3050053275SAdam Guerin		* asym;sym: identical to sym;asym
311b466b8cSBagas Sanjaya		* dc: the device is configured for running compression services
32*2e513f6bSAdam Guerin		* dcc: identical to dc but enables the dc chaining feature,
33*2e513f6bSAdam Guerin		  hash then compression. If this is not required chose dc
3450053275SAdam Guerin		* sym: the device is configured for running symmetric crypto
3550053275SAdam Guerin		  services
3650053275SAdam Guerin		* asym: the device is configured for running asymmetric crypto
3750053275SAdam Guerin		  services
3850053275SAdam Guerin		* asym;dc: the device is configured for running asymmetric
3950053275SAdam Guerin		  crypto services and compression services
4050053275SAdam Guerin		* dc;asym: identical to asym;dc
4150053275SAdam Guerin		* sym;dc: the device is configured for running symmetric crypto
4250053275SAdam Guerin		  services and compression services
4350053275SAdam Guerin		* dc;sym: identical to sym;dc
44d4cfb144SGiovanni Cabiddu
45d4cfb144SGiovanni Cabiddu		It is possible to set the configuration only if the device
46d4cfb144SGiovanni Cabiddu		is in the `down` state (see /sys/bus/pci/devices/<BDF>/qat/state)
47d4cfb144SGiovanni Cabiddu
48d4cfb144SGiovanni Cabiddu		The following example shows how to change the configuration of
49d4cfb144SGiovanni Cabiddu		a device configured for running crypto services in order to
5019cdbdb7SBagas Sanjaya		run data compression::
5119cdbdb7SBagas Sanjaya
52d4cfb144SGiovanni Cabiddu			# cat /sys/bus/pci/devices/<BDF>/qat/state
53d4cfb144SGiovanni Cabiddu			up
54d4cfb144SGiovanni Cabiddu			# cat /sys/bus/pci/devices/<BDF>/qat/cfg_services
55d4cfb144SGiovanni Cabiddu			sym;asym
56d4cfb144SGiovanni Cabiddu			# echo down > /sys/bus/pci/devices/<BDF>/qat/state
57d4cfb144SGiovanni Cabiddu			# echo dc > /sys/bus/pci/devices/<BDF>/qat/cfg_services
58d4cfb144SGiovanni Cabiddu			# echo up > /sys/bus/pci/devices/<BDF>/qat/state
59d4cfb144SGiovanni Cabiddu			# cat /sys/bus/pci/devices/<BDF>/qat/cfg_services
60d4cfb144SGiovanni Cabiddu			dc
61d4cfb144SGiovanni Cabiddu
62d4cfb144SGiovanni Cabiddu		This attribute is only available for qat_4xxx devices.
632382b5aeSLucas Segarra Fernandez
642382b5aeSLucas Segarra FernandezWhat:		/sys/bus/pci/devices/<BDF>/qat/pm_idle_enabled
652382b5aeSLucas Segarra FernandezDate:		June 2023
662382b5aeSLucas Segarra FernandezKernelVersion:	6.5
672382b5aeSLucas Segarra FernandezContact:	qat-linux@intel.com
682382b5aeSLucas Segarra FernandezDescription:	(RW) This configuration option provides a way to force the device into remaining in
692382b5aeSLucas Segarra Fernandez		the MAX power state.
702382b5aeSLucas Segarra Fernandez		If idle support is enabled the device will transition to the `MIN` power state when
712382b5aeSLucas Segarra Fernandez		idle, otherwise will stay in the MAX power state.
722382b5aeSLucas Segarra Fernandez		Write to the file to enable or disable idle support.
732382b5aeSLucas Segarra Fernandez
742382b5aeSLucas Segarra Fernandez		The values are:
752382b5aeSLucas Segarra Fernandez
762382b5aeSLucas Segarra Fernandez		* 0: idle support is disabled
772382b5aeSLucas Segarra Fernandez		* 1: idle support is enabled
782382b5aeSLucas Segarra Fernandez
792382b5aeSLucas Segarra Fernandez		Default value is 1.
802382b5aeSLucas Segarra Fernandez
812382b5aeSLucas Segarra Fernandez		It is possible to set the pm_idle_enabled value only if the device
822382b5aeSLucas Segarra Fernandez		is in the `down` state (see /sys/bus/pci/devices/<BDF>/qat/state)
832382b5aeSLucas Segarra Fernandez
842382b5aeSLucas Segarra Fernandez		The following example shows how to change the pm_idle_enabled of
852382b5aeSLucas Segarra Fernandez		a device::
862382b5aeSLucas Segarra Fernandez
872382b5aeSLucas Segarra Fernandez			# cat /sys/bus/pci/devices/<BDF>/qat/state
882382b5aeSLucas Segarra Fernandez			up
892382b5aeSLucas Segarra Fernandez			# cat /sys/bus/pci/devices/<BDF>/qat/pm_idle_enabled
902382b5aeSLucas Segarra Fernandez			1
912382b5aeSLucas Segarra Fernandez			# echo down > /sys/bus/pci/devices/<BDF>/qat/state
922382b5aeSLucas Segarra Fernandez			# echo 0 > /sys/bus/pci/devices/<BDF>/qat/pm_idle_enabled
932382b5aeSLucas Segarra Fernandez			# echo up > /sys/bus/pci/devices/<BDF>/qat/state
942382b5aeSLucas Segarra Fernandez			# cat /sys/bus/pci/devices/<BDF>/qat/pm_idle_enabled
952382b5aeSLucas Segarra Fernandez			0
962382b5aeSLucas Segarra Fernandez
972382b5aeSLucas Segarra Fernandez		This attribute is only available for qat_4xxx devices.
98