← Documents Documentation/ABI/testing/debugfs-hisi-hpre GitHub 원문 ↗

Linux 6.18.37 · ABI / testing

HiSilicon HPRE debugfs ABI

HiSilicon HPRE cluster·core와 Queue Manager register selection, read-clear, QoS, interrupts·errors·state·stop timeout, request DFX counters와 capability registers debugfs ABI를 설명합니다.

Source pathDocumentation/ABI/testing/debugfs-hisi-hpre
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

Cluster, controller, function QoS

debugfs-hisi-hpre:1-44

PF에서 cluster core와 controller function의 QM을 선택해 registers를 dump하고 read-clear를 제어하며 PF·VF function별 QoS fraction을 설정합니다.

QM queue selection, registers, interrupts, errors

debugfs-hisi-hpre:46-105

QM·queue registers와 read-clear를 제어하고 task completion invalid IRQ, async·abnormal events, queue allocation·mailbox errors와 work·stop status를 보고합니다.

QM register changes와 stop-queue timeout

debugfs-hisi-hpre:107-134

QM register value 변화, busy·idle state와 stop queue failure의 wait time 및 resulting status를 제공합니다.

HPRE register changes와 request counters

debugfs-hisi-hpre:136-186

HPRE register changes와 sent·received·busy·failed·invalid requests 및 processing threshold를 넘긴 timeout requests를 계수합니다.

QM·HPRE capability registers

debugfs-hisi-hpre:188-193

