Commit c7be17c
iommu/vt-d: Add device_block_translation() helper
If domain attaching to device fails, the IOMMU driver should bring the
device to blocking DMA state. The upper layer is expected to recover it
by attaching a new domain. Use device_block_translation() in the error
path of dev_attach to make the behavior specific.
The difference between device_block_translation() and the previous
dmar_remove_one_dev_info() is that, in the scalable mode, it is the
RID2PASID entry instead of context entry being cleared. As a result,
enabling PCI capabilities is moved up.
Signed-off-by: Lu Baolu <[email protected]>
Reviewed-by: Kevin Tian <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Joerg Roedel <[email protected]>1 parent ec62b44 commit c7be17c
1 file changed
+38
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
280 | | - | |
| 280 | + | |
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
| |||
1400 | 1400 | | |
1401 | 1401 | | |
1402 | 1402 | | |
1403 | | - | |
| 1403 | + | |
1404 | 1404 | | |
1405 | 1405 | | |
1406 | 1406 | | |
| |||
2045 | 2045 | | |
2046 | 2046 | | |
2047 | 2047 | | |
2048 | | - | |
2049 | 2048 | | |
2050 | 2049 | | |
2051 | 2050 | | |
| |||
2487 | 2486 | | |
2488 | 2487 | | |
2489 | 2488 | | |
2490 | | - | |
| 2489 | + | |
2491 | 2490 | | |
2492 | 2491 | | |
2493 | 2492 | | |
2494 | 2493 | | |
2495 | 2494 | | |
2496 | 2495 | | |
2497 | 2496 | | |
2498 | | - | |
| 2497 | + | |
2499 | 2498 | | |
2500 | 2499 | | |
2501 | 2500 | | |
| 2501 | + | |
| 2502 | + | |
2502 | 2503 | | |
2503 | 2504 | | |
2504 | 2505 | | |
| |||
4109 | 4110 | | |
4110 | 4111 | | |
4111 | 4112 | | |
| 4113 | + | |
| 4114 | + | |
| 4115 | + | |
| 4116 | + | |
| 4117 | + | |
| 4118 | + | |
| 4119 | + | |
| 4120 | + | |
| 4121 | + | |
| 4122 | + | |
| 4123 | + | |
| 4124 | + | |
| 4125 | + | |
| 4126 | + | |
| 4127 | + | |
| 4128 | + | |
| 4129 | + | |
| 4130 | + | |
| 4131 | + | |
| 4132 | + | |
| 4133 | + | |
| 4134 | + | |
| 4135 | + | |
| 4136 | + | |
| 4137 | + | |
| 4138 | + | |
| 4139 | + | |
| 4140 | + | |
| 4141 | + | |
| 4142 | + | |
| 4143 | + | |
4112 | 4144 | | |
4113 | 4145 | | |
4114 | 4146 | | |
| |||
4232 | 4264 | | |
4233 | 4265 | | |
4234 | 4266 | | |
4235 | | - | |
| 4267 | + | |
4236 | 4268 | | |
4237 | 4269 | | |
4238 | 4270 | | |
| |||
0 commit comments