All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iommu/vt-d: Expand interrupt remapping quirk to cover x58 chipset
@ 2013-07-09 19:11 Neil Horman
  2013-07-10 17:31 ` Don Dutile
  2013-07-17 11:13 ` Neil Horman
  0 siblings, 2 replies; 7+ messages in thread
From: Neil Horman @ 2013-07-09 19:11 UTC (permalink / raw)
  To: linux-kernel
  Cc: Neil Horman, Jan Beulich, Joerg Roedel, Andrew Cooper,
	Malcolm Crossley, Prarit Bhargava, Don Zickus, Don Dutile,
	Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	maintainer:X86 ARCHITECTURE...,
	stable

Recently we added an early quirk to detect 5500/5520 chipsets with early
revisions that had problems with irq draining with interrupt remapping enabled:

commit 03bbcb2e7e292838bb0244f5a7816d194c911d62
Author: Neil Horman <nhorman@tuxdriver.com>
Date:   Tue Apr 16 16:38:32 2013 -0400

    iommu/vt-d: add quirk for broken interrupt remapping on 55XX chipsets

It turns out this same problem is present in the intel X58 chipset as well.  See
errata 69 here:
http://www.intel.com/content/www/us/en/chipsets/x58-express-specification-update.html

This patch extends the pci early quirk so that the chip devices/revisions
specified in the above update are also covered in the same way:

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
CC: Jan Beulich <jbeulich@suse.com>
CC: Joerg Roedel <joro@8bytes.org>
CC: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Malcolm Crossley <malcolm.crossley@citrix.com>
CC: Prarit Bhargava <prarit@redhat.com>
CC: Don Zickus <dzickus@redhat.com>
CC: Don Dutile <ddutile@redhat.com>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Ingo Molnar <mingo@redhat.com>
CC: "H. Peter Anvin" <hpa@zytor.com>
CC: x86@kernel.org (maintainer:X86 ARCHITECTURE...)
CC: stable@vger.kernel.org
---
 arch/x86/kernel/early-quirks.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
index 94ab6b9..743d583 100644
--- a/arch/x86/kernel/early-quirks.c
+++ b/arch/x86/kernel/early-quirks.c
@@ -196,15 +196,23 @@ static void __init ati_bugs_contd(int num, int slot, int func)
 static void __init intel_remapping_check(int num, int slot, int func)
 {
 	u8 revision;
+	u16 device;
 
+	device = read_pci_config_16(num, slot, func, PCI_DEVICE_ID);
 	revision = read_pci_config_byte(num, slot, func, PCI_REVISION_ID);
 
 	/*
-	 * Revision 0x13 of this chipset supports irq remapping
-	 * but has an erratum that breaks its behavior, flag it as such
+ 	 * Revision 13 of all triggering devices id in this quirk have
+	 * a problem draining interrupts when irq remapping is enabled,
+	 * and should be flagged as broken.  Additionally revisions 0x12
+	 * and 0x22 of device id 0x3405 has this problem.
 	 */
 	if (revision == 0x13)
 		set_irq_remapping_broken();
+	else if ((device == 0x3405) &&
+	    ((revision == 0x12) ||
+	     (revision == 0x22))) 
+		set_irq_remapping_broken();
 
 }
 
@@ -239,8 +247,11 @@ static struct chipset early_qrk[] __initdata = {
 	  PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs_contd },
 	{ PCI_VENDOR_ID_INTEL, 0x3403, PCI_CLASS_BRIDGE_HOST,
 	  PCI_BASE_CLASS_BRIDGE, 0, intel_remapping_check },
+	{ PCI_VENDOR_ID_INTEL, 0x3405, PCI_CLASS_BRIDGE_HOST,
+	  PCI_BASE_CLASS_BRIDGE, 0, intel_remapping_check },
 	{ PCI_VENDOR_ID_INTEL, 0x3406, PCI_CLASS_BRIDGE_HOST,
 	  PCI_BASE_CLASS_BRIDGE, 0, intel_remapping_check },
+	
 	{}
 };
 
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] iommu/vt-d: Expand interrupt remapping quirk to cover x58 chipset
  2013-07-09 19:11 [PATCH] iommu/vt-d: Expand interrupt remapping quirk to cover x58 chipset Neil Horman
