iommu/vt-d: Allocate pasid table in device probe path
authorLu Baolu <baolu.lu@linux.intel.com>
Tue, 22 Nov 2022 00:29:43 +0000 (08:29 +0800)
committerJoerg Roedel <jroedel@suse.de>
Tue, 22 Nov 2022 13:05:20 +0000 (14:05 +0100)
commitec62b4424174f41bdcedd08d12d7bed80088453d
tree1e41d9623ba2f817333684db36b00c059071ea5d
parenteb7081409f94a9a8608593d0fb63a1aa3d6f95d8
iommu/vt-d: Allocate pasid table in device probe path

Whether or not a domain is attached to the device, the pasid table should
always be valid as long as it has been probed. This moves the pasid table
allocation from the domain attaching device path to device probe path and
frees it in the device release path.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Link: https://lore.kernel.org/r/20221118132451.114406-2-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel/iommu.c