PF와 VF에서 QM·HPRE capability bit register 값을 dump해 device specification 조회와 fault locating을 지원합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 What: /sys/kernel/debug/hisi_hpre/<bdf>/cluster[0-3]/regs
2 Date: Sep 2019
3 Contact: linux-crypto@vger.kernel.org
4 Description: Dump debug registers from the HPRE cluster.
5 Only available for PF.
6
7 What: /sys/kernel/debug/hisi_hpre/<bdf>/cluster[0-3]/cluster_ctrl
8 Date: Sep 2019
9 Contact: linux-crypto@vger.kernel.org
10 Description: Write the HPRE core selection in the cluster into this file,
11 and then we can read the debug information of the core.
12 Only available for PF.
13
14 What: /sys/kernel/debug/hisi_hpre/<bdf>/rdclr_en
15 Date: Sep 2019
16 Contact: linux-crypto@vger.kernel.org
17 Description: HPRE cores debug registers read clear control. 1 means enable
18 register read clear, otherwise 0. Writing to this file has no
19 functional effect, only enable or disable counters clear after
20 reading of these registers.
21 Only available for PF.
22
23 What: /sys/kernel/debug/hisi_hpre/<bdf>/current_qm
24 Date: Sep 2019
25 Contact: linux-crypto@vger.kernel.org
26 Description: One HPRE controller has one PF and multiple VFs, each function
27 has a QM. Select the QM which below qm refers to.
28 Only available for PF.
29
30 What: /sys/kernel/debug/hisi_hpre/<bdf>/alg_qos
31 Date: Jun 2021
32 Contact: linux-crypto@vger.kernel.org
33 Description: The <bdf> is related the function for PF and VF.
34 HPRE driver supports to configure each function's QoS, the driver
35 supports to write <bdf> value to alg_qos in the host. Such as
36 "echo <bdf> value > alg_qos". The qos value is 1~1000, means
37 1/1000~1000/1000 of total QoS. The driver reading alg_qos to
38 get related QoS in the host and VM, Such as "cat alg_qos".
39
40 What: /sys/kernel/debug/hisi_hpre/<bdf>/regs
41 Date: Sep 2019
42 Contact: linux-crypto@vger.kernel.org
43 Description: Dump debug registers from the HPRE.
44 Only available for PF.
45
46 What: /sys/kernel/debug/hisi_hpre/<bdf>/qm/regs
47 Date: Sep 2019
48 Contact: linux-crypto@vger.kernel.org
49 Description: Dump debug registers from the QM.
50 Available for PF and VF in host. VF in guest currently only
51 has one debug register.
52
53 What: /sys/kernel/debug/hisi_hpre/<bdf>/qm/current_q
54 Date: Sep 2019
55 Contact: linux-crypto@vger.kernel.org
56 Description: One QM may contain multiple queues. Select specific queue to
57 show its debug registers in above regs.
58 Only available for PF.
59
60 What: /sys/kernel/debug/hisi_hpre/<bdf>/qm/clear_enable
61 Date: Sep 2019
62 Contact: linux-crypto@vger.kernel.org
63 Description: QM debug registers(regs) read clear control. 1 means enable
64 register read clear, otherwise 0.
65 Writing to this file has no functional effect, only enable or
66 disable counters clear after reading of these registers.
67 Only available for PF.
68
69 What: /sys/kernel/debug/hisi_hpre/<bdf>/qm/err_irq
70 Date: Apr 2020
71 Contact: linux-crypto@vger.kernel.org
72 Description: Dump the number of invalid interrupts for
73 QM task completion.
74 Available for both PF and VF, and take no other effect on HPRE.
75
76 What: /sys/kernel/debug/hisi_hpre/<bdf>/qm/aeq_irq
77 Date: Apr 2020
78 Contact: linux-crypto@vger.kernel.org
79 Description: Dump the number of QM async event queue interrupts.
80 Available for both PF and VF, and take no other effect on HPRE.
81
82 What: /sys/kernel/debug/hisi_hpre/<bdf>/qm/abnormal_irq
83 Date: Apr 2020
84 Contact: linux-crypto@vger.kernel.org
85 Description: Dump the number of interrupts for QM abnormal event.
86 Available for both PF and VF, and take no other effect on HPRE.
87
88 What: /sys/kernel/debug/hisi_hpre/<bdf>/qm/create_qp_err
89 Date: Apr 2020
90 Contact: linux-crypto@vger.kernel.org
91 Description: Dump the number of queue allocation errors.
92 Available for both PF and VF, and take no other effect on HPRE.
93
94 What: /sys/kernel/debug/hisi_hpre/<bdf>/qm/mb_err
95 Date: Apr 2020
96 Contact: linux-crypto@vger.kernel.org
97 Description: Dump the number of failed QM mailbox commands.
98 Available for both PF and VF, and take no other effect on HPRE.
99
100 What: /sys/kernel/debug/hisi_hpre/<bdf>/qm/status
101 Date: Apr 2020
102 Contact: linux-crypto@vger.kernel.org
103 Description: Dump the status of the QM.
104 Two states: work, stop.
105 Available for both PF and VF, and take no other effect on HPRE.
106
107 What: /sys/kernel/debug/hisi_hpre/<bdf>/qm/diff_regs
108 Date: Mar 2022
109 Contact: linux-crypto@vger.kernel.org
110 Description: QM debug registers(regs) read hardware register value. This
111 node is used to show the change of the qm register values. This
112 node can be help users to check the change of register values.
113
114 What: /sys/kernel/debug/hisi_hpre/<bdf>/qm/qm_state
115 Date: Jan 2024
116 Contact: linux-crypto@vger.kernel.org
117 Description: Dump the state of the device.
118 0: busy, 1: idle.
119 Only available for PF, and take no other effect on HPRE.
120
121 What: /sys/kernel/debug/hisi_hpre/<bdf>/qm/dev_timeout
122 Date: Feb 2024
123 Contact: linux-crypto@vger.kernel.org
124 Description: Set the wait time when stop queue fails. Available for both PF
125 and VF, and take no other effect on HPRE.
126 0: not wait(default), others value: wait dev_timeout * 20 microsecond.
127
128 What: /sys/kernel/debug/hisi_hpre/<bdf>/qm/dev_state
129 Date: Feb 2024
130 Contact: linux-crypto@vger.kernel.org
131 Description: Dump the stop queue status of the QM. The default value is 0,
132 if dev_timeout is set, when stop queue fails, the dev_state
133 will return non-zero value. Available for both PF and VF,
134 and take no other effect on HPRE.
135
136 What: /sys/kernel/debug/hisi_hpre/<bdf>/hpre_dfx/diff_regs
137 Date: Mar 2022
138 Contact: linux-crypto@vger.kernel.org
139 Description: HPRE debug registers(regs) read hardware register value. This
140 node is used to show the change of the register values. This
141 node can be help users to check the change of register values.
142
143 What: /sys/kernel/debug/hisi_hpre/<bdf>/hpre_dfx/send_cnt
144 Date: Apr 2020
145 Contact: linux-crypto@vger.kernel.org
146 Description: Dump the total number of sent requests.
147 Available for both PF and VF, and take no other effect on HPRE.
148
149 What: /sys/kernel/debug/hisi_hpre/<bdf>/hpre_dfx/recv_cnt
150 Date: Apr 2020
151 Contact: linux-crypto@vger.kernel.org
152 Description: Dump the total number of received requests.
153 Available for both PF and VF, and take no other effect on HPRE.
154
155 What: /sys/kernel/debug/hisi_hpre/<bdf>/hpre_dfx/send_busy_cnt
156 Date: Apr 2020
157 Contact: linux-crypto@vger.kernel.org
158 Description: Dump the total number of requests sent
159 with returning busy.
160 Available for both PF and VF, and take no other effect on HPRE.
161
162 What: /sys/kernel/debug/hisi_hpre/<bdf>/hpre_dfx/send_fail_cnt
163 Date: Apr 2020
164 Contact: linux-crypto@vger.kernel.org
165 Description: Dump the total number of completed but error requests.
166 Available for both PF and VF, and take no other effect on HPRE.
167
168 What: /sys/kernel/debug/hisi_hpre/<bdf>/hpre_dfx/invalid_req_cnt
169 Date: Apr 2020
170 Contact: linux-crypto@vger.kernel.org
171 Description: Dump the total number of invalid requests being received.
172 Available for both PF and VF, and take no other effect on HPRE.
173
174 What: /sys/kernel/debug/hisi_hpre/<bdf>/hpre_dfx/overtime_thrhld
175 Date: Apr 2020
176 Contact: linux-crypto@vger.kernel.org
177 Description: Set the threshold time for counting the request which is
178 processed longer than the threshold.
179 0: disable(default), 1: 1 microsecond.
180 Available for both PF and VF, and take no other effect on HPRE.
181
182 What: /sys/kernel/debug/hisi_hpre/<bdf>/hpre_dfx/over_thrhld_cnt
183 Date: Apr 2020
184 Contact: linux-crypto@vger.kernel.org
185 Description: Dump the total number of time out requests.
186 Available for both PF and VF, and take no other effect on HPRE.
187
188 What: /sys/kernel/debug/hisi_hpre/<bdf>/cap_regs
189 Date: Oct 2024
190 Contact: linux-crypto@vger.kernel.org
191 Description: Dump the values of the qm and hpre capability bit registers and
192 support the query of device specifications to facilitate fault locating.
193 Available for both PF and VF, and take no other effect on HPRE.
194

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