@ 2013-07-10 17:31 ` Don Dutile
  2013-07-11 10:59   ` Neil Horman
  2013-07-17 11:13 ` Neil Horman
  1 sibling, 1 reply; 7+ messages in thread
From: Don Dutile @ 2013-07-10 17:31 UTC (permalink / raw)
  To: Neil Horman
  Cc: linux-kernel, Jan Beulich, Joerg Roedel, Andrew Cooper,
	Malcolm Crossley, Prarit Bhargava, Don Zickus, Thomas Gleixner,
	Ingo Molnar, H. Peter Anvin, maintainer:X86 ARCHITECTURE...,
	stable

On 07/09/2013 03:11 PM, Neil Horman wrote:
> Recently we added an early quirk to detect 5500/5520 chipsets with early
> revisions that had problems with irq draining with interrupt remapping enabled:
>
> commit 03bbcb2e7e292838bb0244f5a7816d194c911d62
> Author: Neil Horman<nhorman@tuxdriver.com>
> Date:   Tue Apr 16 16:38:32 2013 -0400
>
>      iommu/vt-d: add quirk for broken interrupt remapping on 55XX chipsets
>
> It turns out this same problem is present in the intel X58 chipset as well.  See
> errata 69 here:
> http://www.intel.com/content/www/us/en/chipsets/x58-express-specification-update.html
>
> This patch extends the pci early quirk so that the chip devices/revisions
> specified in the above update are also covered in the same way:
>
> Signed-off-by: Neil Horman<nhorman@tuxdriver.com>
> Reviewed-by: Jan Beulich<jbeulich@suse.com>
> CC: Jan Beulich<jbeulich@suse.com>
> CC: Joerg Roedel<joro@8bytes.org>
> CC: Andrew Cooper<andrew.cooper3@citrix.com>
> CC: Malcolm Crossley<malcolm.crossley@citrix.com>
> CC: Prarit Bhargava<prarit@redhat.com>
> CC: Don Zickus<dzickus@redhat.com>
> CC: Don Dutile<ddutile@redhat.com>
> CC: Thomas Gleixner<tglx@linutronix.de>
> CC: Ingo Molnar<mingo@redhat.com>
> CC: "H. Peter Anvin"<hpa@zytor.com>
> CC: x86@kernel.org (maintainer:X86 ARCHITECTURE...)
> CC: stable@vger.kernel.org
> ---
>   arch/x86/kernel/early-quirks.c | 15 +++++++++++++--
>   1 file changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
> index 94ab6b9..743d583 100644
> --- a/arch/x86/kernel/early-quirks.c
> +++ b/arch/x86/kernel/early-quirks.c
> @@ -196,15 +196,23 @@ static void __init ati_bugs_contd(int num, int slot, int func)
>   static void __init intel_remapping_check(int num, int slot, int func)
>   {
>   	u8 revision;
> +	u16 device;
>
> +	device = read_pci_config_16(num, slot, func, PCI_DEVICE_ID);
>   	revision = read_pci_config_byte(num, slot, func, PCI_REVISION_ID);
>
>   	/*
> -	 * Revision 0x13 of this chipset supports irq remapping
> -	 * but has an erratum that breaks its behavior, flag it as such
> + 	 * Revision 13 of all triggering devices id in this quirk have
> +	 * a problem draining interrupts when irq remapping is enabled,
> +	 * and should be flagged as broken.  Additionally revisions 0x12
> +	 * and 0x22 of device id 0x3405 has this problem.
>   	 */
>   	if (revision == 0x13)
>   		set_irq_remapping_broken();
> +	else if ((device == 0x3405)&&
> +	    ((revision == 0x12) ||
> +	     (revision == 0x22)))
> +		set_irq_remapping_broken();
>
>   }
>
When discussing the original-seen errata w/Intel on 55xx chips, the
statements made were any chip with rev C1(revision = 0x21) or greater had the 
correct
hw implementation for the intr-pending flush.
We knew the bug existed in the A3 (rev=0x13) rev of the chip, but the
true check should be:
	revision < 0x21

I suspect there were multiple revs of the x58, of which B2(0x12) & C2(0x22)
were shipped to oem's, system vendors, etc.
But, in case there were any chip revisions in between these well-known values
out there, I suggest the 0x3405 check be changed to:
	revision < 0x22

Since it's unlikely that hw degressed in design over revisions, it seems
more correct to check for revs less than a rev-value having an errata,
or conversely, a chip value >= rev-value do not have the errata.
IOW, an equal check may not provide sufficient.

- Don
> @@ -239,8 +247,11 @@ static struct chipset early_qrk[] __initdata = {
>   	  PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs_contd },
>   	{ PCI_VENDOR_ID_INTEL, 0x3403, PCI_CLASS_BRIDGE_HOST,
>   	  PCI_BASE_CLASS_BRIDGE, 0, intel_remapping_check },
> +	{ PCI_VENDOR_ID_INTEL, 0x3405, PCI_CLASS_BRIDGE_HOST,
> +	  PCI_BASE_CLASS_BRIDGE, 0, intel_remapping_check },
>   	{ PCI_VENDOR_ID_INTEL, 0x3406, PCI_CLASS_BRIDGE_HOST,
>   	  PCI_BASE_CLASS_BRIDGE, 0, intel_remapping_check },
> +	
>   	{}
>   };
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] iommu/vt-d: Expand interrupt remapping quirk to cover x58 chipset
  2013-07-10 17:31 ` Don Dutile
