generation of IOMMUs only supported DMA remapping, and Interrupt Remapping
appeared in the second generation.
+ This option is only valid on x86.
+
* The `intpost` boolean controls the Posted Interrupt sub-feature. In
combination with APIC acceleration (VT-x APICV, SVM AVIC), the IOMMU can
be configured to deliver interrupts from assigned PCI devices directly
bool_t __read_mostly iommu_igfx = 1;
bool_t __read_mostly iommu_snoop = 1;
bool_t __read_mostly iommu_qinval = 1;
-enum iommu_intremap __read_mostly iommu_intremap = iommu_intremap_full;
bool_t __read_mostly iommu_crash_disable;
static bool __hwdom_initdata iommu_hwdom_none;
iommu_snoop = val;
else if ( (val = parse_boolean("qinval", s, ss)) >= 0 )
iommu_qinval = val;
+#ifndef iommu_intremap
else if ( (val = parse_boolean("intremap", s, ss)) >= 0 )
iommu_intremap = val ? iommu_intremap_full : iommu_intremap_off;
+#endif
else if ( (val = parse_boolean("intpost", s, ss)) >= 0 )
iommu_intpost = val;
#ifdef CONFIG_KEXEC
rc = iommu_hardware_setup();
iommu_enabled = (rc == 0);
}
+
+#ifndef iommu_intremap
if ( !iommu_enabled )
iommu_intremap = iommu_intremap_off;
+#endif
if ( (force_iommu && !iommu_enabled) ||
(force_intremap && !iommu_intremap) )
printk(" - Dom0 mode: %s\n",
iommu_hwdom_passthrough ? "Passthrough" :
iommu_hwdom_strict ? "Strict" : "Relaxed");
+#ifndef iommu_intremap
printk("Interrupt remapping %sabled\n", iommu_intremap ? "en" : "dis");
+#endif
tasklet_init(&iommu_pt_cleanup_tasklet, iommu_free_pagetables, NULL);
}
if ( iommu_enabled )
iommu_get_ops()->crash_shutdown();
iommu_enabled = iommu_intpost = 0;
+#ifndef iommu_intremap
iommu_intremap = iommu_intremap_off;
+#endif
}
int iommu_get_reserved_device_memory(iommu_grdm_t *func, void *ctxt)
extern bool_t iommu_enable, iommu_enabled;
extern bool force_iommu, iommu_quarantine, iommu_verbose, iommu_igfx;
extern bool_t iommu_snoop, iommu_qinval, iommu_intpost;
+
+#ifdef CONFIG_X86
extern enum __packed iommu_intremap {
/*
* In order to allow traditional boolean uses of the iommu_intremap
* variable, the "off" value has to come first (yielding a value of zero).
*/
iommu_intremap_off,
-#ifdef CONFIG_X86
/*
* Interrupt remapping enabled, but only able to generate interrupts
* with an 8-bit APIC ID.
*/
iommu_intremap_restricted,
-#endif
iommu_intremap_full,
} iommu_intremap;
+#else
+# define iommu_intremap false
+#endif
#if defined(CONFIG_IOMMU_FORCE_PT_SHARE)
#define iommu_hap_pt_share true