Skip to content

Commit 0cb552a

Browse files
committed
Merge tag 'v6.8-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto updates from Herbert Xu: "API: - Add incremental lskcipher/skcipher processing Algorithms: - Remove SHA1 from drbg - Remove CFB and OFB Drivers: - Add comp high perf mode configuration in hisilicon/zip - Add support for 420xx devices in qat - Add IAA Compression Accelerator driver" * tag 'v6.8-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (172 commits) crypto: iaa - Account for cpu-less numa nodes crypto: scomp - fix req->dst buffer overflow crypto: sahara - add support for crypto_engine crypto: sahara - remove error message for bad aes request size crypto: sahara - remove unnecessary NULL assignments crypto: sahara - remove 'active' flag from sahara_aes_reqctx struct crypto: sahara - use dev_err_probe() crypto: sahara - use devm_clk_get_enabled() crypto: sahara - use BIT() macro crypto: sahara - clean up macro indentation crypto: sahara - do not resize req->src when doing hash operations crypto: sahara - fix processing hash requests with req->nbytes < sg->length crypto: sahara - improve error handling in sahara_sha_process() crypto: sahara - fix wait_for_completion_timeout() error handling crypto: sahara - fix ahash reqsize crypto: sahara - handle zero-length aes requests crypto: skcipher - remove excess kerneldoc members crypto: shash - remove excess kerneldoc members crypto: qat - generate dynamically arbiter mappings crypto: qat - add support for ring pair level telemetry ...
2 parents 6434ead + b891063 commit 0cb552a

File tree

205 files changed

+10084
-5776
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

205 files changed