@ 2013-07-11 10:59   ` Neil Horman
  2013-07-16 11:33     ` Neil Horman
  0 siblings, 1 reply; 7+ messages in thread
From: Neil Horman @ 2013-07-11 10:59 UTC (permalink / raw)
  To: Don Dutile
  Cc: linux-kernel, Jan Beulich, Joerg Roedel, Andrew Cooper,
	Malcolm Crossley, Prarit Bhargava, Don Zickus, Thomas Gleixner,
	Ingo Molnar, H. Peter Anvin, maintainer:X86 ARCHITECTURE...,
	stable

On Wed, Jul 10, 2013 at 01:31:36PM -0400, Don Dutile wrote:
> On 07/09/2013 03:11 PM, Neil Horman wrote:
> >Recently we added an early quirk to detect 5500/5520 chipsets with early
> >revisions that had problems with irq draining with interrupt remapping enabled:
> >
> >commit 03bbcb2e7e292838bb0244f5a7816d194c911d62
> >Author: Neil Horman<nhorman@tuxdriver.com>
> >Date:   Tue Apr 16 16:38:32 2013 -0400
> >
> >     iommu/vt-d: add quirk for broken interrupt remapping on 55XX chipsets
> >
> >It turns out this same problem is present in the intel X58 chipset as well.  See
> >errata 69 here:
> >http://www.intel.com/content/www/us/en/chipsets/x58-express-specification-update.html
> >
> >This patch extends the pci early quirk so that the chip devices/revisions
> >specified in the above update are also covered in the same way:
> >
> >Signed-off-by: Neil Horman<nhorman@tuxdriver.com>
> >Reviewed-by: Jan Beulich<jbeulich@suse.com>
> >CC: Jan Beulich<jbeulich@suse.com>
> >CC: Joerg Roedel<joro@8bytes.org>
> >CC: Andrew Cooper<andrew.cooper3@citrix.com>
> >CC: Malcolm Crossley<malcolm.crossley@citrix.com>
> >CC: Prarit Bhargava<prarit@redhat.com>
> >CC: Don Zickus<dzickus@redhat.com>
> >CC: Don Dutile<ddutile@redhat.com>
> >CC: Thomas Gleixner<tglx@linutronix.de>
> >CC: Ingo Molnar<mingo@redhat.com>
> >CC: "H. Peter Anvin"<hpa@zytor.com>
> >CC: x86@kernel.org (maintainer:X86 ARCHITECTURE...)
> >CC: stable@vger.kernel.org
> >---
> >  arch/x86/kernel/early-quirks.c | 15 +++++++++++++--
> >  1 file changed, 13 insertions(+), 2 deletions(-)
> >
> >diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
> >index 94ab6b9..743d583 100644
> >--- a/arch/x86/kernel/early-quirks.c
> >+++ b/arch/x86/kernel/early-quirks.c
> >@@ -196,15 +196,23 @@ static void __init ati_bugs_contd(int num, int slot, int func)
> >  static void __init intel_remapping_check(int num, int slot, int func)
> >  {
> >  	u8 revision;
> >+	u16 device;
> >
> >+	device = read_pci_config_16(num, slot, func, PCI_DEVICE_ID);
> >  	revision = read_pci_config_byte(num, slot, func, PCI_REVISION_ID);
> >
> >  	/*
> >-	 * Revision 0x13 of this chipset supports irq remapping
> >-	 * but has an erratum that breaks its behavior, flag it as such
> >+ 	 * Revision 13 of all triggering devices id in this quirk have
> >+	 * a problem draining interrupts when irq remapping is enabled,
> >+	 * and should be flagged as broken.  Additionally revisions 0x12
> >+	 * and 0x22 of device id 0x3405 has this problem.
> >  	 */
> >  	if (revision == 0x13)
> >  		set_irq_remapping_broken();
> >+	else if ((device == 0x3405)&&
> >+	    ((revision == 0x12) ||
> >+	     (revision == 0x22)))
> >+		set_irq_remapping_broken();
> >
> >  }
> >
> When discussing the original-seen errata w/Intel on 55xx chips, the
> statements made were any chip with rev C1(revision = 0x21) or
> greater had the correct
> hw implementation for the intr-pending flush.
> We knew the bug existed in the A3 (rev=0x13) rev of the chip, but the
> true check should be:
> 	revision < 0x21
> 
> I suspect there were multiple revs of the x58, of which B2(0x12) & C2(0x22)
> were shipped to oem's, system vendors, etc.
> But, in case there were any chip revisions in between these well-known values
> out there, I suggest the 0x3405 check be changed to:
> 	revision < 0x22
> 
> Since it's unlikely that hw degressed in design over revisions, it seems
> more correct to check for revs less than a rev-value having an errata,
> or conversely, a chip value >= rev-value do not have the errata.
> IOW, an equal check may not provide sufficient.
> 
Don and I discussed this offline.  Given that his comments make good sense
to me, I'm hesitant to apply the quirk to anything other than what the spec
update says, given that its clear.  Don is attempting to contact people at Intel
who will be able (we hope) to give us a definitive answer on this, please hold
on this patch until we have resolution on the issue.
Neil


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] iommu/vt-d: Expand interrupt remapping quirk to cover x58 chipset
  2013-07-11 10:59   ` Neil Horman
@ 2013-07-16 11:33     ` Neil Horman
  0 siblings, 0 replies; 7+ messages in thread
