Commit 25fc417f authored by Jason Gunthorpe's avatar Jason Gunthorpe

iommufd: Convert to msi_device_has_isolated_msi()

Trivially use the new API.

Link: https://lore.kernel.org/r/4-v3-3313bb5dd3a3+10f11-secure_msi_jgg@nvidia.comTested-by: default avatarMatthew Rosato <mjrosato@linux.ibm.com>
Reviewed-by: default avatarKevin Tian <kevin.tian@intel.com>
Reviewed-by: default avatarLu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
parent 6b1a7a00
......@@ -4,7 +4,6 @@
#include <linux/iommufd.h>
#include <linux/slab.h>
#include <linux/iommu.h>
#include <linux/irqdomain.h>
#include "io_pagetable.h"
#include "iommufd_private.h"
......@@ -169,8 +168,7 @@ static int iommufd_device_setup_msi(struct iommufd_device *idev,
* operation from the device (eg a simple DMA) cannot trigger an
* interrupt outside this iommufd context.
*/
if (!device_iommu_capable(idev->dev, IOMMU_CAP_INTR_REMAP) &&
!irq_domain_check_msi_remap()) {
if (!iommu_group_has_isolated_msi(idev->group)) {
if (!allow_unsafe_interrupts)
return -EPERM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment