Commit 20858d4
iommu: Introduce iommu_paging_domain_alloc_flags()
Currently drivers calls iommu_paging_domain_alloc(dev) to get an
UNMANAGED domain. This is not sufficient to support PASID with
UNMANAGED domain as some HW like AMD requires certain page table type
to support PASIDs.
Also the domain_alloc_paging op only passes device as param for domain
allocation. This is not sufficient for AMD driver to decide the right
page table.
Instead of extending ops->domain_alloc_paging() it was decided to
enhance ops->domain_alloc_user() so that caller can pass various
additional flags.
Hence add iommu_paging_domain_alloc_flags() API which takes flags as
parameter. Caller can pass additional parameter to indicate type of
domain required, etc. iommu_paging_domain_alloc_flags() internally calls
appropriate callback function to allocate a domain.
Signed-off-by: Jason Gunthorpe <[email protected]>
[Added description - Vasant]
Signed-off-by: Vasant Hegde <[email protected]>
Reviewed-by: Jason Gunthorpe <[email protected]>
Reviewed-by: Lu Baolu <[email protected]>
Reviewed-by: Yi Liu <[email protected]>
Reviewed-by: Kevin Tian <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Joerg Roedel <[email protected]>1 parent 541b967 commit 20858d4
2 files changed
+38
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1962 | 1962 | | |
1963 | 1963 | | |
1964 | 1964 | | |
1965 | | - | |
| 1965 | + | |
1966 | 1966 | | |
| 1967 | + | |
1967 | 1968 | | |
1968 | 1969 | | |
1969 | | - | |
| 1970 | + | |
1970 | 1971 | | |
1971 | | - | |
| 1972 | + | |
| 1973 | + | |
1972 | 1974 | | |
| 1975 | + | |
| 1976 | + | |
| 1977 | + | |
1973 | 1978 | | |
1974 | 1979 | | |
1975 | 1980 | | |
1976 | | - | |
| 1981 | + | |
| 1982 | + | |
| 1983 | + | |
| 1984 | + | |
| 1985 | + | |
| 1986 | + | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
| 1991 | + | |
| 1992 | + | |
| 1993 | + | |
| 1994 | + | |
| 1995 | + | |
| 1996 | + | |
| 1997 | + | |
| 1998 | + | |
1977 | 1999 | | |
1978 | | - | |
| 2000 | + | |
1979 | 2001 | | |
1980 | 2002 | | |
1981 | 2003 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
511 | 511 | | |
512 | 512 | | |
513 | 513 | | |
514 | | - | |
515 | | - | |
516 | 514 | | |
517 | 515 | | |
518 | 516 | | |
| |||
787 | 785 | | |
788 | 786 | | |
789 | 787 | | |
790 | | - | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
791 | 793 | | |
792 | 794 | | |
793 | 795 | | |
| |||
1078 | 1080 | | |
1079 | 1081 | | |
1080 | 1082 | | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
1081 | 1089 | | |
1082 | 1090 | | |
1083 | 1091 | | |
| |||
0 commit comments