From: Neil Horman @ 2013-07-16 11:33 UTC (permalink / raw)
  To: Don Dutile
  Cc: linux-kernel, Jan Beulich, Joerg Roedel, Andrew Cooper,
	Malcolm Crossley, Prarit Bhargava, Don Zickus, Thomas Gleixner,
	Ingo Molnar, H. Peter Anvin, maintainer:X86 ARCHITECTURE...,
	stable

On Thu, Jul 11, 2013 at 06:59:52AM -0400, Neil Horman wrote:
> On Wed, Jul 10, 2013 at 01:31:36PM -0400, Don Dutile wrote:
> > On 07/09/2013 03:11 PM, Neil Horman wrote:
> > >Recently we added an early quirk to detect 5500/5520 chipsets with early
> > >revisions that had problems with irq draining with interrupt remapping enabled:
> > >
> > >commit 03bbcb2e7e292838bb0244f5a7816d194c911d62
> > >Author: Neil Horman<nhorman@tuxdriver.com>
> > >Date:   Tue Apr 16 16:38:32 2013 -0400
> > >
> > >     iommu/vt-d: add quirk for broken interrupt remapping on 55XX chipsets
> > >
> > >It turns out this same problem is present in the intel X58 chipset as well.  See
> > >errata 69 here:
> > >http://www.intel.com/content/www/us/en/chipsets/x58-express-specification-update.html
> > >
> > >This patch extends the pci early quirk so that the chip devices/revisions
> > >specified in the above update are also covered in the same way:
> > >
> > >Signed-off-by: Neil Horman<nhorman@tuxdriver.com>
> > >Reviewed-by: Jan Beulich<jbeulich@suse.com>
> > >CC: Jan Beulich<jbeulich@suse.com>
> > >CC: Joerg Roedel<joro@8bytes.org>
> > >CC: Andrew Cooper<andrew.cooper3@citrix.com>
> > >CC: Malcolm Crossley<malcolm.crossley@citrix.com>
> > >CC: Prarit Bhargava<prarit@redhat.com>
> > >CC: Don Zickus<dzickus@redhat.com>
> > >CC: Don Dutile<ddutile@redhat.com>
> > >CC: Thomas Gleixner<tglx@linutronix.de>
> > >CC: Ingo Molnar<mingo@redhat.com>
> > >CC: "H. Peter Anvin"<hpa@zytor.com>
> > >CC: x86@kernel.org (maintainer:X86 ARCHITECTURE...)
> > >CC: stable@vger.kernel.org
> > >---
> > >  arch/x86/kernel/early-quirks.c | 15 +++++++++++++--
> > >  1 file changed, 13 insertions(+), 2 deletions(-)
> > >
> > >diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
> > >index 94ab6b9..743d583 100644
> > >--- a/arch/x86/kernel/early-quirks.c
> > >+++ b/arch/x86/kernel/early-quirks.c
> > >@@ -196,15 +196,23 @@ static void __init ati_bugs_contd(int num, int slot, int func)
> > >  static void __init intel_remapping_check(int num, int slot, int func)
> > >  {
> > >  	u8 revision;
> > >+	u16 device;
> > >
> > >+	device = read_pci_config_16(num, slot, func, PCI_DEVICE_ID);
> > >  	revision = read_pci_config_byte(num, slot, func, PCI_REVISION_ID);
> > >
> > >  	/*
> > >-	 * Revision 0x13 of this chipset supports irq remapping
> > >-	 * but has an erratum that breaks its behavior, flag it as such
> > >+ 	 * Revision 13 of all triggering devices id in this quirk have
> > >+	 * a problem draining interrupts when irq remapping is enabled,
> > >+	 * and should be flagged as broken.  Additionally revisions 0x12
> > >+	 * and 0x22 of device id 0x3405 has this problem.
> > >  	 */
> > >  	if (revision == 0x13)
> > >  		set_irq_remapping_broken();
> > >+	else if ((device == 0x3405)&&
> > >+	    ((revision == 0x12) ||
> > >+	     (revision == 0x22)))
> > >+		set_irq_remapping_broken();
> > >
> > >  }
> > >
> > When discussing the original-seen errata w/Intel on 55xx chips, the
> > statements made were any chip with rev C1(revision = 0x21) or
> > greater had the correct
> > hw implementation for the intr-pending flush.
> > We knew the bug existed in the A3 (rev=0x13) rev of the chip, but the
> > true check should be:
> > 	revision < 0x21
> > 
> > I suspect there were multiple revs of the x58, of which B2(0x12) & C2(0x22)
> > were shipped to oem's, system vendors, etc.
> > But, in case there were any chip revisions in between these well-known values
> > out there, I suggest the 0x3405 check be changed to:
> > 	revision < 0x22
> > 
> > Since it's unlikely that hw degressed in design over revisions, it seems
> > more correct to check for revs less than a rev-value having an errata,
> > or conversely, a chip value >= rev-value do not have the errata.
> > IOW, an equal check may not provide sufficient.
> > 
> Don and I discussed this offline.  Given that his comments make good sense
> to me, I'm hesitant to apply the quirk to anything other than what the spec
> update says, given that its clear.  Don is attempting to contact people at Intel
> who will be able (we hope) to give us a definitive answer on this, please hold
> on this patch until we have resolution on the issue.
> Neil
> 
Don, do you have any updates here from Intel?  I'd like to get this put to bed.
Neil


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] iommu/vt-d: Expand interrupt remapping quirk to cover x58 chipset
  2013-07-09 19:11 [PATCH] iommu/vt-d: Expand interrupt remapping quirk to cover x58 chipset Neil Horman
  2013-07-10 17:31 ` Don Dutile
@ 2013-07-17 11:13 ` Neil Horman
  2013-07-17 13:04   ` Don Dutile
  2013-07-24  3:55   ` [tip:x86/urgent] x86/iommu/vt-d: " tip-bot for Neil Horman
  1 sibling, 2 replies; 7+ messages in thread
