linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 021/145] xen/pcifront: Deal with toolstack missing 'XenbusStateClosing' state.
       [not found] <1374101277-7915-1-git-send-email-kamal@canonical.com>
@ 2013-07-17 22:45 ` Kamal Mostafa
  2013-07-17 22:47 ` [PATCH 089/145] iommu/vt-d: add quirk for broken interrupt remapping on 55XX chipsets Kamal Mostafa
  1 sibling, 0 replies; 6+ messages in thread
From: Kamal Mostafa @ 2013-07-17 22:45 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: linux-pci, Konrad Rzeszutek Wilk, Luis Henriques

3.8.13.5 -stable review patch.  If anyone has any objections, please let me know.

------------------

From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

commit 098b1aeaf4d6149953b8f1f8d55c21d85536fbff upstream.

There are two tool-stack that can instruct the Xen PCI frontend
and backend to change states: 'xm' (Python code with a daemon),
and 'xl' (C library - does not keep state changes).

With the 'xm', the path to disconnect a single PCI device (xm pci-detach
<guest> <BDF>) is:

4(Connected)->7(Reconfiguring*)-> 8(Reconfigured)-> 4(Connected)->5(Closing*).

The * is for states that the tool-stack sets. For 'xl', it is similar:

4(Connected)->7(Reconfiguring*)-> 8(Reconfigured)-> 4(Connected)

Both of them also tear down the XenBus structure, so the backend
state ends up going in the 3(Initialised) and calls pcifront_xenbus_remove.

When a PCI device is plugged back in (xm pci-attach <guest> <BDF>)
both of them follow the same pattern:

2(InitWait*), 3(Initialized*), 4(Connected*)->4(Connected).

[xen-pcifront ignores the 2,3 state changes and only acts when
4 (Connected) has been reached]

Note that this is for a _single_ PCI device. If there were two
PCI devices and only one was disconnected 'xm' would show the same
state changes.

The problem is that git commit 3d925320e9e2de162bd138bf97816bda8c3f71be
("xen/pcifront: Use Xen-SWIOTLB when initting if required") introduced
a mechanism to initialize the SWIOTLB when the Xen PCI front moves to
Connected state. It also had some aggressive seatbelt code check that
would warn the user if one tried to change to Connected state without
hitting first the Closing state:

 pcifront pci-0: PCI frontend already installed!

However, that code can be relaxed and we can continue on working
even if the frontend is instructed to be the 'Connected' state with
no devices and then gets tickled to be in 'Connected' state again.

In other words, this 4(Connected)->5(Closing)->4(Connected) state
was expected, while 4(Connected)->.... anything but 5(Closing)->4(Connected)
was not. This patch removes that aggressive check and allows
Xen pcifront to work with the 'xl' toolstack (for one or more
PCI devices) and with 'xm' toolstack (for more than two PCI
devices).

Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: linux-pci@vger.kernel.org
[v2: Added in the description about two PCI devices]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
 drivers/pci/xen-pcifront.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/pci/xen-pcifront.c b/drivers/pci/xen-pcifront.c
index 966abc6..f7197a7 100644
--- a/drivers/pci/xen-pcifront.c
+++ b/drivers/pci/xen-pcifront.c
@@ -678,10 +678,9 @@ static int pcifront_connect_and_init_dma(struct pcifront_device *pdev)
 	if (!pcifront_dev) {
 		dev_info(&pdev->xdev->dev, "Installing PCI frontend\n");
 		pcifront_dev = pdev;
-	} else {
-		dev_err(&pdev->xdev->dev, "PCI frontend already installed!\n");
+	} else
 		err = -EEXIST;
