aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Wright <chrisw@redhat.com>2010-07-20 14:06:49 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2010-08-09 20:37:09 -0400
commitd1423d5679875ebbbc2fc63b33d465baceee0430 (patch)
tree45bf7904476291c15775345969f9cf99f026071f
parent9fe6206f400646a2322096b56c59891d530e8d51 (diff)
intr-remap: allow disabling source id checking
Allow disabling the source id checking while programming the interrupt remap table entry. Useful for debugging or working around the broken source id checks on some platforms. Signed-off-by: Chris Wright <chrisw@redhat.com> Acked-by: Suresh Siddha <suresh.b.siddha@intel.com> Acked-by: Weidong Han <weidong.han@intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
-rw-r--r--Documentation/kernel-parameters.txt7
-rw-r--r--drivers/pci/intr_remapping.c20
2 files changed, 27 insertions, 0 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 2b2407d9a6d..0afdd284d65 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1028,6 +1028,12 @@ and is between 256 and 4096 characters. It is defined in the file
1028 result in a hardware IOTLB flush operation as opposed 1028 result in a hardware IOTLB flush operation as opposed
1029 to batching them for performance. 1029 to batching them for performance.
1030 1030
1031 intremap= [X86-64, Intel-IOMMU]
1032 Format: { on (default) | off | nosid }
1033 on enable Interrupt Remapping (default)
1034 off disable Interrupt Remapping
1035 nosid disable Source ID checking
1036
1031 inttest= [IA64] 1037 inttest= [IA64]
1032 1038
1033 iomem= Disable strict checking of access to MMIO memory 1039 iomem= Disable strict checking of access to MMIO memory
@@ -1755,6 +1761,7 @@ and is between 256 and 4096 characters. It is defined in the file
1755 1761
1756 nointremap [X86-64, Intel-IOMMU] Do not enable interrupt 1762 nointremap [X86-64, Intel-IOMMU] Do not enable interrupt
1757 remapping. 1763 remapping.
1764 [Deprecated - use intremap=off]
1758 1765
1759 nointroute [IA-64] 1766 nointroute [IA-64]
1760 1767
diff --git a/drivers/pci/intr_remapping.c b/drivers/pci/intr_remapping.c
index 1315ac688aa..45478ef7dd7 100644
--- a/drivers/pci/intr_remapping.c
+++ b/drivers/pci/intr_remapping.c
@@ -21,6 +21,8 @@ static int ir_ioapic_num, ir_hpet_num;
21int intr_remapping_enabled; 21int intr_remapping_enabled;
22 22
23static int disable_intremap; 23static int disable_intremap;
24static int disable_sourceid_checking;
25
24static __init int setup_nointremap(char *str) 26static __init int setup_nointremap(char *str)
25{ 27{
26 disable_intremap = 1; 28 disable_intremap = 1;
@@ -28,6 +30,22 @@ static __init int setup_nointremap(char *str)
28} 30}
29early_param("nointremap", setup_nointremap); 31early_param("nointremap", setup_nointremap);
30 32
33static __init int setup_intremap(char *str)
34{
35 if (!str)
36 return -EINVAL;
37
38 if (!strncmp(str, "on", 2))
39 disable_intremap = 0;
40 else if (!strncmp(str, "off", 3))
41 disable_intremap = 1;
42 else if (!strncmp(str, "nosid", 5))
43 disable_sourceid_checking = 1;
44
45 return 0;
46}
47early_param("intremap", setup_intremap);
48
31struct irq_2_iommu { 49struct irq_2_iommu {
32 struct intel_iommu *iommu; 50 struct intel_iommu *iommu;
33 u16 irte_index; 51 u16 irte_index;
@@ -453,6 +471,8 @@ int free_irte(int irq)
453static void set_irte_sid(struct irte *irte, unsigned int svt, 471static void set_irte_sid(struct irte *irte, unsigned int svt,
454 unsigned int sq, unsigned int sid) 472 unsigned int sq, unsigned int sid)
455{ 473{
474 if (disable_sourceid_checking)
475 svt = SVT_NO_VERIFY;
456 irte->svt = svt; 476 irte->svt = svt;
457 irte->sq = sq; 477 irte->sq = sq;
458 irte->sid = sid; 478 irte->sid = sid;