From: Neil Horman @ 2013-07-17 11:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: Neil Horman, Jan Beulich, Joerg Roedel, Andrew Cooper,
	Malcolm Crossley, Prarit Bhargava, Don Zickus, Don Dutile,
	Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86, stable

Recently we added an early quirk to detect 5500/5520 chipsets with early
revisions that had problems with irq draining with interrupt remapping enabled:

commit 03bbcb2e7e292838bb0244f5a7816d194c911d62
Author: Neil Horman <nhorman@tuxdriver.com>
Date:   Tue Apr 16 16:38:32 2013 -0400

    iommu/vt-d: add quirk for broken interrupt remapping on 55XX chipsets

It turns out this same problem is present in the intel X58 chipset as well.  See
errata 69 here:
http://www.intel.com/content/www/us/en/chipsets/x58-express-specification-update.html

This patch extends the pci early quirk so that the chip devices/revisions
specified in the above update are also covered in the same way:

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
CC: Jan Beulich <jbeulich@suse.com>
CC: Joerg Roedel <joro@8bytes.org>
CC: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Malcolm Crossley <malcolm.crossley@citrix.com>
CC: Prarit Bhargava <prarit@redhat.com>
CC: Don Zickus <dzickus@redhat.com>
CC: Don Dutile <ddutile@redhat.com>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Ingo Molnar <mingo@redhat.com>
CC: "H. Peter Anvin" <hpa@zytor.com>
CC: x86@kernel.org
CC: stable@vger.kernel.org

