Commit 5f64ce5
iommu/vt-d: Duplicate iommu_resv_region objects per device list
intel_iommu_get_resv_regions() aims to return the list of
reserved regions accessible by a given @device. However several
devices can access the same reserved memory region and when
building the list it is not safe to use a single iommu_resv_region
object, whose container is the RMRR. This iommu_resv_region must
be duplicated per device reserved region list.
Let's remove the struct iommu_resv_region from the RMRR unit
and allocate the iommu_resv_region directly in
intel_iommu_get_resv_regions(). We hold the dmar_global_lock instead
of the rcu-lock to allow sleeping.
Fixes: 0659b8d ("iommu/vt-d: Implement reserved region get/put callbacks")
Signed-off-by: Eric Auger <[email protected]>
Reviewed-by: Lu Baolu <[email protected]>
Signed-off-by: Joerg Roedel <[email protected]>1 parent ad0834d commit 5f64ce5
1 file changed
+17
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
327 | | - | |
328 | 327 | | |
329 | 328 | | |
330 | 329 | | |
| |||
4050 | 4049 | | |
4051 | 4050 | | |
4052 | 4051 | | |
4053 | | - | |
4054 | 4052 | | |
4055 | 4053 | | |
4056 | 4054 | | |
| |||
4064 | 4062 | | |
4065 | 4063 | | |
4066 | 4064 | | |
4067 | | - | |
4068 | | - | |
4069 | | - | |
4070 | | - | |
4071 | 4065 | | |
4072 | 4066 | | |
4073 | 4067 | | |
4074 | 4068 | | |
4075 | 4069 | | |
4076 | | - | |
| 4070 | + | |
4077 | 4071 | | |
4078 | 4072 | | |
4079 | 4073 | | |
4080 | 4074 | | |
4081 | | - | |
4082 | | - | |
4083 | 4075 | | |
4084 | 4076 | | |
4085 | 4077 | | |
| |||
4297 | 4289 | | |
4298 | 4290 | | |
4299 | 4291 | | |
4300 | | - | |
4301 | 4292 | | |
4302 | 4293 | | |
4303 | 4294 | | |
| |||
5400 | 5391 | | |
5401 | 5392 | | |
5402 | 5393 | | |
| 5394 | + | |
5403 | 5395 | | |
5404 | 5396 | | |
5405 | 5397 | | |
5406 | 5398 | | |
5407 | 5399 | | |
5408 | | - | |
| 5400 | + | |
5409 | 5401 | | |
5410 | 5402 | | |
5411 | 5403 | | |
| 5404 | + | |
| 5405 | + | |
| 5406 | + | |
5412 | 5407 | | |
5413 | 5408 | | |
5414 | 5409 | | |
5415 | | - | |
| 5410 | + | |
| 5411 | + | |
| 5412 | + | |
| 5413 | + | |
| 5414 | + | |
| 5415 | + | |
| 5416 | + | |
| 5417 | + | |
5416 | 5418 | | |
5417 | 5419 | | |
5418 | | - | |
| 5420 | + | |
5419 | 5421 | | |
5420 | 5422 | | |
5421 | 5423 | | |
| |||
5443 | 5445 | | |
5444 | 5446 | | |
5445 | 5447 | | |
5446 | | - | |
5447 | | - | |
5448 | | - | |
5449 | | - | |
| 5448 | + | |
| 5449 | + | |
5450 | 5450 | | |
5451 | 5451 | | |
5452 | 5452 | | |
| |||
0 commit comments