drivers/interrupt_controller: Add a VT-D option to disable src id check
Theoretically, source id check is not mandatory in the context we use
VT-D here (i.e. non VM one, just multi-vector MSI support)
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
diff --git a/drivers/interrupt_controller/Kconfig.intel_vtd b/drivers/interrupt_controller/Kconfig.intel_vtd
index 124b8f4..3565942 100644
--- a/drivers/interrupt_controller/Kconfig.intel_vtd
+++ b/drivers/interrupt_controller/Kconfig.intel_vtd
@@ -22,6 +22,11 @@
help
If XAPIC mode is enabled, it will avoid remapping all interrupts.
+config INTEL_VTD_ICTL_NO_SRC_ID_CHECK
+ bool "Never check the source id"
+ help
+ Disable the source id check in IRTE.
+
config INTEL_VTD_ICTL_INIT_PRIORITY
int "Initialization priority"
default 40
diff --git a/drivers/interrupt_controller/intc_intel_vtd.c b/drivers/interrupt_controller/intc_intel_vtd.c
index 772251d..9048146 100644
--- a/drivers/interrupt_controller/intc_intel_vtd.c
+++ b/drivers/interrupt_controller/intc_intel_vtd.c
@@ -363,7 +363,8 @@
irte.bits.dst_id = 0xFF << 8;
}
- if (src_id != USHRT_MAX) {
+ if (src_id != USHRT_MAX &&
+ !IS_ENABLED(CONFIG_INTEL_VTD_ICTL_NO_SRC_ID_CHECK)) {
irte.bits.src_validation_type = 1;
irte.bits.src_id = src_id;
}