Commit f27298a
committed
iommu/arm-smmu-v3: Allow ATS for IOMMU_DOMAIN_NESTED
The EATS flag needs to flow through the vSTE and into the pSTE, and ensure
physical ATS is enabled on the PCI device.
The physical ATS state must match the VM's idea of EATS as we rely on the
VM to issue the ATS invalidation commands. Thus ATS must remain off at the
device until EATS on a nesting domain turns it on. Attaching a nesting
domain is the point where the invalidation responsibility transfers to
userspace.
Update the ATS logic to track EATS for nesting domains and flush the
ATC whenever the S2 nesting parent changes.
Link: https://patch.msgid.link/r/11-v4-9e99b76f3518+3a8-smmuv3_nesting_jgg@nvidia.com
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Tested-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>1 parent 67e4fe3 commit f27298a
4 files changed
Lines changed: 53 additions & 10 deletions
File tree
- drivers/iommu/arm/arm-smmu-v3
- include/uapi/linux
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
99 | | - | |
100 | 98 | | |
101 | 99 | | |
102 | 100 | | |
| |||
107 | 105 | | |
108 | 106 | | |
109 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
110 | 117 | | |
111 | 118 | | |
112 | 119 | | |
| |||
131 | 138 | | |
132 | 139 | | |
133 | 140 | | |
134 | | - | |
| 141 | + | |
| 142 | + | |
135 | 143 | | |
| 144 | + | |
136 | 145 | | |
137 | 146 | | |
138 | 147 | | |
| |||
149 | 158 | | |
150 | 159 | | |
151 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
152 | 173 | | |
153 | 174 | | |
154 | 175 | | |
| |||
160 | 181 | | |
161 | 182 | | |
162 | 183 | | |
| 184 | + | |
163 | 185 | | |
164 | 186 | | |
165 | 187 | | |
| |||
175 | 197 | | |
176 | 198 | | |
177 | 199 | | |
178 | | - | |
| 200 | + | |
179 | 201 | | |
180 | 202 | | |
181 | 203 | | |
| |||
185 | 207 | | |
186 | 208 | | |
187 | 209 | | |
| 210 | + | |
188 | 211 | | |
189 | 212 | | |
190 | 213 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2107 | 2107 | | |
2108 | 2108 | | |
2109 | 2109 | | |
2110 | | - | |
| 2110 | + | |
| 2111 | + | |
| 2112 | + | |
| 2113 | + | |
| 2114 | + | |
| 2115 | + | |
| 2116 | + | |
| 2117 | + | |
| 2118 | + | |
| 2119 | + | |
2111 | 2120 | | |
2112 | 2121 | | |
2113 | 2122 | | |
| |||
2631 | 2640 | | |
2632 | 2641 | | |
2633 | 2642 | | |
2634 | | - | |
| 2643 | + | |
2635 | 2644 | | |
2636 | 2645 | | |
2637 | 2646 | | |
| |||
2640 | 2649 | | |
2641 | 2650 | | |
2642 | 2651 | | |
2643 | | - | |
| 2652 | + | |
| 2653 | + | |
2644 | 2654 | | |
2645 | 2655 | | |
2646 | 2656 | | |
| |||
2671 | 2681 | | |
2672 | 2682 | | |
2673 | 2683 | | |
| 2684 | + | |
2674 | 2685 | | |
2675 | 2686 | | |
2676 | 2687 | | |
2677 | 2688 | | |
2678 | 2689 | | |
| 2690 | + | |
| 2691 | + | |
| 2692 | + | |
2679 | 2693 | | |
2680 | | - | |
| 2694 | + | |
| 2695 | + | |
2681 | 2696 | | |
2682 | 2697 | | |
2683 | 2698 | | |
| |||
2744 | 2759 | | |
2745 | 2760 | | |
2746 | 2761 | | |
| 2762 | + | |
| 2763 | + | |
| 2764 | + | |
2747 | 2765 | | |
2748 | 2766 | | |
2749 | 2767 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
308 | | - | |
| 308 | + | |
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
| |||
837 | 837 | | |
838 | 838 | | |
839 | 839 | | |
| 840 | + | |
840 | 841 | | |
841 | 842 | | |
842 | 843 | | |
| |||
878 | 879 | | |
879 | 880 | | |
880 | 881 | | |
| 882 | + | |
881 | 883 | | |
882 | 884 | | |
883 | 885 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
429 | 429 | | |
430 | 430 | | |
431 | 431 | | |
432 | | - | |
| 432 | + | |
433 | 433 | | |
434 | 434 | | |
435 | 435 | | |
| |||
0 commit comments