Commit ce2cd17
iommu/amd: Enhance amd_iommu_domain_alloc_user()
Previous patch enhanced core layer to check device PASID capability and
pass right flags to ops->domain_alloc_user().
Enhance amd_iommu_domain_alloc_user() to allocate domain with
appropriate page table based on flags parameter.
- If flags is empty then allocate domain with default page table type.
This will eventually replace ops->domain_alloc().
For UNMANAGED domain, core will call this interface with flags=0. So
AMD driver will continue to allocate V1 page table.
- If IOMMU_HWPT_ALLOC_PASID flags is passed then allocate domain with v2
page table.
Signed-off-by: Vasant Hegde <vasant.hegde@amd.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20241028093810.5901-10-vasant.hegde@amd.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>1 parent a005ef6 commit ce2cd17
1 file changed
+27
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2346 | 2346 | | |
2347 | 2347 | | |
2348 | 2348 | | |
2349 | | - | |
2350 | | - | |
2351 | | - | |
2352 | 2349 | | |
2353 | 2350 | | |
2354 | 2351 | | |
| |||
2403 | 2400 | | |
2404 | 2401 | | |
2405 | 2402 | | |
| 2403 | + | |
| 2404 | + | |
| 2405 | + | |
| 2406 | + | |
| 2407 | + | |
| 2408 | + | |
| 2409 | + | |
| 2410 | + | |
| 2411 | + | |
| 2412 | + | |
| 2413 | + | |
| 2414 | + | |
| 2415 | + | |
| 2416 | + | |
| 2417 | + | |
| 2418 | + | |
| 2419 | + | |
| 2420 | + | |
| 2421 | + | |
| 2422 | + | |
| 2423 | + | |
| 2424 | + | |
| 2425 | + | |
| 2426 | + | |
2406 | 2427 | | |
2407 | | - | |
2408 | 2428 | | |
| 2429 | + | |
2409 | 2430 | | |
2410 | | - | |
| 2431 | + | |
| 2432 | + | |
2411 | 2433 | | |
2412 | 2434 | | |
2413 | 2435 | | |
| |||
0 commit comments