diff options
author | Jacob Pan <jacob.jun.pan@linux.intel.com> | 2024-04-23 10:41:13 -0700 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2024-04-30 00:54:43 +0200 |
commit | be9be07b22c96dc03d0ecc76b5a5f21c2dcb05a1 (patch) | |
tree | c200afbc2ceee56b34291b813b8f174bd25cd661 /drivers/iommu | |
parent | ce0a92871179f8ca58ae8e3cf50e726a163bf831 (diff) |
iommu/vt-d: Make posted MSI an opt-in command line option
Add a command line opt-in option for posted MSI if CONFIG_X86_POSTED_MSI=y.
Also introduce a helper function for testing if posted MSI is supported on
the platform.
Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20240423174114.526704-12-jacob.jun.pan@linux.intel.com
Diffstat (limited to 'drivers/iommu')
-rw-r--r-- | drivers/iommu/irq_remapping.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/iommu/irq_remapping.c b/drivers/iommu/irq_remapping.c index ee59647c2050..056fec6991bc 100644 --- a/drivers/iommu/irq_remapping.c +++ b/drivers/iommu/irq_remapping.c @@ -24,6 +24,8 @@ int no_x2apic_optout; int disable_irq_post = 0; +bool enable_posted_msi __ro_after_init; + static int disable_irq_remap; static struct irq_remap_ops *remap_ops; @@ -70,7 +72,8 @@ static __init int setup_irqremap(char *str) no_x2apic_optout = 1; else if (!strncmp(str, "nopost", 6)) disable_irq_post = 1; - + else if (IS_ENABLED(CONFIG_X86_POSTED_MSI) && !strncmp(str, "posted_msi", 10)) + enable_posted_msi = true; str += strcspn(str, ","); while (*str == ',') str++; |