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>
This commit is contained in:
Tomasz Bursztyka 2021-04-06 14:36:44 +02:00 committed by Anas Nashif
commit 1ae95546c8
2 changed files with 7 additions and 1 deletions

View file

@ -22,6 +22,11 @@ config INTEL_VTD_ICTL_XAPIC_PASSTHROUGH
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

View file

@ -363,7 +363,8 @@ static int vtd_ictl_remap(const struct device *dev,
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;
}