* [patch] intr-remap: allow disabling source id checking
@ 2010-07-20 18:06 Suresh Siddha
0 siblings, 0 replies; 5+ messages in thread
From: Suresh Siddha @ 2010-07-20 18:06 UTC (permalink / raw)
To: dwmw2, Barnes, Jesse, LKML; +Cc: Chris Wright, Han, Weidong
From: Chris Wright <chrisw@redhat.com>
Subject: 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>
---
Documentation/kernel-parameters.txt | 7 +++++++
drivers/pci/intr_remapping.c | 20 ++++++++++++++++++++
2 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 6a84a19..8c3522e 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
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]
diff --git a/drivers/pci/intr_remapping.c b/drivers/pci/intr_remapping.c
index 1315ac6..45478ef 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;
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;
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] intr-remap: allow disabling source id checking
2009-10-24 15:38 ` Chris Wright
@ 2009-10-25 8:59 ` Han, Weidong
0 siblings, 0 replies; 5+ messages in thread
From: Han, Weidong @ 2009-10-25 8:59 UTC (permalink / raw)
To: 'Chris Wright'
Cc: Siddha, Suresh B, 'iommu@lists.linux-foundation.org',
'David Woodhouse', 'linux-kernel@vger.kernel.org'
Chris Wright wrote:
> * Han, Weidong (weidong.han@intel.com) 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.
Acked-by: Weidong Han <weidong.han@intel.com>
Regards,
Weidong
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] intr-remap: allow disabling source id checking
2009-10-24 11:01 ` Han, Weidong
@ 2009-10-24 15:38 ` Chris Wright
2009-10-25 8:59 ` Han, Weidong
0 siblings, 1 reply; 5+ messages in thread
From: Chris Wright @ 2009-10-24 15:38 UTC (permalink / raw)
To: Han, Weidong
Cc: 'Chris Wright',
Siddha, Suresh B, 'iommu@lists.linux-foundation.org',
'David Woodhouse', 'linux-kernel@vger.kernel.org'
* Han, Weidong (weidong.han@intel.com) 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] intr-remap: allow disabling source id checking
2009-10-24 1:26 [PATCH] " Chris Wright
@ 2009-10-24 11:01 ` Han, Weidong
2009-10-24 15:38 ` Chris Wright
0 siblings, 1 reply; 5+ messages in thread
From: Han, Weidong @ 2009-10-24 11:01 UTC (permalink / raw)
To: 'Chris Wright'
Cc: Siddha, Suresh B, 'iommu@lists.linux-foundation.org',
'David Woodhouse', 'linux-kernel@vger.kernel.org'
Hi Chris,
How about get rid of the 'nointremap' option? Therefore keep only one option for interrupt remapping.
Regards,
Weidong
Chris Wright wrote:
> Allow users to disable source id checking. This is really a
> debugging aid
> for broken BIOS setups.
>
> Signed-off-by: Chris Wright <chrisw@sous-sol.org>
> ---
> Documentation/kernel-parameters.txt | 7 +++++++
> drivers/pci/intr_remapping.c | 20 ++++++++++++++++++++
> 2 files changed, 27 insertions(+), 0 deletions(-)
>
> diff --git a/Documentation/kernel-parameters.txt
> b/Documentation/kernel-parameters.txt index 6fa7292..344256c 100644
> --- a/Documentation/kernel-parameters.txt
> +++ b/Documentation/kernel-parameters.txt
> @@ -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]
>
> diff --git a/drivers/pci/intr_remapping.c
> b/drivers/pci/intr_remapping.c
> index 0ed78a7..136bb6e 100644
> --- a/drivers/pci/intr_remapping.c
> +++ b/drivers/pci/intr_remapping.c
> @@ -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;
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] intr-remap: allow disabling source id checking
@ 2009-10-24 1:26 Chris Wright
2009-10-24 11:01 ` Han, Weidong
0 siblings, 1 reply; 5+ messages in thread
From: Chris Wright @ 2009-10-24 1:26 UTC (permalink / raw)
To: Weidong Han; +Cc: Suresh Siddha, iommu, David Woodhouse, linux-kernel
Allow users to disable source id checking. This is really a debugging aid
for broken BIOS setups.
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
Documentation/kernel-parameters.txt | 7 +++++++
drivers/pci/intr_remapping.c | 20 ++++++++++++++++++++
2 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 6fa7292..344256c 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -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]
diff --git a/drivers/pci/intr_remapping.c b/drivers/pci/intr_remapping.c
index 0ed78a7..136bb6e 100644
--- a/drivers/pci/intr_remapping.c
+++ b/drivers/pci/intr_remapping.c
@@ -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;
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-07-20 18:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-20 18:06 [patch] intr-remap: allow disabling source id checking Suresh Siddha
-- strict thread matches above, loose matches on Subject: below --
2009-10-24 1:26 [PATCH] " Chris Wright
2009-10-24 11:01 ` Han, Weidong
2009-10-24 15:38 ` Chris Wright
2009-10-25 8:59 ` Han, Weidong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome