Commit 5e9f822
iommu: Swap the order of setting group->pasid_array and calling attach op of iommu drivers
The current implementation stores entry to the group->pasid_array before
the underlying iommu driver has successfully set the new domain. This can
lead to issues where PRIs are received on the new domain before the attach
operation is completed.
This patch swaps the order of operations to ensure that the domain is set
in the underlying iommu driver before updating the group->pasid_array.
Link: https://patch.msgid.link/r/20250226011849.5102-5-yi.l.liu@intel.com
Suggested-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Yi Liu <yi.l.liu@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>1 parent e1ea9d3 commit 5e9f822
1 file changed
Lines changed: 36 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3388 | 3388 | | |
3389 | 3389 | | |
3390 | 3390 | | |
3391 | | - | |
| 3391 | + | |
| 3392 | + | |
| 3393 | + | |
| 3394 | + | |
| 3395 | + | |
3392 | 3396 | | |
3393 | 3397 | | |
3394 | 3398 | | |
3395 | 3399 | | |
3396 | | - | |
3397 | | - | |
| 3400 | + | |
| 3401 | + | |
| 3402 | + | |
| 3403 | + | |
| 3404 | + | |
| 3405 | + | |
| 3406 | + | |
| 3407 | + | |
| 3408 | + | |
| 3409 | + | |
| 3410 | + | |
| 3411 | + | |
| 3412 | + | |
| 3413 | + | |
3398 | 3414 | | |
3399 | 3415 | | |
3400 | 3416 | | |
| |||
3509 | 3525 | | |
3510 | 3526 | | |
3511 | 3527 | | |
3512 | | - | |
| 3528 | + | |
| 3529 | + | |
3513 | 3530 | | |
3514 | | - | |
| 3531 | + | |
3515 | 3532 | | |
3516 | 3533 | | |
3517 | | - | |
3518 | | - | |
3519 | | - | |
| 3534 | + | |
| 3535 | + | |
| 3536 | + | |
| 3537 | + | |
3520 | 3538 | | |
3521 | | - | |
3522 | | - | |
3523 | | - | |
3524 | | - | |
| 3539 | + | |
| 3540 | + | |
| 3541 | + | |
| 3542 | + | |
| 3543 | + | |
| 3544 | + | |
| 3545 | + | |
| 3546 | + | |
| 3547 | + | |
| 3548 | + | |
3525 | 3549 | | |
3526 | 3550 | | |
3527 | 3551 | | |
| |||
0 commit comments