]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
intr-remap: allow disabling source id checking
authorChris Wright <chrisw@redhat.com>
Tue, 20 Jul 2010 18:06:49 +0000 (11:06 -0700)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Tue, 10 Aug 2010 00:37:09 +0000 (01:37 +0100)
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>
Documentation/kernel-parameters.txt
drivers/pci/intr_remapping.c

index 2b2407d9a6d025a8451605b104a35daa7da59b47..0afdd284d656e05661fea05d347a57dc11a69f9d 100644 (file)
@@ -1028,6 +1028,12 @@ and is between 256 and 4096 characters. It is defined in the file
                        result in a hardware IOTLB flush operation as opposed
                        to batching them for performance.
 
+       intremap=       [X86-64, Intel-IOMMU]
+                       Format: { on (default) | off | nosid }
+                       on      enable Interrupt Remapping (default)
+                       off     disable Interrupt Remapping
+                       nosid   disable Source ID checking
+
        inttest=        [IA64]
 
        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
 
        nointremap      [X86-64, Intel-IOMMU] Do not enable interrupt
                        remapping.
+                       [Deprecated - use intremap=off]
 
        nointroute      [IA-64]
 
index 1315ac688aa267d9aa504f4d2874b9aa930b4bc8..45478ef7dd74dd2b74a9682e4bfb82d367f69379 100644 (file)
@@ -21,6 +21,8 @@ static int ir_ioapic_num, ir_hpet_num;
 int intr_remapping_enabled;
 
 static int disable_intremap;
+static int disable_sourceid_checking;
+
 static __init int setup_nointremap(char *str)
 {
        disable_intremap = 1;
@@ -28,6 +30,22 @@ static __init int setup_nointremap(char *str)
 }
 early_param("nointremap", setup_nointremap);
 
+static __init int setup_intremap(char *str)
+{
+       if (!str)
+               return -EINVAL;
+
+       if (!strncmp(str, "on", 2))
+               disable_intremap = 0;
+       else if (!strncmp(str, "off", 3))
+               disable_intremap = 1;
+       else if (!strncmp(str, "nosid", 5))
+               disable_sourceid_checking = 1;
+
+       return 0;
+}
+early_param("intremap", setup_intremap);
+
 struct irq_2_iommu {
        struct intel_iommu *iommu;
        u16 irte_index;
@@ -453,6 +471,8 @@ int free_irte(int irq)
 static void set_irte_sid(struct irte *irte, unsigned int svt,
                         unsigned int sq, unsigned int sid)
 {
+       if (disable_sourceid_checking)
+               svt = SVT_NO_VERIFY;
        irte->svt = svt;
        irte->sq = sq;
        irte->sid = sid;