Commit 72b6f7c
iommu/virtio: Make instance lookup robust
Much like arm-smmu in commit 7d83513 ("iommu/arm-smmu: Make
instance lookup robust"), virtio-iommu appears to have the same issue
where iommu_device_register() makes the IOMMU instance visible to other
API callers (including itself) straight away, but internally the
instance isn't ready to recognise itself for viommu_probe_device() to
work correctly until after viommu_probe() has returned. This matters a
lot more now that bus_iommu_probe() has the DT/VIOT knowledge to probe
client devices the way that was always intended. Tweak the lookup and
initialisation in much the same way as for arm-smmu, to ensure that what
we register is functional and ready to go.
Cc: stable@vger.kernel.org
Fixes: bcb81ac ("iommu: Get DT/ACPI parsing into the proper probe path")
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Tested-by: Eric Auger <eric.auger@redhat.com>
Link: https://lore.kernel.org/r/308911aaa1f5be32a3a709996c7bd6cf71d30f33.1755190036.git.robin.murphy@arm.com
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>1 parent 685ca57 commit 72b6f7c
1 file changed
Lines changed: 9 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
998 | 998 | | |
999 | 999 | | |
1000 | 1000 | | |
1001 | | - | |
1002 | | - | |
| 1001 | + | |
1003 | 1002 | | |
1004 | 1003 | | |
1005 | 1004 | | |
| |||
1008 | 1007 | | |
1009 | 1008 | | |
1010 | 1009 | | |
1011 | | - | |
1012 | | - | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
1013 | 1013 | | |
1014 | 1014 | | |
1015 | 1015 | | |
| |||
1160 | 1160 | | |
1161 | 1161 | | |
1162 | 1162 | | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
1163 | 1166 | | |
1164 | 1167 | | |
1165 | 1168 | | |
| |||
1229 | 1232 | | |
1230 | 1233 | | |
1231 | 1234 | | |
1232 | | - | |
1233 | | - | |
1234 | 1235 | | |
1235 | 1236 | | |
| 1237 | + | |
| 1238 | + | |
1236 | 1239 | | |
1237 | 1240 | | |
1238 | 1241 | | |
| |||
0 commit comments