+10084
-5776
lines changed
Lines changed: 228 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,228 @@
1+
What: /sys/kernel/debug/qat_<device>_<BDF>/telemetry/control
2+
Date: March 2024
3+
KernelVersion: 6.8
4+
5+
Description: (RW) Enables/disables the reporting of telemetry metrics.
6+
7+
Allowed values to write:
8+
========================
9+
* 0: disable telemetry
10+
* 1: enable telemetry
11+
* 2, 3, 4: enable telemetry and calculate minimum, maximum
12+
and average for each counter over 2, 3 or 4 samples
13+
14+
Returned values:
15+
================
16+
* 1-4: telemetry is enabled and running
17+
* 0: telemetry is disabled
18+
19+
Example.
20+
21+
Writing '3' to this file starts the collection of
22+
telemetry metrics. Samples are collected every second and
23+
stored in a circular buffer of size 3. These values are then
24+
used to calculate the minimum, maximum and average for each
25+
counter. After enabling, counters can be retrieved through
26+
the ``device_data`` file::
27+
28+
echo 3 > /sys/kernel/debug/qat_4xxx_0000:6b:00.0/telemetry/control
29+
30+
Writing '0' to this file stops the collection of telemetry
31+
metrics::
32+
33+
echo 0 > /sys/kernel/debug/qat_4xxx_0000:6b:00.0/telemetry/control
34+
35+
This attribute is only available for qat_4xxx devices.
36+
37+
What: /sys/kernel/debug/qat_<device>_<BDF>/telemetry/device_data
38+
Date: March 2024
39+
KernelVersion: 6.8
40+
41+
Description: (RO) Reports device telemetry counters.
42+
Reads report metrics about performance and utilization of
43+
a QAT device:
44+
45+
======================= ========================================
46+
Field Description
47+
======================= ========================================
48+
sample_cnt number of acquisitions of telemetry data
49+
from the device. Reads are performed
50+
every 1000 ms.
51+
pci_trans_cnt number of PCIe partial transactions
52+
max_rd_lat maximum logged read latency [ns] (could
53+
be any read operation)
54+
rd_lat_acc_avg average read latency [ns]
55+
max_gp_lat max get to put latency [ns] (only takes
56+
samples for AE0)
57+
gp_lat_acc_avg average get to put latency [ns]
58+
bw_in PCIe, write bandwidth [Mbps]
59+
bw_out PCIe, read bandwidth [Mbps]
60+
at_page_req_lat_avg Address Translator(AT), average page
61+
request latency [ns]
62+
at_trans_lat_avg AT, average page translation latency [ns]
63+
at_max_tlb_used AT, maximum uTLB used
64+
util_cpr<N> utilization of Compression slice N [%]
65+
exec_cpr<N> execution count of Compression slice N
66+
util_xlt<N> utilization of Translator slice N [%]
67+
exec_xlt<N> execution count of Translator slice N
68+
util_dcpr<N> utilization of Decompression slice N [%]
69+
exec_dcpr<N> execution count of Decompression slice N
70+
util_pke<N> utilization of PKE N [%]
71+
exec_pke<N> execution count of PKE N
72+
util_ucs<N> utilization of UCS slice N [%]
73+
exec_ucs<N> execution count of UCS slice N
74+
util_wat<N> utilization of Wireless Authentication
75+
slice N [%]
76+
exec_wat<N> execution count of Wireless Authentication
77+
slice N
78+
util_wcp<N> utilization of Wireless Cipher slice N [%]
79+
exec_wcp<N> execution count of Wireless Cipher slice N
80+
util_cph<N> utilization of Cipher slice N [%]
81+
exec_cph<N> execution count of Cipher slice N
82+
util_ath<N> utilization of Authentication slice N [%]
83+
exec_ath<N> execution count of Authentication slice N
84+
======================= ========================================
85+
86+
The telemetry report file can be read with the following command::
87+
88+
cat /sys/kernel/debug/qat_4xxx_0000:6b:00.0/telemetry/device_data
89+
90+
If ``control`` is set to 1, only the current values of the
91+
counters are displayed::
92+
93+
<counter_name> <current>
94+
95+
If ``control`` is 2, 3 or 4, counters are displayed in the
96+
following format::
97+
98+
<counter_name> <current> <min> <max> <avg>
99+
100+
If a device lacks of a specific accelerator, the corresponding
101+
attribute is not reported.
102+
103+
This attribute is only available for qat_4xxx devices.
104+
105+
What: /sys/kernel/debug/qat_<device>_<BDF>/telemetry/rp_<A/B/C/D>_data
106+
Date: March 2024
107+
KernelVersion: 6.8
108+
109+
Description: (RW) Selects up to 4 Ring Pairs (RP) to monitor, one per file,
110+
and report telemetry counters related to each.
111+
112+
Allowed values to write:
113+
========================
114+
* 0 to ``<num_rps - 1>``:
115+
Ring pair to be monitored. The value of ``num_rps`` can be
116+
retrieved through ``/sys/bus/pci/devices/<BDF>/qat/num_rps``.
117+
See Documentation/ABI/testing/sysfs-driver-qat.
118+
119+
Reads report metrics about performance and utilization of
120+
the selected RP:
121+
122+
======================= ========================================
123+
Field Description
124+
======================= ========================================
125+
sample_cnt number of acquisitions of telemetry data
126+
from the device. Reads are performed
127+
every 1000 ms
128+
rp_num RP number associated with slot <A/B/C/D>
129+
service_type service associated to the RP
130+
pci_trans_cnt number of PCIe partial transactions
131+
gp_lat_acc_avg average get to put latency [ns]
132+
bw_in PCIe, write bandwidth [Mbps]
133+
bw_out PCIe, read bandwidth [Mbps]
134+
at_glob_devtlb_hit Message descriptor DevTLB hit rate
135+
at_glob_devtlb_miss Message descriptor DevTLB miss rate
136+
tl_at_payld_devtlb_hit Payload DevTLB hit rate
137+
tl_at_payld_devtlb_miss Payload DevTLB miss rate
138+
======================= ========================================
139+
140+
Example.
141+
142+
Writing the value '32' to the file ``rp_C_data`` starts the
143+
collection of telemetry metrics for ring pair 32::
144+
145+
echo 32 > /sys/kernel/debug/qat_4xxx_0000:6b:00.0/telemetry/rp_C_data
146+
147+
Once a ring pair is selected, statistics can be read accessing
148+
the file::
149+
150+
cat /sys/kernel/debug/qat_4xxx_0000:6b:00.0/telemetry/rp_C_data
151+
152+
If ``control`` is set to 1, only the current values of the
153+
counters are displayed::
154+
155+
<counter_name> <current>
156+
157+
If ``control`` is 2, 3 or 4, counters are displayed in the
158+
following format::
159+
160+
<counter_name> <current> <min> <max> <avg>
161+
162+
163+
On QAT GEN4 devices there are 64 RPs on a PF, so the allowed
164+
values are 0..63. This number is absolute to the device.
165+
If Virtual Functions (VF) are used, the ring pair number can
166+
be derived from the Bus, Device, Function of the VF:
167+
168+
============ ====== ====== ====== ======
169+
PCI BDF/VF RP0 RP1 RP2 RP3
170+
============ ====== ====== ====== ======
171+
0000:6b:0.1 RP 0 RP 1 RP 2 RP 3
172+
0000:6b:0.2 RP 4 RP 5 RP 6 RP 7
173+
0000:6b:0.3 RP 8 RP 9 RP 10 RP 11
174+
0000:6b:0.4 RP 12 RP 13 RP 14 RP 15
175+
0000:6b:0.5 RP 16 RP 17 RP 18 RP 19
176+
0000:6b:0.6 RP 20 RP 21 RP 22 RP 23
177+
0000:6b:0.7 RP 24 RP 25 RP 26 RP 27
178+
0000:6b:1.0 RP 28 RP 29 RP 30 RP 31
179+
0000:6b:1.1 RP 32 RP 33 RP 34 RP 35
180+
0000:6b:1.2 RP 36 RP 37 RP 38 RP 39
181+
0000:6b:1.3 RP 40 RP 41 RP 42 RP 43
182+
0000:6b:1.4 RP 44 RP 45 RP 46 RP 47
183+
0000:6b:1.5 RP 48 RP 49 RP 50 RP 51
184+
0000:6b:1.6 RP 52 RP 53 RP 54 RP 55
185+
0000:6b:1.7 RP 56 RP 57 RP 58 RP 59
186+
0000:6b:2.0 RP 60 RP 61 RP 62 RP 63
187+
============ ====== ====== ====== ======
188+
189+
The mapping is only valid for the BDFs of VFs on the host.
190+
191+
192+
The service provided on a ring-pair varies depending on the
193+
configuration. The configuration for a given device can be
194+
queried and set using ``cfg_services``.
195+
See Documentation/ABI/testing/sysfs-driver-qat for details.
196+
197+
The following table reports how ring pairs are mapped to VFs
198+
on the PF 0000:6b:0.0 configured for `sym;asym` or `asym;sym`:
199+
200+
=========== ============ =========== ============ ===========
201+
PCI BDF/VF RP0/service RP1/service RP2/service RP3/service
202+
=========== ============ =========== ============ ===========
203+
0000:6b:0.1 RP 0 asym RP 1 sym RP 2 asym RP 3 sym
204+
0000:6b:0.2 RP 4 asym RP 5 sym RP 6 asym RP 7 sym
205+
0000:6b:0.3 RP 8 asym RP 9 sym RP10 asym RP11 sym
206+
... ... ... ... ...
207+
=========== ============ =========== ============ ===========
208+
209+
All VFs follow the same pattern.
210+
211+
212+
The following table reports how ring pairs are mapped to VFs on
213+
the PF 0000:6b:0.0 configured for `dc`:
214+
215+
=========== ============ =========== ============ ===========
216+
PCI BDF/VF RP0/service RP1/service RP2/service RP3/service
217+
=========== ============ =========== ============ ===========
218+
0000:6b:0.1 RP 0 dc RP 1 dc RP 2 dc RP 3 dc
219+
0000:6b:0.2 RP 4 dc RP 5 dc RP 6 dc RP 7 dc
220+
0000:6b:0.3 RP 8 dc RP 9 dc RP10 dc RP11 dc
221+
... ... ... ... ...
222+
=========== ============ =========== ============ ===========
223+
224+
The mapping of a RP to a service can be retrieved using
225+
``rp2srv`` from sysfs.
226+
See Documentation/ABI/testing/sysfs-driver-qat for details.
227+
228+
This attribute is only available for qat_4xxx devices.