---
Note, this a repost of this patch.  Don and I talked about this offline again,
and neither of us have been able to gather any information from intel on the
subject.  While I understand his point that we should try to get confirmation
about inclusive steppings that are affected by this errata, I feel like we
should commit this patch based on the documentation we do have, and we can
always ammend it later if Intel indicates other chips are affected.
---
 arch/x86/kernel/early-quirks.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
index 94ab6b9..743d583 100644
--- a/arch/x86/kernel/early-quirks.c
+++ b/arch/x86/kernel/early-quirks.c
@@ -196,15 +196,23 @@ static void __init ati_bugs_contd(int num, int slot, int func)
 static void __init intel_remapping_check(int num, int slot, int func)
 {
 	u8 revision;
+	u16 device;
 
+	device = read_pci_config_16(num, slot, func, PCI_DEVICE_ID);
 	revision = read_pci_config_byte(num, slot, func, PCI_REVISION_ID);
 
 	/*
-	 * Revision 0x13 of this chipset supports irq remapping
-	 * but has an erratum that breaks its behavior, flag it as such
+ 	 * Revision 13 of all triggering devices id in this quirk have
+	 * a problem draining interrupts when irq remapping is enabled,
+	 * and should be flagged as broken.  Additionally revisions 0x12
+	 * and 0x22 of device id 0x3405 has this problem.
 	 */
 	if (revision == 0x13)
 		set_irq_remapping_broken();
+	else if ((device == 0x3405) &&
+	    ((revision == 0x12) ||
+	     (revision == 0x22))) 
+		set_irq_remapping_broken();
 
 }
 
@@ -239,8 +247,11 @@ static struct chipset early_qrk[] __initdata = {
 	  PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs_contd },
 	{ PCI_VENDOR_ID_INTEL, 0x3403, PCI_CLASS_BRIDGE_HOST,
 	  PCI_BASE_CLASS_BRIDGE, 0, intel_remapping_check },
+	{ PCI_VENDOR_ID_INTEL, 0x3405, PCI_CLASS_BRIDGE_HOST,
+	  PCI_BASE_CLASS_BRIDGE, 0, intel_remapping_check },
 	{ PCI_VENDOR_ID_INTEL, 0x3406, PCI_CLASS_BRIDGE_HOST,
 	  PCI_BASE_CLASS_BRIDGE, 0, intel_remapping_check },
