Commit e1ea9d3
iommu: Store either domain or handle in group->pasid_array
iommu_attach_device_pasid() only stores handle to group->pasid_array
when there is a valid handle input. However, it makes the
iommu_attach_device_pasid() unable to detect if the pasid has been
attached or not previously.
To be complete, let the iommu_attach_device_pasid() store the domain
to group->pasid_array if no valid handle. The other users of the
group->pasid_array should be updated to be consistent. e.g. the
iommu_attach_group_handle() and iommu_replace_group_handle().
Link: https://patch.msgid.link/r/20250226011849.5102-4-yi.l.liu@intel.com
Suggested-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Yi Liu <yi.l.liu@intel.com>
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>1 parent 473ec07 commit e1ea9d3
1 file changed
Lines changed: 31 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
48 | 51 | | |
49 | 52 | | |
50 | 53 | | |
| |||
2147 | 2150 | | |
2148 | 2151 | | |
2149 | 2152 | | |
| 2153 | + | |
| 2154 | + | |
| 2155 | + | |
| 2156 | + | |
| 2157 | + | |
| 2158 | + | |
| 2159 | + | |
| 2160 | + | |
| 2161 | + | |
| 2162 | + | |
| 2163 | + | |
2150 | 2164 | | |
2151 | 2165 | | |
2152 | 2166 | | |
| |||
3348 | 3362 | | |
3349 | 3363 | | |
3350 | 3364 | | |
| 3365 | + | |
3351 | 3366 | | |
3352 | 3367 | | |
3353 | 3368 | | |
| |||
3371 | 3386 | | |
3372 | 3387 | | |
3373 | 3388 | | |
3374 | | - | |
3375 | | - | |
| 3389 | + | |
3376 | 3390 | | |
3377 | | - | |
| 3391 | + | |
3378 | 3392 | | |
3379 | 3393 | | |
3380 | 3394 | | |
| |||
3454 | 3468 | | |
3455 | 3469 | | |
3456 | 3470 | | |
| 3471 | + | |
3457 | 3472 | | |
3458 | 3473 | | |
3459 | | - | |
3460 | | - | |
| 3474 | + | |
| 3475 | + | |
3461 | 3476 | | |
3462 | | - | |
3463 | | - | |
| 3477 | + | |
| 3478 | + | |
| 3479 | + | |
| 3480 | + | |
| 3481 | + | |
3464 | 3482 | | |
3465 | 3483 | | |
3466 | 3484 | | |
| |||
3483 | 3501 | | |
3484 | 3502 | | |
3485 | 3503 | | |
| 3504 | + | |
3486 | 3505 | | |
3487 | 3506 | | |
3488 | 3507 | | |
3489 | 3508 | | |
3490 | 3509 | | |
3491 | 3510 | | |
3492 | | - | |
3493 | | - | |
| 3511 | + | |
| 3512 | + | |
3494 | 3513 | | |
3495 | 3514 | | |
3496 | 3515 | | |
| |||
3543 | 3562 | | |
3544 | 3563 | | |
3545 | 3564 | | |
3546 | | - | |
| 3565 | + | |
3547 | 3566 | | |
3548 | 3567 | | |
3549 | 3568 | | |
3550 | 3569 | | |
3551 | 3570 | | |
3552 | 3571 | | |
3553 | | - | |
| 3572 | + | |
3554 | 3573 | | |
3555 | 3574 | | |
3556 | 3575 | | |
| |||
3559 | 3578 | | |
3560 | 3579 | | |
3561 | 3580 | | |
3562 | | - | |
| 3581 | + | |
3563 | 3582 | | |
3564 | 3583 | | |
3565 | 3584 | | |
| |||
0 commit comments