-	}
+
 	spin_unlock(&pcifront_dev_lock);
 
 	if (!err && !swiotlb_nr_tbl()) {
@@ -848,7 +847,7 @@ static int pcifront_try_connect(struct pcifront_device *pdev)
 		goto out;
 
 	err = pcifront_connect_and_init_dma(pdev);
-	if (err) {
+	if (err && err != -EEXIST) {
 		xenbus_dev_fatal(pdev->xdev, err,
 				 "Error setting up PCI Frontend");
 		goto out;
-- 
1.8.1.2


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

* [PATCH 089/145] iommu/vt-d: add quirk for broken interrupt remapping on 55XX chipsets
       [not found] <1374101277-7915-1-git-send-email-kamal@canonical.com>
  2013-07-17 22:45 ` [PATCH 021/145] xen/pcifront: Deal with toolstack missing 'XenbusStateClosing' state Kamal Mostafa
@ 2013-07-17 22:47 ` Kamal Mostafa
  2013-07-18  8:02   ` Thomas Backlund
  1 sibling, 1 reply; 6+ messages in thread
From: Kamal Mostafa @ 2013-07-17 22:47 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Neil Horman, Prarit Bhargava, Don Zickus, Don Dutile,
	Bjorn Helgaas, Asit Mallick, David Woodhouse, linux-pci,
	Joerg Roedel, Konrad Rzeszutek Wilk, Arkadiusz Miśkiewicz,
	Luis Henriques

3.8.13.5 -stable review patch.  If anyone has any objections, please let me know.

------------------

From: Neil Horman <nhorman@tuxdriver.com>

commit 03bbcb2e7e292838bb0244f5a7816d194c911d62 upstream.

A few years back intel published a spec update:
http://www.intel.com/content/dam/doc/specification-update/5520-and-5500-chipset-ioh-specification-update.pdf

For the 5520 and 5500 chipsets which contained an errata (specificially errata
53), which noted that these chipsets can't properly do interrupt remapping, and
as a result the recommend that interrupt remapping be disabled in bios.  While
many vendors have a bios update to do exactly that, not all do, and of course
not all users update their bios to a level that corrects the problem.  As a
result, occasionally interrupts can arrive at a cpu even after affinity for that
interrupt has be moved, leading to lost or spurrious interrupts (usually
characterized by the message:
kernel: do_IRQ: 7.71 No irq handler for vector (irq -1)

There have been several incidents recently of people seeing this error, and
investigation has shown that they have system for which their BIOS level is such
that this feature was not properly turned off.  As such, it would be good to
give them a reminder that their systems are vulnurable to this problem.  For
details of those that reported the problem, please see:
https://bugzilla.redhat.com/show_bug.cgi?id=887006

[ Joerg: Removed CONFIG_IRQ_REMAP ifdef from early-quirks.c ]

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: Prarit Bhargava <prarit@redhat.com>
CC: Don Zickus <dzickus@redhat.com>
CC: Don Dutile <ddutile@redhat.com>
CC: Bjorn Helgaas <bhelgaas@google.com>
CC: Asit Mallick <asit.k.mallick@intel.com>
CC: David Woodhouse <dwmw2@infradead.org>
CC: linux-pci@vger.kernel.org
CC: Joerg Roedel <joro@8bytes.org>
CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CC: Arkadiusz Miśkiewicz <arekm@maven.pl>
Signed-off-by: Joerg Roedel <joro@8bytes.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
 arch/x86/include/asm/irq_remapping.h |  2 ++
 arch/x86/kernel/early-quirks.c       | 20 ++++++++++++++++++++
 drivers/iommu/intel_irq_remapping.c  | 10 ++++++++++
 drivers/iommu/irq_remapping.c        |  6 ++++++
 drivers/iommu/irq_remapping.h        |  2 ++
 5 files changed, 40 insertions(+)

diff --git a/arch/x86/include/asm/irq_remapping.h b/arch/x86/include/asm/irq_remapping.h
index 5fb9bbb..38477e6 100644
--- a/arch/x86/include/asm/irq_remapping.h
+++ b/arch/x86/include/asm/irq_remapping.h
@@ -30,6 +30,7 @@ extern int irq_remapping_enabled;
 
 extern void setup_irq_remapping_ops(void);
 extern int irq_remapping_supported(void);
+extern void set_irq_remapping_broken(void);
 extern int irq_remapping_prepare(void);
 extern int irq_remapping_enable(void);
 extern void irq_remapping_disable(void);
@@ -58,6 +59,7 @@ extern int setup_hpet_msi_remapped(unsigned int irq, unsigned int id);
 
 static inline void setup_irq_remapping_ops(void) { }
 static inline int irq_remapping_supported(void) { return 0; }
+static inline void set_irq_remapping_broken(void) { }
 static inline int irq_remapping_prepare(void) { return -ENODEV; }
 static inline int irq_remapping_enable(void) { return -ENODEV; }
 static inline void irq_remapping_disable(void) { }
diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
index 3755ef4..94ab6b9 100644
--- a/arch/x86/kernel/early-quirks.c
+++ b/arch/x86/kernel/early-quirks.c
@@ -18,6 +18,7 @@
 #include <asm/apic.h>
 #include <asm/iommu.h>
 #include <asm/gart.h>
+#include <asm/irq_remapping.h>
 
 static void __init fix_hypertransport_config(int num, int slot, int func)
 {
@@ -192,6 +193,21 @@ static void __init ati_bugs_contd(int num, int slot, int func)
 }
 #endif
 
+static void __init intel_remapping_check(int num, int slot, int func)
+{
+	u8 revision;
+
+	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
+	 */
+	if (revision == 0x13)
+		set_irq_remapping_broken();
+
+}
+
 #define QFLAG_APPLY_ONCE 	0x1
 #define QFLAG_APPLIED		0x2
 #define QFLAG_DONE		(QFLAG_APPLY_ONCE|QFLAG_APPLIED)
@@ -221,6 +237,10 @@ static struct chipset early_qrk[] __initdata = {
 	  PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs },
 	{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS,
 	  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, 0x3406, PCI_CLASS_BRIDGE_HOST,
+	  PCI_BASE_CLASS_BRIDGE, 0, intel_remapping_check },
 	{}
 };
 
diff --git a/drivers/iommu/intel_irq_remapping.c b/drivers/iommu/intel_irq_remapping.c
index af8904d..4c9379c 100644
--- a/drivers/iommu/intel_irq_remapping.c
+++ b/drivers/iommu/intel_irq_remapping.c
@@ -509,6 +509,16 @@ static int __init intel_irq_remapping_supported(void)
 
 	if (disable_irq_remap)
 		return 0;
+	if (irq_remap_broken) {
+		WARN_TAINT(1, TAINT_FIRMWARE_WORKAROUND,
+			   "This system BIOS has enabled interrupt remapping\n"
+			   "on a chipset that contains an erratum making that\n"
+			   "feature unstable.  To maintain system stability\n"
+			   "interrupt remapping is being disabled.  Please\n"
+			   "contact your BIOS vendor for an update\n");
+		disable_irq_remap = 1;
+		return 0;
+	}
 
 	if (!dmar_ir_support())
 		return 0;
diff --git a/drivers/iommu/irq_remapping.c b/drivers/iommu/irq_remapping.c
index faf85d6..018382c 100644
--- a/drivers/iommu/irq_remapping.c
+++ b/drivers/iommu/irq_remapping.c
@@ -12,6 +12,7 @@
 int irq_remapping_enabled;
 
 int disable_irq_remap;
+int irq_remap_broken;
 int disable_sourceid_checking;
 int no_x2apic_optout;
 
@@ -58,6 +59,11 @@ void __init setup_irq_remapping_ops(void)
 #endif
 }
 
+void set_irq_remapping_broken(void)
+{
+	irq_remap_broken = 1;
+}
+
 int irq_remapping_supported(void)
 {
 	if (disable_irq_remap)
diff --git a/drivers/iommu/irq_remapping.h b/drivers/iommu/irq_remapping.h
index 95363ac..23bdea1 100644
--- a/drivers/iommu/irq_remapping.h
+++ b/drivers/iommu/irq_remapping.h
@@ -32,6 +32,7 @@ struct pci_dev;
 struct msi_msg;
 
 extern int disable_irq_remap;
+extern int irq_remap_broken;
 extern int disable_sourceid_checking;
 extern int no_x2apic_optout;
 
@@ -88,6 +89,7 @@ extern struct irq_remap_ops amd_iommu_irq_ops;
 
 #define irq_remapping_enabled 0
 #define disable_irq_remap     1
+#define irq_remap_broken      0
 
 #endif /* CONFIG_IRQ_REMAP */
 
-- 
1.8.1.2


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

* Re: [PATCH 089/145] iommu/vt-d: add quirk for broken interrupt remapping on 55XX chipsets
  2013-07-17 22:47 ` [PATCH 089/145] iommu/vt-d: add quirk for broken interrupt remapping on 55XX chipsets Kamal Mostafa
@ 2013-07-18  8:02   ` Thomas Backlund
  2013-07-18 10:37     ` Neil Horman
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Backlund @ 2013-07-18  8:02 UTC (permalink / raw)
  To: Kamal Mostafa
  Cc: linux-kernel, stable, kernel-team, Neil Horman, Prarit Bhargava,
	Don Zickus, Don Dutile, Bjorn Helgaas, Asit Mallick,
	David Woodhouse, linux-pci, Joerg Roedel, Konrad Rzeszutek Wilk,
	Arkadiusz Miśkiewicz, Luis Henriques

18.07.2013 01:47, Kamal Mostafa skrev:
> 3.8.13.5 -stable review patch.  If anyone has any objections, please let me know.
>
> ------------------
>
> From: Neil Horman <nhorman@tuxdriver.com>
>
> commit 03bbcb2e7e292838bb0244f5a7816d194c911d62 upstream.
>
> A few years back intel published a spec update:
> http://www.intel.com/content/dam/doc/specification-update/5520-and-5500-chipset-ioh-specification-update.pdf
>
> For the 5520 and 5500 chipsets which contained an errata (specificially errata
> 53), which noted that these chipsets can't properly do interrupt remapping, and
> as a result the recommend that interrupt remapping be disabled in bios.  While
> many vendors have a bios update to do exactly that, not all do, and of course
> not all users update their bios to a level that corrects the problem.  As a
> result, occasionally interrupts can arrive at a cpu even after affinity for that
> interrupt has be moved, leading to lost or spurrious interrupts (usually
> characterized by the message:
> kernel: do_IRQ: 7.71 No irq handler for vector (irq -1)
>
> There have been several incidents recently of people seeing this error, and
> investigation has shown that they have system for which their BIOS level is such
> that this feature was not properly turned off.  As such, it would be good to
> give them a reminder that their systems are vulnurable to this problem.  For
> details of those that reported the problem, please see:
> https://bugzilla.redhat.com/show_bug.cgi?id=887006
>
> [ Joerg: Removed CONFIG_IRQ_REMAP ifdef from early-quirks.c ]
>
> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> CC: Prarit Bhargava <prarit@redhat.com>
> CC: Don Zickus <dzickus@redhat.com>
> CC: Don Dutile <ddutile@redhat.com>
> CC: Bjorn Helgaas <bhelgaas@google.com>
> CC: Asit Mallick <asit.k.mallick@intel.com>
> CC: David Woodhouse <dwmw2@infradead.org>
> CC: linux-pci@vger.kernel.org
> CC: Joerg Roedel <joro@8bytes.org>
> CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> CC: Arkadiusz Miśkiewicz <arekm@maven.pl>
> Signed-off-by: Joerg Roedel <joro@8bytes.org>
> Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
> ---
>   arch/x86/include/asm/irq_remapping.h |  2 ++
>   arch/x86/kernel/early-quirks.c       | 20 ++++++++++++++++++++
>   drivers/iommu/intel_irq_remapping.c  | 10 ++++++++++
>   drivers/iommu/irq_remapping.c        |  6 ++++++
>   drivers/iommu/irq_remapping.h        |  2 ++
>   5 files changed, 40 insertions(+)
>

This patch introduces this warning on 3.8 series kernels:

In file included from arch/x86/kernel/early-quirks.c:21:0:
/kernel/linux-3.8.13.5/arch/x86/include/asm/irq_remapping.h:46:10: 
varning: ”struct irq_data” deklarerad inuti parameterlista [aktiverat 
som standard]
/kernel/linux-3.8.13.5/arch/x86/include/asm/irq_remapping.h:46:10: 
varning: dess scope-område är endast denna definition eller deklaration, 
vilket troligen inte är vad du vill. [aktiverat som standard]
/kernel/linux-3.8.13.5/arch/x86/include/asm/irq_remapping.h:50:17: 
varning: ”struct msi_msg” deklarerad inuti parameterlista [aktiverat som 
standard]


You need to add this upstream fix too:

commit 35d3d814cbd46a85bed97cd74ba97fbbb51e0ccd
Author: Joerg Roedel <joro@8bytes.org>
Date:   Fri Apr 19 20:34:55 2013 +0200

     iommu: Fix compile warnings with forward declarations


--

Thomas


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

* Re: [PATCH 089/145] iommu/vt-d: add quirk for broken interrupt remapping on 55XX chipsets
  2013-07-18  8:02   ` Thomas Backlund
@ 2013-07-18 10:37     ` Neil Horman
  2013-07-18 13:45       ` Thomas Backlund
  0 siblings, 1 reply; 6+ messages in thread
From: Neil Horman @ 2013-07-18 10:37 UTC (permalink / raw)
  To: Thomas Backlund
  Cc: Kamal Mostafa, linux-kernel, stable, kernel-team, Prarit Bhargava,
	Don Zickus, Don Dutile, Bjorn Helgaas, Asit Mallick,
	David Woodhouse, linux-pci, Joerg Roedel, Konrad Rzeszutek Wilk,
	Arkadiusz Miśkiewicz, Luis Henriques

On Thu, Jul 18, 2013 at 11:02:00AM +0300, Thomas Backlund wrote:
> 18.07.2013 01:47, Kamal Mostafa skrev:
> >3.8.13.5 -stable review patch.  If anyone has any objections, please let me know.
> >
> >------------------
> >
> >From: Neil Horman <nhorman@tuxdriver.com>
> >
> >commit 03bbcb2e7e292838bb0244f5a7816d194c911d62 upstream.
> >
> >A few years back intel published a spec update:
> >http://www.intel.com/content/dam/doc/specification-update/5520-and-5500-chipset-ioh-specification-update.pdf
> >
> >For the 5520 and 5500 chipsets which contained an errata (specificially errata
> >53), which noted that these chipsets can't properly do interrupt remapping, and
> >as a result the recommend that interrupt remapping be disabled in bios.  While
> >many vendors have a bios update to do exactly that, not all do, and of course
> >not all users update their bios to a level that corrects the problem.  As a
> >result, occasionally interrupts can arrive at a cpu even after affinity for that
> >interrupt has be moved, leading to lost or spurrious interrupts (usually
> >characterized by the message:
> >kernel: do_IRQ: 7.71 No irq handler for vector (irq -1)
> >
> >There have been several incidents recently of people seeing this error, and
> >investigation has shown that they have system for which their BIOS level is such
> >that this feature was not properly turned off.  As such, it would be good to
> >give them a reminder that their systems are vulnurable to this problem.  For
> >details of those that reported the problem, please see:
> >https://bugzilla.redhat.com/show_bug.cgi?id=887006
> >
> >[ Joerg: Removed CONFIG_IRQ_REMAP ifdef from early-quirks.c ]
> >
> >Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> >CC: Prarit Bhargava <prarit@redhat.com>
> >CC: Don Zickus <dzickus@redhat.com>
> >CC: Don Dutile <ddutile@redhat.com>
> >CC: Bjorn Helgaas <bhelgaas@google.com>
> >CC: Asit Mallick <asit.k.mallick@intel.com>
> >CC: David Woodhouse <dwmw2@infradead.org>
> >CC: linux-pci@vger.kernel.org
> >CC: Joerg Roedel <joro@8bytes.org>
> >CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> >CC: Arkadiusz Miśkiewicz <arekm@maven.pl>
> >Signed-off-by: Joerg Roedel <joro@8bytes.org>
> >Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
> >---
> >  arch/x86/include/asm/irq_remapping.h |  2 ++
> >  arch/x86/kernel/early-quirks.c       | 20 ++++++++++++++++++++
> >  drivers/iommu/intel_irq_remapping.c  | 10 ++++++++++
> >  drivers/iommu/irq_remapping.c        |  6 ++++++
> >  drivers/iommu/irq_remapping.h        |  2 ++
> >  5 files changed, 40 insertions(+)
> >
> 
> This patch introduces this warning on 3.8 series kernels:
> 
> In file included from arch/x86/kernel/early-quirks.c:21:0:
> /kernel/linux-3.8.13.5/arch/x86/include/asm/irq_remapping.h:46:10:
> varning: ”struct irq_data” deklarerad inuti parameterlista
> [aktiverat som standard]
> /kernel/linux-3.8.13.5/arch/x86/include/asm/irq_remapping.h:46:10:
> varning: dess scope-område är endast denna definition eller
> deklaration, vilket troligen inte är vad du vill. [aktiverat som
> standard]
> /kernel/linux-3.8.13.5/arch/x86/include/asm/irq_remapping.h:50:17:
> varning: ”struct msi_msg” deklarerad inuti parameterlista [aktiverat
> som standard]
> 
> 
> You need to add this upstream fix too:
> 
> commit 35d3d814cbd46a85bed97cd74ba97fbbb51e0ccd
> Author: Joerg Roedel <joro@8bytes.org>
> Date:   Fri Apr 19 20:34:55 2013 +0200
> 
>     iommu: Fix compile warnings with forward declarations
> 
I submited a 3.9 backport that included that fix to -stable over a week ago, you
should just be able to use that if you want.
Neil

> 
> --
> 
> Thomas
> 
> 

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

* Re: [PATCH 089/145] iommu/vt-d: add quirk for broken interrupt remapping on 55XX chipsets
  2013-07-18 10:37     ` Neil Horman
@ 2013-07-18 13:45       ` Thomas Backlund
  2013-07-18 18:30         ` Kamal Mostafa
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Backlund @ 2013-07-18 13:45 UTC (permalink / raw)
  To: Neil Horman
  Cc: Kamal Mostafa, linux-kernel, stable, kernel-team, Prarit Bhargava,
	Don Zickus, Don Dutile, Bjorn Helgaas, Asit Mallick,
	David Woodhouse, linux-pci, Joerg Roedel, Konrad Rzeszutek Wilk,
	Arkadiusz Miśkiewicz, Luis Henriques

18.07.2013 13:37, Neil Horman skrev:
> On Thu, Jul 18, 2013 at 11:02:00AM +0300, Thomas Backlund wrote:
>> 18.07.2013 01:47, Kamal Mostafa skrev:
>>> 3.8.13.5 -stable review patch.  If anyone has any objections, please let me know.
>>>
>>> ------------------
>>>
>>> From: Neil Horman <nhorman@tuxdriver.com>
>>>
>>> commit 03bbcb2e7e292838bb0244f5a7816d194c911d62 upstream.
>>>
>>> A few years back intel published a spec update:
>>> http://www.intel.com/content/dam/doc/specification-update/5520-and-5500-chipset-ioh-specification-update.pdf
>>>
>>> For the 5520 and 5500 chipsets which contained an errata (specificially errata
>>> 53), which noted that these chipsets can't properly do interrupt remapping, and
>>> as a result the recommend that interrupt remapping be disabled in bios.  While
>>> many vendors have a bios update to do exactly that, not all do, and of course
>>> not all users update their bios to a level that corrects the problem.  As a
>>> result, occasionally interrupts can arrive at a cpu even after affinity for that
>>> interrupt has be moved, leading to lost or spurrious interrupts (usually
>>> characterized by the message:
>>> kernel: do_IRQ: 7.71 No irq handler for vector (irq -1)
>>>
>>> There have been several incidents recently of people seeing this error, and
>>> investigation has shown that they have system for which their BIOS level is such
>>> that this feature was not properly turned off.  As such, it would be good to
>>> give them a reminder that their systems are vulnurable to this problem.  For
>>> details of those that reported the problem, please see:
>>> https://bugzilla.redhat.com/show_bug.cgi?id=887006
>>>
>>> [ Joerg: Removed CONFIG_IRQ_REMAP ifdef from early-quirks.c ]
>>>
>>> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
>>> CC: Prarit Bhargava <prarit@redhat.com>
>>> CC: Don Zickus <dzickus@redhat.com>
>>> CC: Don Dutile <ddutile@redhat.com>
>>> CC: Bjorn Helgaas <bhelgaas@google.com>
>>> CC: Asit Mallick <asit.k.mallick@intel.com>
>>> CC: David Woodhouse <dwmw2@infradead.org>
>>> CC: linux-pci@vger.kernel.org
>>> CC: Joerg Roedel <joro@8bytes.org>
>>> CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
>>> CC: Arkadiusz Miśkiewicz <arekm@maven.pl>
>>> Signed-off-by: Joerg Roedel <joro@8bytes.org>
>>> Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
>>> ---
>>>   arch/x86/include/asm/irq_remapping.h |  2 ++
>>>   arch/x86/kernel/early-quirks.c       | 20 ++++++++++++++++++++
>>>   drivers/iommu/intel_irq_remapping.c  | 10 ++++++++++
>>>   drivers/iommu/irq_remapping.c        |  6 ++++++
>>>   drivers/iommu/irq_remapping.h        |  2 ++
>>>   5 files changed, 40 insertions(+)
>>>
>>
>> This patch introduces this warning on 3.8 series kernels:
>>
>> In file included from arch/x86/kernel/early-quirks.c:21:0:
>> /kernel/linux-3.8.13.5/arch/x86/include/asm/irq_remapping.h:46:10:
>> varning: ”struct irq_data” deklarerad inuti parameterlista
>> [aktiverat som standard]
>> /kernel/linux-3.8.13.5/arch/x86/include/asm/irq_remapping.h:46:10:
>> varning: dess scope-område är endast denna definition eller
>> deklaration, vilket troligen inte är vad du vill. [aktiverat som
>> standard]
>> /kernel/linux-3.8.13.5/arch/x86/include/asm/irq_remapping.h:50:17:
>> varning: ”struct msi_msg” deklarerad inuti parameterlista [aktiverat
>> som standard]
>>
>>
>> You need to add this upstream fix too:
>>
>> commit 35d3d814cbd46a85bed97cd74ba97fbbb51e0ccd
>> Author: Joerg Roedel <joro@8bytes.org>
>> Date:   Fri Apr 19 20:34:55 2013 +0200
>>
>>      iommu: Fix compile warnings with forward declarations
>>
> I submited a 3.9 backport that included that fix to -stable over a week ago, you
> should just be able to use that if you want.
> Neil

Almost, but not enough...

The patch you refer to was:
[3.9 stable PATCH] iommu/vt-d: add quirk for broken interrupt remapping 
on 55XX chipsets

and got merged in 3.9.9.

And that added a missing: "#include <linux/irq.h>" in
arch/x86/include/asm/irq_remapping.h

But using that patch it still spits out:

kernel/linux-3.8.13.5/arch/x86/include/asm/irq_remapping.h:50:17:
 >> varning: ”struct msi_msg” deklarerad inuti parameterlista [aktiverat
 >> som standard]


which is why the additional patch is still needed...

--

Thomas



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

* Re: [PATCH 089/145] iommu/vt-d: add quirk for broken interrupt remapping on 55XX chipsets
  2013-07-18 13:45       ` Thomas Backlund
@ 2013-07-18 18:30         ` Kamal Mostafa
  0 siblings, 0 replies; 6+ messages in thread
From: Kamal Mostafa @ 2013-07-18 18:30 UTC (permalink / raw)
  To: Thomas Backlund
  Cc: Neil Horman, linux-kernel, stable, kernel-team, Prarit Bhargava,
	Don Zickus, Don Dutile, Bjorn Helgaas, Asit Mallick,
	David Woodhouse, linux-pci, Joerg Roedel, Konrad Rzeszutek Wilk,
	Arkadiusz Miśkiewicz, Luis Henriques

[-- Attachment #1: Type: text/plain, Size: 5188 bytes --]

On Thu, 2013-07-18 at 16:45 +0300, Thomas Backlund wrote:
> 18.07.2013 13:37, Neil Horman skrev:
> > On Thu, Jul 18, 2013 at 11:02:00AM +0300, Thomas Backlund wrote:
> >> 18.07.2013 01:47, Kamal Mostafa skrev:
> >>> 3.8.13.5 -stable review patch.  If anyone has any objections, please let me know.
> >>>
> >>> ------------------
> >>>
> >>> From: Neil Horman <nhorman@tuxdriver.com>
> >>>
> >>> commit 03bbcb2e7e292838bb0244f5a7816d194c911d62 upstream.
> >>>
> >>> A few years back intel published a spec update:
> >>> http://www.intel.com/content/dam/doc/specification-update/5520-and-5500-chipset-ioh-specification-update.pdf
> >>>
> >>> For the 5520 and 5500 chipsets which contained an errata (specificially errata
> >>> 53), which noted that these chipsets can't properly do interrupt remapping, and
> >>> as a result the recommend that interrupt remapping be disabled in bios.  While
> >>> many vendors have a bios update to do exactly that, not all do, and of course
> >>> not all users update their bios to a level that corrects the problem.  As a
> >>> result, occasionally interrupts can arrive at a cpu even after affinity for that
> >>> interrupt has be moved, leading to lost or spurrious interrupts (usually
> >>> characterized by the message:
> >>> kernel: do_IRQ: 7.71 No irq handler for vector (irq -1)
> >>>
> >>> There have been several incidents recently of people seeing this error, and
> >>> investigation has shown that they have system for which their BIOS level is such
> >>> that this feature was not properly turned off.  As such, it would be good to
> >>> give them a reminder that their systems are vulnurable to this problem.  For
> >>> details of those that reported the problem, please see:
> >>> https://bugzilla.redhat.com/show_bug.cgi?id=887006
> >>>
> >>> [ Joerg: Removed CONFIG_IRQ_REMAP ifdef from early-quirks.c ]
> >>>
> >>> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> >>> CC: Prarit Bhargava <prarit@redhat.com>
> >>> CC: Don Zickus <dzickus@redhat.com>
> >>> CC: Don Dutile <ddutile@redhat.com>
> >>> CC: Bjorn Helgaas <bhelgaas@google.com>
> >>> CC: Asit Mallick <asit.k.mallick@intel.com>
> >>> CC: David Woodhouse <dwmw2@infradead.org>
> >>> CC: linux-pci@vger.kernel.org
> >>> CC: Joerg Roedel <joro@8bytes.org>
> >>> CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> >>> CC: Arkadiusz Miśkiewicz <arekm@maven.pl>
> >>> Signed-off-by: Joerg Roedel <joro@8bytes.org>
> >>> Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
> >>> ---
> >>>   arch/x86/include/asm/irq_remapping.h |  2 ++
> >>>   arch/x86/kernel/early-quirks.c       | 20 ++++++++++++++++++++
> >>>   drivers/iommu/intel_irq_remapping.c  | 10 ++++++++++
> >>>   drivers/iommu/irq_remapping.c        |  6 ++++++
> >>>   drivers/iommu/irq_remapping.h        |  2 ++
> >>>   5 files changed, 40 insertions(+)
> >>>
> >>
> >> This patch introduces this warning on 3.8 series kernels:
> >>
> >> In file included from arch/x86/kernel/early-quirks.c:21:0:
> >> /kernel/linux-3.8.13.5/arch/x86/include/asm/irq_remapping.h:46:10:
> >> varning: ”struct irq_data” deklarerad inuti parameterlista
> >> [aktiverat som standard]
> >> /kernel/linux-3.8.13.5/arch/x86/include/asm/irq_remapping.h:46:10:
> >> varning: dess scope-område är endast denna definition eller
> >> deklaration, vilket troligen inte är vad du vill. [aktiverat som
> >> standard]
> >> /kernel/linux-3.8.13.5/arch/x86/include/asm/irq_remapping.h:50:17:
> >> varning: ”struct msi_msg” deklarerad inuti parameterlista [aktiverat
> >> som standard]
> >>
> >>
> >> You need to add this upstream fix too:
> >>
> >> commit 35d3d814cbd46a85bed97cd74ba97fbbb51e0ccd
> >> Author: Joerg Roedel <joro@8bytes.org>
> >> Date:   Fri Apr 19 20:34:55 2013 +0200
> >>
> >>      iommu: Fix compile warnings with forward declarations
> >>
> > I submited a 3.9 backport that included that fix to -stable over a week ago, you
> > should just be able to use that if you want.
> > Neil
> 
> Almost, but not enough...
> 
> The patch you refer to was:
> [3.9 stable PATCH] iommu/vt-d: add quirk for broken interrupt remapping 
> on 55XX chipsets
> 
> and got merged in 3.9.9.
> 
> And that added a missing: "#include <linux/irq.h>" in
> arch/x86/include/asm/irq_remapping.h
> 
> But using that patch it still spits out:
> 
> kernel/linux-3.8.13.5/arch/x86/include/asm/irq_remapping.h:50:17:
>  >> varning: ”struct msi_msg” deklarerad inuti parameterlista [aktiverat
>  >> som standard]
> 
> 
> which is why the additional patch is still needed...
> 
> --
> 
> Thomas


Ok, I have replaced the queued patch in linux-3.8.y-review[0] with
Neil's backport[1], and added Joerg's patch[2].  These are (still)
queued up for 3.8.13.5 -stable.

Thanks very much for the heads-up folks.

 -Kamal

[0] http://kernel.ubuntu.com/git?p=ubuntu/linux.git;h=linux-3.8.y-review;a=shortlog
[1] http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=commitdiff;h=af4e6e26bde03f5203c9e366673623f4a3797639
[2] http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=commitdiff;h=3668f1f9e97d4ab0007f357e06fc67ce152c3998


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2013-07-18 18:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1374101277-7915-1-git-send-email-kamal@canonical.com>
2013-07-17 22:45 ` [PATCH 021/145] xen/pcifront: Deal with toolstack missing 'XenbusStateClosing' state Kamal Mostafa
2013-07-17 22:47 ` [PATCH 089/145] iommu/vt-d: add quirk for broken interrupt remapping on 55XX chipsets Kamal Mostafa
2013-07-18  8:02   ` Thomas Backlund
2013-07-18 10:37     ` Neil Horman
2013-07-18 13:45       ` Thomas Backlund
2013-07-18 18:30         ` Kamal Mostafa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).