+	
 	{}
 };
 
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] iommu/vt-d: Expand interrupt remapping quirk to cover x58 chipset
  2013-07-17 11:13 ` Neil Horman
@ 2013-07-17 13:04   ` Don Dutile
  2013-07-24  3:55   ` [tip:x86/urgent] x86/iommu/vt-d: " tip-bot for Neil Horman
  1 sibling, 0 replies; 7+ messages in thread
From: Don Dutile @ 2013-07-17 13:04 UTC (permalink / raw)
  To: Neil Horman
  Cc: linux-kernel, Jan Beulich, Joerg Roedel, Andrew Cooper,
	Malcolm Crossley, Prarit Bhargava, Don Zickus, Thomas Gleixner,
	Ingo Molnar, H. Peter Anvin, x86, stable

On 07/17/2013 07:13 AM, Neil Horman wrote:
> Recently we added an early quirk to detect 5500/5520 chipsets with early
> revisions that had problems with irq draining with interrupt remapping enabled:
>
> commit 03bbcb2e7e292838bb0244f5a7816d194c911d62
> Author: Neil Horman<nhorman@tuxdriver.com>
> Date:   Tue Apr 16 16:38:32 2013 -0400
>
>      iommu/vt-d: add quirk for broken interrupt remapping on 55XX chipsets
>
> It turns out this same problem is present in the intel X58 chipset as well.  See
> errata 69 here:
> http://www.intel.com/content/www/us/en/chipsets/x58-express-specification-update.html
>
> This patch extends the pci early quirk so that the chip devices/revisions
> specified in the above update are also covered in the same way:
>
> Signed-off-by: Neil Horman<nhorman@tuxdriver.com>
> Reviewed-by: Jan Beulich<jbeulich@suse.com>
> CC: Jan Beulich<jbeulich@suse.com>
> CC: Joerg Roedel<joro@8bytes.org>
> CC: Andrew Cooper<andrew.cooper3@citrix.com>
> CC: Malcolm Crossley<malcolm.crossley@citrix.com>
> CC: Prarit Bhargava<prarit@redhat.com>
> CC: Don Zickus<dzickus@redhat.com>
> CC: Don Dutile<ddutile@redhat.com>
> CC: Thomas Gleixner<tglx@linutronix.de>
> CC: Ingo Molnar<mingo@redhat.com>
> CC: "H. Peter Anvin"<hpa@zytor.com>
> CC: x86@kernel.org
> CC: stable@vger.kernel.org
>
> ---
> Note, this a repost of this patch.  Don and I talked about this offline again,
> and neither of us have been able to gather any information from intel on the
> subject.  While I understand his point that we should try to get confirmation
> about inclusive steppings that are affected by this errata, I feel like we
> should commit this patch based on the documentation we do have, and we can
> always ammend it later if Intel indicates other chips are affected.

and to back-up what Neil says...

Acked-by: Donald Dutile <ddutile@redhat.com>

> ---
>   arch/x86/kernel/early-quirks.c | 15 +++++++++++++--
>   1 file changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
> index 94ab6b9..743d583 100644
> --- a/arch/x86/kernel/early-quirks.c
> +++ b/arch/x86/kernel/early-quirks.c
> @@ -196,15 +196,23 @@ static void __init ati_bugs_contd(int num, int slot, int func)
>   static void __init intel_remapping_check(int num, int slot, int func)
>   {
>   	u8 revision;
> +	u16 device;
>
> +	device = read_pci_config_16(num, slot, func, PCI_DEVICE_ID);
>   	revision = read_pci_config_byte(num, slot, func, PCI_REVISION_ID);
>
>   	/*
> -	 * Revision 0x13 of this chipset supports irq remapping
> -	 * but has an erratum that breaks its behavior, flag it as such
> + 	 * Revision 13 of all triggering devices id in this quirk have
> +	 * a problem draining interrupts when irq remapping is enabled,
> +	 * and should be flagged as broken.  Additionally revisions 0x12
> +	 * and 0x22 of device id 0x3405 has this problem.
>   	 */
>   	if (revision == 0x13)
>   		set_irq_remapping_broken();
> +	else if ((device == 0x3405)&&
> +	    ((revision == 0x12) ||
> +	     (revision == 0x22)))
> +		set_irq_remapping_broken();
>
>   }
>
> @@ -239,8 +247,11 @@ static struct chipset early_qrk[] __initdata = {
>   	  PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs_contd },
>   	{ PCI_VENDOR_ID_INTEL, 0x3403, PCI_CLASS_BRIDGE_HOST,
>   	  PCI_BASE_CLASS_BRIDGE, 0, intel_remapping_check },
> +	{ PCI_VENDOR_ID_INTEL, 0x3405, PCI_CLASS_BRIDGE_HOST,
> +	  PCI_BASE_CLASS_BRIDGE, 0, intel_remapping_check },
>   	{ PCI_VENDOR_ID_INTEL, 0x3406, PCI_CLASS_BRIDGE_HOST,
>   	  PCI_BASE_CLASS_BRIDGE, 0, intel_remapping_check },
> +	
>   	{}
>   };
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [tip:x86/urgent] x86/iommu/vt-d: Expand interrupt remapping quirk to cover x58 chipset
  2013-07-17 11:13 ` Neil Horman
  2013-07-17 13:04   ` Don Dutile
@ 2013-07-24  3:55   ` tip-bot for Neil Horman
  1 sibling, 0 replies; 7+ messages in thread
