intr-remap: allow disabling source id checking
Subsystems (2)
PATCH 1/1 intr-remap: allow disabling source id checking
Allow users to disable source id checking. This is really a debugging aid for broken BIOS setups.
--- Documentation/kernel-parameters.txt | 7 +++++++ drivers/pci/intr_remapping.c | 20 ++++++++++++++++++++ 2 files changed, 27 insertions(+), 0 deletions(-)
Documentation/kernel-parameters.txt +7 -0
@@ -982,6 +982,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
@@ -1691,6 +1697,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]
drivers/pci/intr_remapping.c +20 -0
@@ -18,6 +18,8 @@ static int ir_ioapic_num;int intr_remapping_enabled;static int disable_intremap; +static int disable_sourceid_checking; +static __init int setup_nointremap (char *str) { disable_intremap =1 ;
@@ -25,6 +27,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;
@@ -440,6 +458,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;
Hi Chris,
How about get rid of the 'nointremap' option? Therefore keep only one option for interrupt remapping.
Regards,
Weidong
Quoted 82 lines · Chris Wright
Allow users to disable source id checking. This is really a debugging aid
for broken BIOS setups.Signed-off-by Chris Wright <[email protected]>--- Documentation/kernel-parameters.txt | 7 +++++++ drivers/pci/intr_remapping.c | 20 ++++++++++++++++++++ 2 files changed, 27 insertions(+), 0 deletions(-)(quoted diff) +0
-0
b/Documentation/kernel-parameters.txtindex 6fa7292..344256c 100644Documentation/kernel-parameters.txt +6
-0@@ -982,6 +982,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@@ -1691,6 +1697,7 @@ and is between 256 and 4096 characters. It isdefined in the file
Documentation/kernel-parameters.txt +1
-0nointremap [X86-64, Intel-IOMMU] Do not enable interrupt remapping. + [Deprecated - use intremap=off] nointroute [IA-64]drivers/pci/intr_remapping.c +20
-0@@ -18,6 +18,8 @@ static int ir_ioapic_num;int intr_remapping_enabled;static int disable_intremap; +static int disable_sourceid_checking; +static __init int setup_nointremap (char *str) { disable_intremap =1 ;@@ -25,6 +27,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;@@ -440,6 +458,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;
Quoted 3 lines · * Han, Weidong ([email protected]) wrote:
Hi Chris,
How about get rid of the 'nointremap' option? Therefore keep only one option for interrupt remapping.
I'd prefer that too. I kept it becauase it's user visible, and has shipped in 2.6.31.
thanks,
-chris
Han, Weidong
Acked-byQuoted 11 lines · Chris Wright
Quoted 4 lines · * Han, Weidong ([email protected]) wrote:
Hi Chris,
How about get rid of the 'nointremap' option? Therefore keep only one option for interrupt remapping.
I'd prefer that too. I kept it becauase it's user visible, and has shipped in 2.6.31.
thanks,
-chris
It's ok.
Regards,
Weidong