Documentation/ABI/testing/debugfs-hisi-hpre

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ What: /sys/kernel/debug/hisi_hpre/<bdf>/qm/status
101101
Date: Apr 2020
102102
103103
Description: Dump the status of the QM.
104-
Four states: initiated, started, stopped and closed.
104+
Two states: work, stop.
105105
Available for both PF and VF, and take no other effect on HPRE.
106106

107107
What: /sys/kernel/debug/hisi_hpre/<bdf>/qm/diff_regs

Documentation/ABI/testing/debugfs-hisi-sec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ What: /sys/kernel/debug/hisi_sec2/<bdf>/qm/status
8181
Date: Apr 2020
8282
8383
Description: Dump the status of the QM.
84-
Four states: initiated, started, stopped and closed.
84+
Two states: work, stop.
8585
Available for both PF and VF, and take no other effect on SEC.
8686

8787
What: /sys/kernel/debug/hisi_sec2/<bdf>/qm/diff_regs

Documentation/ABI/testing/debugfs-hisi-zip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ What: /sys/kernel/debug/hisi_zip/<bdf>/qm/status
9494
Date: Apr 2020
9595
9696
Description: Dump the status of the QM.
97-
Four states: initiated, started, stopped and closed.
97+
Two states: work, stop.
9898
Available for both PF and VF, and take no other effect on ZIP.
9999

