Commit 204b394
vfio/ccw: Move FSM open/close to MDEV open/close
Part of the confusion that has existed is the FSM lifecycle of
subchannels between the common CSS driver and the vfio-ccw driver.
During configuration, the FSM state goes from NOT_OPER to STANDBY
to IDLE, but then back to NOT_OPER. For example:
vfio_ccw_sch_probe: VFIO_CCW_STATE_NOT_OPER
vfio_ccw_sch_probe: VFIO_CCW_STATE_STANDBY
vfio_ccw_mdev_probe: VFIO_CCW_STATE_IDLE
vfio_ccw_mdev_remove: VFIO_CCW_STATE_NOT_OPER
vfio_ccw_sch_remove: VFIO_CCW_STATE_NOT_OPER
vfio_ccw_sch_shutdown: VFIO_CCW_STATE_NOT_OPER
Rearrange the open/close events to align with the mdev open/close,
to better manage the memory and state of the devices as time
progresses. Specifically, make mdev_open() perform the FSM open,
and mdev_close() perform the FSM close instead of reset (which is
both close and open).
This makes the NOT_OPER state a dead-end path, indicating the
device is probably not recoverable without fully probing and
re-configuring the device.
This has the nice side-effect of removing a number of special-cases
where the FSM state is managed outside of the FSM itself (such as
the aforementioned mdev_close() routine).
Suggested-by: Jason Gunthorpe <[email protected]>
Signed-off-by: Eric Farman <[email protected]>
Reviewed-by: Jason Gunthorpe <[email protected]>
Reviewed-by: Matthew Rosato <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alex Williamson <[email protected]>1 parent bfec266 commit 204b394
File tree
3 files changed
+39
-32
lines changed- drivers/s390/cio
3 files changed
+39
-32
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
| 141 | + | |
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | 225 | | |
230 | 226 | | |
231 | | - | |
| 227 | + | |
232 | 228 | | |
233 | 229 | | |
234 | 230 | | |
235 | 231 | | |
236 | 232 | | |
237 | 233 | | |
238 | | - | |
239 | | - | |
240 | 234 | | |
241 | 235 | | |
242 | 236 | | |
| |||
264 | 258 | | |
265 | 259 | | |
266 | 260 | | |
| 261 | + | |
267 | 262 | | |
268 | 263 | | |
269 | 264 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
178 | 181 | | |
179 | 182 | | |
180 | 183 | | |
| |||
379 | 382 | | |
380 | 383 | | |
381 | 384 | | |
382 | | - | |
383 | | - | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
384 | 389 | | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
385 | 395 | | |
386 | 396 | | |
387 | 397 | | |
| |||
393 | 403 | | |
394 | 404 | | |
395 | 405 | | |
396 | | - | |
| 406 | + | |
397 | 407 | | |
398 | 408 | | |
399 | 409 | | |
400 | 410 | | |
| 411 | + | |
| 412 | + | |
401 | 413 | | |
402 | | - | |
403 | | - | |
| 414 | + | |
404 | 415 | | |
405 | 416 | | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
406 | 422 | | |
407 | 423 | | |
408 | 424 | | |
| |||
414 | 430 | | |
415 | 431 | | |
416 | 432 | | |
417 | | - | |
| 433 | + | |
418 | 434 | | |
419 | 435 | | |
420 | 436 | | |
421 | 437 | | |
422 | 438 | | |
423 | 439 | | |
424 | | - | |
425 | | - | |
426 | | - | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
427 | 443 | | |
428 | 444 | | |
429 | 445 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | 27 | | |
31 | 28 | | |
32 | 29 | | |
33 | 30 | | |
34 | 31 | | |
35 | 32 | | |
36 | | - | |
37 | | - | |
38 | 33 | | |
39 | 34 | | |
40 | 35 | | |
| |||
121 | 116 | | |
122 | 117 | | |
123 | 118 | | |
124 | | - | |
125 | | - | |
126 | 119 | | |
127 | 120 | | |
128 | 121 | | |
| |||
137 | 130 | | |
138 | 131 | | |
139 | 132 | | |
140 | | - | |
141 | 133 | | |
142 | 134 | | |
143 | 135 | | |
| |||
165 | 157 | | |
166 | 158 | | |
167 | 159 | | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
168 | 164 | | |
169 | 165 | | |
170 | 166 | | |
| |||
184 | 180 | | |
185 | 181 | | |
186 | 182 | | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
187 | 189 | | |
188 | 190 | | |
189 | 191 | | |
| |||
197 | 199 | | |
198 | 200 | | |
199 | 201 | | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
| 202 | + | |
207 | 203 | | |
208 | 204 | | |
209 | 205 | | |
| |||
0 commit comments