]> www.infradead.org Git - users/dwmw2/linux.git/commit
iommufd: Generalize iopt_pages address
authorSteve Sistare <steven.sistare@oracle.com>
Fri, 25 Oct 2024 13:11:53 +0000 (06:11 -0700)
committerJason Gunthorpe <jgg@nvidia.com>
Mon, 28 Oct 2024 16:24:23 +0000 (13:24 -0300)
commit99ff06dcca20b0d88b21278ebc563ce1bfbbd5b0
treefacb8d0ca727195f1755d2816e311705f097352d
parent32383c085c1c7e2e4d9e1a3b31eb1ff17b0a5a85
iommufd: Generalize iopt_pages address

The starting address in iopt_pages is currently a __user *uptr.
Generalize to allow other types of addresses.  Refactor iopt_alloc_pages()
and iopt_map_user_pages() into address-type specific and common functions.

Link: https://patch.msgid.link/r/1729861919-234514-4-git-send-email-steven.sistare@oracle.com
Suggested-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Steve Sistare <steven.sistare@oracle.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: Jason Gunthorpe <jgg@nvidia.com>
drivers/iommu/iommufd/io_pagetable.c
drivers/iommu/iommufd/io_pagetable.h
drivers/iommu/iommufd/pages.c