HPRE cluster, controller, function QoS

1-44

이 구간의 모든 항목 담당자는 linux-crypto@vger.kernel.org입니다.

WhatDate설명범위
/sys/kernel/debug/hisi_hpre/<bdf>/cluster[0-3]/regs2019년 9월HPRE cluster의 debug registers를 dump합니다.PF only
/sys/kernel/debug/hisi_hpre/<bdf>/cluster[0-3]/cluster_ctrl2019년 9월Cluster에서 HPRE core selection을 쓰고 선택한 core의 debug information을 읽습니다.PF only
/sys/kernel/debug/hisi_hpre/<bdf>/rdclr_en2019년 9월HPRE core debug register read-clear control입니다. 1이면 register read-clear enable, 0이면 disable입니다. 기능 동작에는 영향을 주지 않고 register를 읽은 뒤 counter를 지울지만 제어합니다.PF only
/sys/kernel/debug/hisi_hpre/<bdf>/current_qm2019년 9월HPRE controller 하나에는 PF 하나와 여러 VFs가 있고 각 function은 QM을 가집니다. 아래 qm nodes가 참조할 QM을 선택합니다.PF only
/sys/kernel/debug/hisi_hpre/<bdf>/alg_qos2021년 6월PF 또는 VF function을 나타내는 <bdf>의 QoS를 구성합니다. 값 1..1000은 total QoS의 1/1000..1000/1000을 뜻합니다. Host와 VM에서 읽어 관련 QoS를 확인할 수 있습니다.PF and VF function
/sys/kernel/debug/hisi_hpre/<bdf>/regs2019년 9월HPRE debug registers를 dump합니다.PF only
echo <bdf> value > alg_qos
cat alg_qos
HPRE selector가 register dump 대상을 고르는 방식
cluster_ctrlSelect HPRE corecluster[0-3]/regs
current_qmSelect function QMqm subtree
qm/current_qSelect queueqm/regs

