@@ -130,4 +130,6 @@ extern bool vfio_noiommu __read_mostly;
enum { vfio_noiommu = false };
#endif
+extern bool vfio_allow_unsafe_interrupts;
+
#endif
@@ -44,9 +44,8 @@
#define DRIVER_AUTHOR "Alex Williamson <alex.williamson@redhat.com>"
#define DRIVER_DESC "Type1 IOMMU driver for VFIO"
-static bool allow_unsafe_interrupts;
module_param_named(allow_unsafe_interrupts,
- allow_unsafe_interrupts, bool, S_IRUGO | S_IWUSR);
+ vfio_allow_unsafe_interrupts, bool, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(allow_unsafe_interrupts,
"Enable VFIO IOMMU support for on platforms without interrupt remapping support.");
@@ -2282,7 +2281,7 @@ static int vfio_iommu_type1_attach_group(void *iommu_data,
iommu_group_for_each_dev(iommu_group, (void *)IOMMU_CAP_INTR_REMAP,
vfio_iommu_device_capable);
- if (!allow_unsafe_interrupts && !msi_remap) {
+ if (!vfio_allow_unsafe_interrupts && !msi_remap) {
pr_warn("%s: No interrupt remapping support. Use the module param \"allow_unsafe_interrupts\" to enable VFIO IOMMU support on this platform\n",
__func__);
ret = -EPERM;
@@ -51,6 +51,9 @@ static struct vfio {
struct ida device_ida;
} vfio;
+bool vfio_allow_unsafe_interrupts;
+EXPORT_SYMBOL_GPL(vfio_allow_unsafe_interrupts);
+
static DEFINE_XARRAY(vfio_device_set_xa);
static const struct file_operations vfio_group_fops;