iommu/vt-d: Use common helper to lookup svm devices
authorLu Baolu <baolu.lu@linux.intel.com>
Thu, 10 Jun 2021 02:01:00 +0000 (10:01 +0800)
committerJoerg Roedel <jroedel@suse.de>
Thu, 10 Jun 2021 07:06:13 +0000 (09:06 +0200)
commit9e52cc0fedb0fd6187a2bd01b859ea8150b588c2
tree37b33f5e62fd1ffef37d1756a412e411707fb308
parent40483774141625b9685b177fb6e1f36de48d33f8
iommu/vt-d: Use common helper to lookup svm devices

It's common to iterate the svm device list and find a matched device. Add
common helpers to do this and consolidate the code.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/20210520031531.712333-1-baolu.lu@linux.intel.com
Link: https://lore.kernel.org/r/20210610020115.1637656-9-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel/svm.c