100100
What: /sys/kernel/debug/hisi_zip/<bdf>/qm/diff_regs
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
3+
Hardware Device Driver Specific Documentation
4+
---------------------------------------------
5+
6+
.. toctree::
7+
:maxdepth: 1
8+
9+
octeontx2
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
3+
=========================
4+
octeontx2 devlink support
5+
=========================
6+
7+
This document describes the devlink features implemented by the ``octeontx2 CPT``
8+
device drivers.
9+
10+
Parameters
11+
==========
12+
13+
The ``octeontx2`` driver implements the following driver-specific parameters.
14+
15+
.. list-table:: Driver-specific parameters implemented
16+
:widths: 5 5 5 85
17+
18+
* - Name
19+
- Type
20+
- Mode
21+
- Description
22+
* - ``t106_mode``
23+
- u8
24+
- runtime
25+
- Used to configure CN10KA B0/CN10KB CPT to work as CN10KA A0/A1.

Documentation/crypto/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,4 @@ for cryptographic use cases, as well as programming examples.
2828
api
2929
api-samples
3030
descore-readme
31+
device_drivers/index
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/crypto/inside-secure,safexcel.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Inside Secure SafeXcel cryptographic engine
8+
9+
maintainers:
10+
- Antoine Tenart <[email protected]>
11+
12+
properties:
13+
compatible:
14+
oneOf:
15+
- const: inside-secure,safexcel-eip197b
16+
- const: inside-secure,safexcel-eip197d
17+
- const: inside-secure,safexcel-eip97ies
18+
- const: inside-secure,safexcel-eip197
19+
description: Equivalent of inside-secure,safexcel-eip197b
20+
deprecated: true
21+
- const: inside-secure,safexcel-eip97
22+
description: Equivalent of inside-secure,safexcel-eip97ies
23+
deprecated: true
24+
25+
reg:
26+
maxItems: 1
27+
28+
interrupts:
29+
maxItems: 6
30+
31+
interrupt-names:
32+
items:
33+
- const: ring0
34+
- const: ring1
35+
- const: ring2
36+
- const: ring3
37+
- const: eip
38+
- const: mem
39+
40+
clocks:
41+
minItems: 1
42+
maxItems: 2
43+
44+
clock-names:
45+
minItems: 1
46+
items:
47+
- const: core
48+
- const: reg
49+
50+
required:
51+
- reg
52+
- interrupts
53+
- interrupt-names
54+
55+
allOf:
56+
- if:
57+
properties:
58+
clocks:
59+
minItems: 2
60+
then:
61+
properties:
62+
clock-names:
63+
minItems: 2
64+
required:
65+
- clock-names
66+
67+
additionalProperties: false
68+
69+
examples:
70+
- |
71+
#include <dt-bindings/interrupt-controller/arm-gic.h>
72+
#include <dt-bindings/interrupt-controller/irq.h>
73+
74+
crypto@800000 {
75+
compatible = "inside-secure,safexcel-eip197b";
76+
reg = <0x800000 0x200000>;
77+
interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>,
78+
<GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>,
79+
<GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>,
80+
<GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
81+
<GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>,
82+
<GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
83+
interrupt-names = "ring0", "ring1", "ring2", "ring3", "eip", "mem";
84+
clocks = <&cpm_syscon0 1 26>;
85+
clock-names = "core";
86+
};

0 commit comments

Comments
 (0)