From: tip-bot for Neil Horman @ 2013-07-24  3:55 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, andrew.cooper3, joro, jbeulich,
	ddutile, malcolm.crossley, nhorman, tglx, prarit, dzickus

Commit-ID:  803075dba31c17af110e1d9a915fe7262165b213
Gitweb:     http://git.kernel.org/tip/803075dba31c17af110e1d9a915fe7262165b213
Author:     Neil Horman <nhorman@tuxdriver.com>
AuthorDate: Wed, 17 Jul 2013 07:13:59 -0400
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 23 Jul 2013 11:29:30 +0200

x86/iommu/vt-d: Expand interrupt remapping quirk to cover x58 chipset

Recently we added an early quirk to detect 5500/5520 chipsets
with early revisions that had problems with irq draining with
interrupt remapping enabled:

  commit 03bbcb2e7e292838bb0244f5a7816d194c911d62
  Author: Neil Horman <nhorman@tuxdriver.com>
  Date:   Tue Apr 16 16:38:32 2013 -0400

      iommu/vt-d: add quirk for broken interrupt remapping on 55XX chipsets

It turns out this same problem is present in the intel X58
chipset as well. See errata 69 here:

  http://www.intel.com/content/www/us/en/chipsets/x58-express-specification-update.html

This patch extends the pci early quirk so that the chip
devices/revisions specified in the above update are also covered
in the same way:

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Donald Dutile <ddutile@redhat.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Malcolm Crossley <malcolm.crossley@citrix.com>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/1374059639-8631-1-git-send-email-nhorman@tuxdriver.com
[ Small edits. ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/kernel/early-quirks.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
index 94ab6b9..63bdb29 100644
--- a/arch/x86/kernel/early-quirks.c
+++ b/arch/x86/kernel/early-quirks.c
@@ -196,15 +196,23 @@ static void __init ati_bugs_contd(int num, int slot, int func)
 static void __init intel_remapping_check(int num, int slot, int func)
 {
 	u8 revision;
+	u16 device;
 
+	device = read_pci_config_16(num, slot, func, PCI_DEVICE_ID);
 	revision = read_pci_config_byte(num, slot, func, PCI_REVISION_ID);
 
 	/*
-	 * Revision 0x13 of this chipset supports irq remapping
-	 * but has an erratum that breaks its behavior, flag it as such
+ 	 * Revision 13 of all triggering devices id in this quirk have
+	 * a problem draining interrupts when irq remapping is enabled,
+	 * and should be flagged as broken.  Additionally revisions 0x12
+	 * and 0x22 of device id 0x3405 has this problem.
 	 */
 	if (revision == 0x13)
 		set_irq_remapping_broken();
+	else if ((device == 0x3405) &&
+	    ((revision == 0x12) ||
+	     (revision == 0x22)))
+		set_irq_remapping_broken();
 
 }
 
@@ -239,6 +247,8 @@ static struct chipset early_qrk[] __initdata = {
 	  PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs_contd },
 	{ PCI_VENDOR_ID_INTEL, 0x3403, PCI_CLASS_BRIDGE_HOST,
 	  PCI_BASE_CLASS_BRIDGE, 0, intel_remapping_check },
+	{ PCI_VENDOR_ID_INTEL, 0x3405, PCI_CLASS_BRIDGE_HOST,
+	  PCI_BASE_CLASS_BRIDGE, 0, intel_remapping_check },
 	{ PCI_VENDOR_ID_INTEL, 0x3406, PCI_CLASS_BRIDGE_HOST,
 	  PCI_BASE_CLASS_BRIDGE, 0, intel_remapping_check },
 	{}

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-07-24  3:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-09 19:11 [PATCH] iommu/vt-d: Expand interrupt remapping quirk to cover x58 chipset Neil Horman
2013-07-10 17:31 ` Don Dutile
2013-07-11 10:59   ` Neil Horman
2013-07-16 11:33     ` Neil Horman
2013-07-17 11:13 ` Neil Horman
2013-07-17 13:04   ` Don Dutile
2013-07-24  3:55   ` [tip:x86/urgent] x86/iommu/vt-d: " tip-bot for Neil Horman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.