Cluster selector는 core를, current_qm은 function별 QM을, current_q는 QM 내부 queue를 선택한 뒤 관련 regs node가 해당 대상을 dump한다.

QM registers, queue selector, read-clear

46-67
WhatDate설명범위
/sys/kernel/debug/hisi_hpre/<bdf>/qm/regs2019년 9월QM debug registers를 dump합니다.Host의 PF와 VF. Guest VF는 현재 debug register 하나만 제공
/sys/kernel/debug/hisi_hpre/<bdf>/qm/current_q2019년 9월QM에 여러 queues가 있을 때 위 regs에 표시할 특정 queue를 선택합니다.PF only
/sys/kernel/debug/hisi_hpre/<bdf>/qm/clear_enable2019년 9월QM debug registers(regs)의 read-clear control입니다. 1이면 enable, 0이면 disable입니다. 기능 동작에는 영향을 주지 않고 registers를 읽은 뒤 counters를 지울지만 제어합니다.PF only

세 항목의 담당자는 linux-crypto@vger.kernel.org입니다.

QM IRQ·error counters와 status

69-105

아래 항목은 PF와 VF 모두에서 사용할 수 있고 HPRE 동작에 다른 영향을 주지 않습니다. 담당자는 linux-crypto@vger.kernel.org입니다.

WhatDate설명
/sys/kernel/debug/hisi_hpre/<bdf>/qm/err_irq2020년 4월QM task completion의 invalid interrupt 수를 dump합니다.
/sys/kernel/debug/hisi_hpre/<bdf>/qm/aeq_irq2020년 4월QM async event queue interrupt 수를 dump합니다.
/sys/kernel/debug/hisi_hpre/<bdf>/qm/abnormal_irq2020년 4월QM abnormal event interrupt 수를 dump합니다.
/sys/kernel/debug/hisi_hpre/<bdf>/qm/create_qp_err2020년 4월Queue allocation error 수를 dump합니다.
/sys/kernel/debug/hisi_hpre/<bdf>/qm/mb_err2020년 4월실패한 QM mailbox command 수를 dump합니다.
/sys/kernel/debug/hisi_hpre/<bdf>/qm/status2020년 4월QM status를 dump합니다. 가능한 state는 work와 stop입니다.

QM register changes, state, stop timeout

107-134
WhatDate설명범위
/sys/kernel/debug/hisi_hpre/<bdf>/qm/diff_regs2022년 3월QM debug registers의 hardware register values를 읽어 QM register 값의 변화를 표시하고 확인하도록 돕습니다.문서에 PF/VF 제한 미기재
/sys/kernel/debug/hisi_hpre/<bdf>/qm/qm_state2024년 1월Device state를 dump합니다. 0은 busy, 1은 idle입니다. HPRE 동작에 다른 영향을 주지 않습니다.PF only
/sys/kernel/debug/hisi_hpre/<bdf>/qm/dev_timeout2024년 2월Stop queue가 실패했을 때 기다릴 시간을 설정합니다. 0은 기다리지 않는 기본값이고, 그 밖의 값은 dev_timeout × 20 microseconds만큼 기다립니다. HPRE 동작에 다른 영향을 주지 않습니다.PF and VF
/sys/kernel/debug/hisi_hpre/<bdf>/qm/dev_state2024년 2월QM stop-queue status를 dump합니다. 기본값은 0입니다. dev_timeout이 설정된 상태에서 stop queue가 실패하면 non-zero를 반환합니다. HPRE 동작에 다른 영향을 주지 않습니다.PF and VF

네 항목의 담당자는 linux-crypto@vger.kernel.org입니다.

Stop queue failure wait와 dev_state
Stop queue requestSuccessdev_state = 0
Stop queue failuredev_timeout = 0No wait
Stop queue failuredev_timeout > 0Wait dev_timeout × 20 µsStill faileddev_state ≠ 0

dev_timeout이 0이면 기다리지 않고, non-zero이면 20 µs 단위로 대기한다. Stop queue가 끝내 실패하면 dev_state가 non-zero가 된다.

HPRE DFX registers와 request counters

136-186

아래 모든 항목의 담당자는 linux-crypto@vger.kernel.org입니다.

WhatDate설명범위
/sys/kernel/debug/hisi_hpre/<bdf>/hpre_dfx/diff_regs2022년 3월HPRE debug registers의 hardware register values를 읽어 register 값의 변화를 표시하고 확인하도록 돕습니다.문서에 PF/VF 제한 미기재
/sys/kernel/debug/hisi_hpre/<bdf>/hpre_dfx/send_cnt2020년 4월보낸 request 총수를 dump합니다.PF and VF
/sys/kernel/debug/hisi_hpre/<bdf>/hpre_dfx/recv_cnt2020년 4월받은 request 총수를 dump합니다.PF and VF
/sys/kernel/debug/hisi_hpre/<bdf>/hpre_dfx/send_busy_cnt2020년 4월전송했지만 busy를 반환한 request 총수를 dump합니다.PF and VF
/sys/kernel/debug/hisi_hpre/<bdf>/hpre_dfx/send_fail_cnt2020년 4월완료되었지만 error인 request 총수를 dump합니다.PF and VF
/sys/kernel/debug/hisi_hpre/<bdf>/hpre_dfx/invalid_req_cnt2020년 4월수신한 invalid request 총수를 dump합니다.PF and VF
/sys/kernel/debug/hisi_hpre/<bdf>/hpre_dfx/overtime_thrhld2020년 4월처리 시간이 threshold보다 긴 request를 셀 threshold time을 설정합니다. 0은 disable인 기본값, 1은 1 microsecond입니다.PF and VF
/sys/kernel/debug/hisi_hpre/<bdf>/hpre_dfx/over_thrhld_cnt2020년 4월Timeout request 총수를 dump합니다.PF and VF

PF·VF 공통 counters는 HPRE 동작에 다른 영향을 주지 않습니다.

HPRE request DFX counter 분류
Request sentsend_cntReceived completionrecv_cnt
Request sentBusy returnedsend_busy_cnt
Request completed with errorsend_fail_cnt
Invalid request receivedinvalid_req_cnt
Processing > overtime_thrhldover_thrhld_cnt

Request lifecycle의 전송·수신과 busy·error·invalid·threshold 초과 결과를 각 counter가 나누어 기록한다.

QM·HPRE capability bit registers

188-193
항목내용
What/sys/kernel/debug/hisi_hpre/<bdf>/cap_regs
Date2024년 10월
Contactlinux-crypto@vger.kernel.org
DescriptionQM과 HPRE capability bit register 값을 dump하고 device specification 조회를 지원해 fault locating을 쉽게 합니다.
범위PF와 VF 모두에서 사용 가능하며 HPRE 동작에 다른 영향을 주지 않음