public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* CONFIG_INTR_REMAP and CONFIG_DMAR dependencies?
@ 2011-07-12 16:47 Andrew Vasquez
  0 siblings, 0 replies; 9+ messages in thread
From: Andrew Vasquez @ 2011-07-12 16:47 UTC (permalink / raw)
  To: linux scsi dev, linux pci; +Cc: Avik Shau, Madhu Iyengar, Giridhar Malavali

All,

We've seen a few reports logged with upstream kernels where qla2xxx is
unable to initialize HW due to what appears to be a lack of
interrupt routing:

	[ 1137.271156] qla2xxx 0000:18:00.0: Found an ISP2532, irq 52, iobase 0xffffc90000028000
	[ 1137.271438] qla2xxx 0000:18:00.0: irq 96 for MSI/MSI-X
	[ 1137.271447] qla2xxx 0000:18:00.0: irq 97 for MSI/MSI-X
	[ 1137.271706] qla2xxx 0000:18:00.0: Configuring PCI space...
	[ 1137.271725] qla2xxx 0000:18:00.0: setting latency timer to 64
	[ 1137.271732] qla2xxx 0000:18:00.0: enabling Mem-Wr-Inval
	[ 1137.278705] DRHD: handling fault status reg 2
	[ 1137.278715] INTR-REMAP: Request device [[18:00.0] fault index 20
	[ 1137.278717] INTR-REMAP:[fault reason 34] Present field in the IRTE entry is clear
	[ 1159.389099] qla2xxx 0000:0c:07.0: Cable is unplugged...
	[ 1167.218478] qla2xxx 0000:18:00.0: Mailbox command timeout occurred. Scheduling ISP abort. eeh_busy: 0x0
	[ 1167.218490] qla2xxx 0000:18:00.0: Unable to burst-read optrom segment (100/7ff50400/18389b000).
	[ 1167.218496] qla2xxx 0000:18:00.0: Reverting to slow-read.
	[ 1197.174623] qla2xxx 0000:18:00.0: Unable to burst-read optrom segment (100/7ff50000/18389b000).
	[ 1197.174632] qla2xxx 0000:18:00.0: Reverting to slow-read.
	[ 1197.190613] qla2xxx 0000:18:00.0: Configure NVRAM parameters...
	[ 1197.198582] qla2xxx 0000:18:00.0: Verifying loaded RISC code...
	[ 1227.142951] qla2xxx 0000:18:00.0: Failed mailbox send register test
	[ 1227.142959] qla2xxx 0000:18:00.0: Failed to initialize adapter

It turns out that this is seen only when the kernel is configured with
CONFIG_INTR_REMAP=y and CONFIG_DMAR=n.  When the kernel is recompiled
with CONFIG_DMAR=y, interrupts are being routed and the driver
operates as normal:

	[   63.271529] qla2xxx 0000:18:00.0: PCI INT A -> GSI 52 (level, low) -> IRQ 52
	[   63.271560] qla2xxx 0000:18:00.0: Found an ISP2532, irq 52, iobase 0xffffc90000028000
	[   63.271864] qla2xxx 0000:18:00.0: irq 96 for MSI/MSI-X
	[   63.271876] qla2xxx 0000:18:00.0: irq 97 for MSI/MSI-X
	[   63.272095] qla2xxx 0000:18:00.0: Configuring PCI space...
	[   63.272103] qla2xxx 0000:18:00.0: setting latency timer to 64
	[   63.272111] qla2xxx 0000:18:00.0: enabling Mem-Wr-Inval
	[   63.285525] qla2xxx 0000:18:00.0: Configure NVRAM parameters...
	[   63.293880] qla2xxx 0000:18:00.0: Verifying loaded RISC code...
	[   63.310956] qla2xxx 0000:18:00.0: FW: Loading via request-firmware...
	[   63.342746] qla2xxx 0000:18:00.0: Allocated (64 KB) for FCE...
	[   63.342823] qla2xxx 0000:18:00.0: Allocated (64 KB) for EFT...
	[   63.343130] qla2xxx 0000:18:00.0: Allocated (1350 KB) for firmware dump...
	[   63.348153] scsi2 : qla2xxx
	[   63.348722] qla2xxx 0000:18:00.0: 
	[   63.348723]  QLogic Fibre Channel HBA Driver: 8.03.07.03-k
	[   63.348724]   QLogic QLE2562 - PCI-Express Dual Channel 8Gb Fibre Channel HBA
	[   63.348726]   ISP2532: PCIe (5.0GT/s x4) @ 0000:18:00.0 hdma+, host#=2, fw=5.03.15 (d5)

My questions are:

1) What does the following mean in the CONFIG_INTR_REMAP=y and
   CONFIG_DMAR=n case?

	[ 1137.278705] DRHD: handling fault status reg 2
	[ 1137.278715] INTR-REMAP: Request device [[18:00.0] fault index 20
	[ 1137.278717] INTR-REMAP:[fault reason 34] Present field in the IRTE entry is clear

2) Should CONFIG_DMAR be automatically enabled when
   CONFIG_INTR_REMAP is set?

3) If the answer to (2) is no, then what should drivers do differently
   to avoid this 'no interrupts being routed case' scenario?

Thanks, av

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

* CONFIG_INTR_REMAP and CONFIG_DMAR dependencies?
@ 2011-07-18 21:16 Andrew Vasquez
  2011-07-18 21:32 ` Yinghai Lu
  2011-07-18 22:53 ` Shyam_Iyer
  0 siblings, 2 replies; 9+ messages in thread
From: Andrew Vasquez @ 2011-07-18 21:16 UTC (permalink / raw)
  To: linux scsi dev, linux pci, suresh.b.siddha, hpa
  Cc: Avik Shau, Giridhar Malavali

Suresh,

Any thoughts/ideas on this?  Could you help with the INTR-REMAP
messages?

Thanks,
Andrew Vasquez

----

All,

We've seen a few reports logged with upstream kernels where qla2xxx is
unable to initialize HW due to what appears to be a lack of
interrupt routing:

	[ 1137.271156] qla2xxx 0000:18:00.0: Found an ISP2532, irq 52, iobase 0xffffc90000028000
	[ 1137.271438] qla2xxx 0000:18:00.0: irq 96 for MSI/MSI-X
	[ 1137.271447] qla2xxx 0000:18:00.0: irq 97 for MSI/MSI-X
	[ 1137.271706] qla2xxx 0000:18:00.0: Configuring PCI space...
	[ 1137.271725] qla2xxx 0000:18:00.0: setting latency timer to 64
	[ 1137.271732] qla2xxx 0000:18:00.0: enabling Mem-Wr-Inval
	[ 1137.278705] DRHD: handling fault status reg 2
	[ 1137.278715] INTR-REMAP: Request device [[18:00.0] fault index 20
	[ 1137.278717] INTR-REMAP:[fault reason 34] Present field in the IRTE entry is clear
	[ 1159.389099] qla2xxx 0000:0c:07.0: Cable is unplugged...
	[ 1167.218478] qla2xxx 0000:18:00.0: Mailbox command timeout occurred. Scheduling ISP abort. eeh_busy: 0x0
	[ 1167.218490] qla2xxx 0000:18:00.0: Unable to burst-read optrom segment (100/7ff50400/18389b000).
	[ 1167.218496] qla2xxx 0000:18:00.0: Reverting to slow-read.
	[ 1197.174623] qla2xxx 0000:18:00.0: Unable to burst-read optrom segment (100/7ff50000/18389b000).
	[ 1197.174632] qla2xxx 0000:18:00.0: Reverting to slow-read.
	[ 1197.190613] qla2xxx 0000:18:00.0: Configure NVRAM parameters...
	[ 1197.198582] qla2xxx 0000:18:00.0: Verifying loaded RISC code...
	[ 1227.142951] qla2xxx 0000:18:00.0: Failed mailbox send register test
	[ 1227.142959] qla2xxx 0000:18:00.0: Failed to initialize adapter

It turns out that this is seen only when the kernel is configured with
CONFIG_INTR_REMAP=y and CONFIG_DMAR=n.  When the kernel is recompiled
with CONFIG_DMAR=y, interrupts are being routed and the driver
operates as normal:

	[   63.271529] qla2xxx 0000:18:00.0: PCI INT A -> GSI 52 (level, low) -> IRQ 52
	[   63.271560] qla2xxx 0000:18:00.0: Found an ISP2532, irq 52, iobase 0xffffc90000028000
	[   63.271864] qla2xxx 0000:18:00.0: irq 96 for MSI/MSI-X
	[   63.271876] qla2xxx 0000:18:00.0: irq 97 for MSI/MSI-X
	[   63.272095] qla2xxx 0000:18:00.0: Configuring PCI space...
	[   63.272103] qla2xxx 0000:18:00.0: setting latency timer to 64
	[   63.272111] qla2xxx 0000:18:00.0: enabling Mem-Wr-Inval
	[   63.285525] qla2xxx 0000:18:00.0: Configure NVRAM parameters...
	[   63.293880] qla2xxx 0000:18:00.0: Verifying loaded RISC code...
	[   63.310956] qla2xxx 0000:18:00.0: FW: Loading via request-firmware...
	[   63.342746] qla2xxx 0000:18:00.0: Allocated (64 KB) for FCE...
	[   63.342823] qla2xxx 0000:18:00.0: Allocated (64 KB) for EFT...
	[   63.343130] qla2xxx 0000:18:00.0: Allocated (1350 KB) for firmware dump...
	[   63.348153] scsi2 : qla2xxx
	[   63.348722] qla2xxx 0000:18:00.0: 
	[   63.348723]  QLogic Fibre Channel HBA Driver: 8.03.07.03-k
	[   63.348724]   QLogic QLE2562 - PCI-Express Dual Channel 8Gb Fibre Channel HBA
	[   63.348726]   ISP2532: PCIe (5.0GT/s x4) @ 0000:18:00.0 hdma+, host#=2, fw=5.03.15 (d5)

My questions are:

1) What does the following mean in the CONFIG_INTR_REMAP=y and
   CONFIG_DMAR=n case?

	[ 1137.278705] DRHD: handling fault status reg 2
	[ 1137.278715] INTR-REMAP: Request device [[18:00.0] fault index 20
	[ 1137.278717] INTR-REMAP:[fault reason 34] Present field in the IRTE entry is clear

2) Should CONFIG_DMAR be automatically enabled when
   CONFIG_INTR_REMAP is set?

3) If the answer to (2) is no, then what should drivers do differently
   to avoid this 'no interrupts being routed case' scenario?

Thanks, av

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

* Re: CONFIG_INTR_REMAP and CONFIG_DMAR dependencies?
  2011-07-18 21:16 CONFIG_INTR_REMAP and CONFIG_DMAR dependencies? Andrew Vasquez
@ 2011-07-18 21:32 ` Yinghai Lu
  2011-07-18 23:16   ` Yinghai Lu
  2011-07-18 22:53 ` Shyam_Iyer
  1 sibling, 1 reply; 9+ messages in thread
From: Yinghai Lu @ 2011-07-18 21:32 UTC (permalink / raw)
  To: Andrew Vasquez
  Cc: linux scsi dev, linux pci, suresh.b.siddha, hpa, Avik Shau,
	Giridhar Malavali

On Mon, Jul 18, 2011 at 2:16 PM, Andrew Vasquez
<andrew.vasquez@qlogic.com> wrote:
> Suresh,
>
> Any thoughts/ideas on this?  Could you help with the INTR-REMAP
> messages?
>
> Thanks,
> Andrew Vasquez
>
> ----
>
> All,
>
> We've seen a few reports logged with upstream kernels where qla2xxx is
> unable to initialize HW due to what appears to be a lack of
> interrupt routing:
>
>        [ 1137.271156] qla2xxx 0000:18:00.0: Found an ISP2532, irq 52, iobase 0xffffc90000028000
>        [ 1137.271438] qla2xxx 0000:18:00.0: irq 96 for MSI/MSI-X
>        [ 1137.271447] qla2xxx 0000:18:00.0: irq 97 for MSI/MSI-X
>        [ 1137.271706] qla2xxx 0000:18:00.0: Configuring PCI space...
>        [ 1137.271725] qla2xxx 0000:18:00.0: setting latency timer to 64
>        [ 1137.271732] qla2xxx 0000:18:00.0: enabling Mem-Wr-Inval
>        [ 1137.278705] DRHD: handling fault status reg 2
>        [ 1137.278715] INTR-REMAP: Request device [[18:00.0] fault index 20
>        [ 1137.278717] INTR-REMAP:[fault reason 34] Present field in the IRTE entry is clear
>        [ 1159.389099] qla2xxx 0000:0c:07.0: Cable is unplugged...
>        [ 1167.218478] qla2xxx 0000:18:00.0: Mailbox command timeout occurred. Scheduling ISP abort. eeh_busy: 0x0
>        [ 1167.218490] qla2xxx 0000:18:00.0: Unable to burst-read optrom segment (100/7ff50400/18389b000).
>        [ 1167.218496] qla2xxx 0000:18:00.0: Reverting to slow-read.
>        [ 1197.174623] qla2xxx 0000:18:00.0: Unable to burst-read optrom segment (100/7ff50000/18389b000).
>        [ 1197.174632] qla2xxx 0000:18:00.0: Reverting to slow-read.
>        [ 1197.190613] qla2xxx 0000:18:00.0: Configure NVRAM parameters...
>        [ 1197.198582] qla2xxx 0000:18:00.0: Verifying loaded RISC code...
>        [ 1227.142951] qla2xxx 0000:18:00.0: Failed mailbox send register test
>        [ 1227.142959] qla2xxx 0000:18:00.0: Failed to initialize adapter
>
> It turns out that this is seen only when the kernel is configured with
> CONFIG_INTR_REMAP=y and CONFIG_DMAR=n.  When the kernel is recompiled
> with CONFIG_DMAR=y, interrupts are being routed and the driver
> operates as normal:
>
>        [   63.271529] qla2xxx 0000:18:00.0: PCI INT A -> GSI 52 (level, low) -> IRQ 52
>        [   63.271560] qla2xxx 0000:18:00.0: Found an ISP2532, irq 52, iobase 0xffffc90000028000
>        [   63.271864] qla2xxx 0000:18:00.0: irq 96 for MSI/MSI-X
>        [   63.271876] qla2xxx 0000:18:00.0: irq 97 for MSI/MSI-X
>        [   63.272095] qla2xxx 0000:18:00.0: Configuring PCI space...
>        [   63.272103] qla2xxx 0000:18:00.0: setting latency timer to 64
>        [   63.272111] qla2xxx 0000:18:00.0: enabling Mem-Wr-Inval
>        [   63.285525] qla2xxx 0000:18:00.0: Configure NVRAM parameters...
>        [   63.293880] qla2xxx 0000:18:00.0: Verifying loaded RISC code...
>        [   63.310956] qla2xxx 0000:18:00.0: FW: Loading via request-firmware...
>        [   63.342746] qla2xxx 0000:18:00.0: Allocated (64 KB) for FCE...
>        [   63.342823] qla2xxx 0000:18:00.0: Allocated (64 KB) for EFT...
>        [   63.343130] qla2xxx 0000:18:00.0: Allocated (1350 KB) for firmware dump...
>        [   63.348153] scsi2 : qla2xxx
>        [   63.348722] qla2xxx 0000:18:00.0:
>        [   63.348723]  QLogic Fibre Channel HBA Driver: 8.03.07.03-k
>        [   63.348724]   QLogic QLE2562 - PCI-Express Dual Channel 8Gb Fibre Channel HBA
>        [   63.348726]   ISP2532: PCIe (5.0GT/s x4) @ 0000:18:00.0 hdma+, host#=2, fw=5.03.15 (d5)
>
> My questions are:
>
> 1) What does the following mean in the CONFIG_INTR_REMAP=y and
>   CONFIG_DMAR=n case?
>
>        [ 1137.278705] DRHD: handling fault status reg 2
>        [ 1137.278715] INTR-REMAP: Request device [[18:00.0] fault index 20
>        [ 1137.278717] INTR-REMAP:[fault reason 34] Present field in the IRTE entry is clear
>
> 2) Should CONFIG_DMAR be automatically enabled when
>   CONFIG_INTR_REMAP is set?

those are separated option.

one for dmar remapping, one for interrupt.

how about when you have CONFIG_INTR_REMAP=y and CONFIG_DMAR=y
and boot with intel_iommu=off

>
> 3) If the answer to (2) is no, then what should drivers do differently
>   to avoid this 'no interrupts being routed case' scenario?
>

can you post whole boot log?

Yinghai
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* RE: CONFIG_INTR_REMAP and CONFIG_DMAR dependencies?
  2011-07-18 21:16 CONFIG_INTR_REMAP and CONFIG_DMAR dependencies? Andrew Vasquez
  2011-07-18 21:32 ` Yinghai Lu
@ 2011-07-18 22:53 ` Shyam_Iyer
  1 sibling, 0 replies; 9+ messages in thread
From: Shyam_Iyer @ 2011-07-18 22:53 UTC (permalink / raw)
  To: andrew.vasquez, linux-scsi, linux-pci, suresh.b.siddha, hpa
  Cc: avik.shau, giridhar.malavali

> -----Original Message-----
> From: linux-scsi-owner@vger.kernel.org [mailto:linux-scsi-
> owner@vger.kernel.org] On Behalf Of Andrew Vasquez
> Sent: Monday, July 18, 2011 5:16 PM
> To: linux scsi dev; linux pci; suresh.b.siddha@intel.com;
> hpa@linux.intel.com
> Cc: Avik Shau; Giridhar Malavali
> Subject: CONFIG_INTR_REMAP and CONFIG_DMAR dependencies?
> 
> Suresh,
> 
> Any thoughts/ideas on this?  Could you help with the INTR-REMAP
> messages?
> 
> Thanks,
> Andrew Vasquez
> 
> ----
> 
> All,
> 
> We've seen a few reports logged with upstream kernels where qla2xxx is
> unable to initialize HW due to what appears to be a lack of
> interrupt routing:
> 
> 	[ 1137.271156] qla2xxx 0000:18:00.0: Found an ISP2532, irq 52,
> iobase 0xffffc90000028000
> 	[ 1137.271438] qla2xxx 0000:18:00.0: irq 96 for MSI/MSI-X
> 	[ 1137.271447] qla2xxx 0000:18:00.0: irq 97 for MSI/MSI-X
> 	[ 1137.271706] qla2xxx 0000:18:00.0: Configuring PCI space...
> 	[ 1137.271725] qla2xxx 0000:18:00.0: setting latency timer to 64
> 	[ 1137.271732] qla2xxx 0000:18:00.0: enabling Mem-Wr-Inval
> 	[ 1137.278705] DRHD: handling fault status reg 2
> 	[ 1137.278715] INTR-REMAP: Request device [[18:00.0] fault index
> 20
> 	[ 1137.278717] INTR-REMAP:[fault reason 34] Present field in the
> IRTE entry is clear
> 	[ 1159.389099] qla2xxx 0000:0c:07.0: Cable is unplugged...
> 	[ 1167.218478] qla2xxx 0000:18:00.0: Mailbox command timeout
> occurred. Scheduling ISP abort. eeh_busy: 0x0
> 	[ 1167.218490] qla2xxx 0000:18:00.0: Unable to burst-read optrom
> segment (100/7ff50400/18389b000).
> 	[ 1167.218496] qla2xxx 0000:18:00.0: Reverting to slow-read.
> 	[ 1197.174623] qla2xxx 0000:18:00.0: Unable to burst-read optrom
> segment (100/7ff50000/18389b000).
> 	[ 1197.174632] qla2xxx 0000:18:00.0: Reverting to slow-read.
> 	[ 1197.190613] qla2xxx 0000:18:00.0: Configure NVRAM
> parameters...
> 	[ 1197.198582] qla2xxx 0000:18:00.0: Verifying loaded RISC
> code...
> 	[ 1227.142951] qla2xxx 0000:18:00.0: Failed mailbox send register
> test
> 	[ 1227.142959] qla2xxx 0000:18:00.0: Failed to initialize adapter
> 
> It turns out that this is seen only when the kernel is configured with
> CONFIG_INTR_REMAP=y and CONFIG_DMAR=n.  When the kernel is recompiled
> with CONFIG_DMAR=y, interrupts are being routed and the driver
> operates as normal:

Interesting you mention this. In my case I have both CONFIG_INT_REMAP and CONFIG_DMAR set to "y".

My messages are slightly different but revolve around the DMAR/DRHD faulting.. Something has broken in the DMAR code path..

[   13.707535] qlge 0000:05:00.0: PCI INT A -> GSI 35 (level, low) -> IRQ 35
[   13.707547] qlge 0000:05:00.0: setting latency timer to 64
[   13.721701] qlge 0000:05:00.0: QLogic 10 Gigabit PCI-E Ethernet Driver
[   13.721703] qlge 0000:05:00.0: Driver name: qlge, Version: v1.00.00.29.00.00-01.
[   13.721930] qlge 0000:05:00.0: eth0: Link is down.
[   13.721937] qlge 0000:05:00.0: eth0: Clearing MAC address
[   13.721940] qlge 0000:05:00.0: eth0: Adding UNICAST address 00:00:00:00:00:00 at index 0 in the CAM.
[   13.721947] qlge 0000:05:00.0: eth0: Function #0, Port 0, NIC Roll 0, NIC Rev = 1, XG Roll = 0, XG Rev = 1.
[   13.721950] qlge 0000:05:00.0: eth0: MAC address 00:c0:dd:1b:40:18
[   13.721989] qlge 0000:05:00.1: PCI INT B -> GSI 46 (level, low) -> IRQ 46
[   13.721996] qlge 0000:05:00.1: setting latency timer to 64
[   13.732097] Brocade 10G Ethernet driver
[   13.732119] bnad_pci_probe : (0xffff88031d721000, 0xffffffffa01de3d0) PCI Func : (2)
[   13.735790] qlge 0000:05:00.1: eth1: Link is down.
[   13.735793] qlge 0000:05:00.1: eth1: Clearing MAC address
[   13.735797] qlge 0000:05:00.1: eth1: Adding UNICAST address 00:00:00:00:00:00 at index 128 in the CAM.
[   13.735804] qlge 0000:05:00.1: eth1: Function #1, Port 1, NIC Roll 0, NIC Rev = 1, XG Roll = 0, XG Rev = 1.
[   13.735807] qlge 0000:05:00.1: eth1: MAC address 00:c0:dd:1b:40:1a
[   13.802954] DRHD: handling fault status reg 302
[   13.802959] DMAR:[DMA Read] Request device [03:00.0] fault addr ffe86000
[   13.802961] DMAR:[fault reason 06] PTE Read access is not set
 
> 
> 	[   63.271529] qla2xxx 0000:18:00.0: PCI INT A -> GSI 52 (level,
> low) -> IRQ 52
> 	[   63.271560] qla2xxx 0000:18:00.0: Found an ISP2532, irq 52,
> iobase 0xffffc90000028000
> 	[   63.271864] qla2xxx 0000:18:00.0: irq 96 for MSI/MSI-X
> 	[   63.271876] qla2xxx 0000:18:00.0: irq 97 for MSI/MSI-X
> 	[   63.272095] qla2xxx 0000:18:00.0: Configuring PCI space...
> 	[   63.272103] qla2xxx 0000:18:00.0: setting latency timer to 64
> 	[   63.272111] qla2xxx 0000:18:00.0: enabling Mem-Wr-Inval
> 	[   63.285525] qla2xxx 0000:18:00.0: Configure NVRAM
> parameters...
> 	[   63.293880] qla2xxx 0000:18:00.0: Verifying loaded RISC
> code...
> 	[   63.310956] qla2xxx 0000:18:00.0: FW: Loading via request-
> firmware...
> 	[   63.342746] qla2xxx 0000:18:00.0: Allocated (64 KB) for FCE...
> 	[   63.342823] qla2xxx 0000:18:00.0: Allocated (64 KB) for EFT...
> 	[   63.343130] qla2xxx 0000:18:00.0: Allocated (1350 KB) for
> firmware dump...
> 	[   63.348153] scsi2 : qla2xxx
> 	[   63.348722] qla2xxx 0000:18:00.0:
> 	[   63.348723]  QLogic Fibre Channel HBA Driver: 8.03.07.03-k
> 	[   63.348724]   QLogic QLE2562 - PCI-Express Dual Channel 8Gb
> Fibre Channel HBA
> 	[   63.348726]   ISP2532: PCIe (5.0GT/s x4) @ 0000:18:00.0 hdma+,
> host#=2, fw=5.03.15 (d5)
> 
> My questions are:
> 
> 1) What does the following mean in the CONFIG_INTR_REMAP=y and
>    CONFIG_DMAR=n case?
> 
> 	[ 1137.278705] DRHD: handling fault status reg 2
> 	[ 1137.278715] INTR-REMAP: Request device [[18:00.0] fault index
> 20
> 	[ 1137.278717] INTR-REMAP:[fault reason 34] Present field in the
> IRTE entry is clear
> 
> 2) Should CONFIG_DMAR be automatically enabled when
>    CONFIG_INTR_REMAP is set?
> 
> 3) If the answer to (2) is no, then what should drivers do differently
>    to avoid this 'no interrupts being routed case' scenario?
> 

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

* Re: CONFIG_INTR_REMAP and CONFIG_DMAR dependencies?
  2011-07-18 21:32 ` Yinghai Lu
@ 2011-07-18 23:16   ` Yinghai Lu
  2011-07-18 23:50     ` Andrew Vasquez
  2011-07-19  4:50     ` Suresh Siddha
  0 siblings, 2 replies; 9+ messages in thread
From: Yinghai Lu @ 2011-07-18 23:16 UTC (permalink / raw)
  To: Andrew Vasquez
  Cc: linux scsi dev, linux pci, suresh.b.siddha, hpa, Avik Shau,
	Giridhar Malavali

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

On Mon, Jul 18, 2011 at 2:32 PM, Yinghai Lu <yinghai@kernel.org> wrote:
> On Mon, Jul 18, 2011 at 2:16 PM, Andrew Vasquez
> <andrew.vasquez@qlogic.com> wrote:
>> Suresh,
>>
>> Any thoughts/ideas on this?  Could you help with the INTR-REMAP
>> messages?
>>
>> Thanks,
>> Andrew Vasquez
>>
>> ----
>>
>> All,
>>
>> We've seen a few reports logged with upstream kernels where qla2xxx is
>> unable to initialize HW due to what appears to be a lack of
>> interrupt routing:
>>
>>        [ 1137.271156] qla2xxx 0000:18:00.0: Found an ISP2532, irq 52, iobase 0xffffc90000028000
>>        [ 1137.271438] qla2xxx 0000:18:00.0: irq 96 for MSI/MSI-X
>>        [ 1137.271447] qla2xxx 0000:18:00.0: irq 97 for MSI/MSI-X
>>        [ 1137.271706] qla2xxx 0000:18:00.0: Configuring PCI space...
>>        [ 1137.271725] qla2xxx 0000:18:00.0: setting latency timer to 64
>>        [ 1137.271732] qla2xxx 0000:18:00.0: enabling Mem-Wr-Inval
>>        [ 1137.278705] DRHD: handling fault status reg 2
>>        [ 1137.278715] INTR-REMAP: Request device [[18:00.0] fault index 20
>>        [ 1137.278717] INTR-REMAP:[fault reason 34] Present field in the IRTE entry is clear
>>        [ 1159.389099] qla2xxx 0000:0c:07.0: Cable is unplugged...
>>        [ 1167.218478] qla2xxx 0000:18:00.0: Mailbox command timeout occurred. Scheduling ISP abort. eeh_busy: 0x0
>>        [ 1167.218490] qla2xxx 0000:18:00.0: Unable to burst-read optrom segment (100/7ff50400/18389b000).
>>        [ 1167.218496] qla2xxx 0000:18:00.0: Reverting to slow-read.
>>        [ 1197.174623] qla2xxx 0000:18:00.0: Unable to burst-read optrom segment (100/7ff50000/18389b000).
>>        [ 1197.174632] qla2xxx 0000:18:00.0: Reverting to slow-read.
>>        [ 1197.190613] qla2xxx 0000:18:00.0: Configure NVRAM parameters...
>>        [ 1197.198582] qla2xxx 0000:18:00.0: Verifying loaded RISC code...
>>        [ 1227.142951] qla2xxx 0000:18:00.0: Failed mailbox send register test
>>        [ 1227.142959] qla2xxx 0000:18:00.0: Failed to initialize adapter

please check attached patch, it should fix that configuration.

Thanks

Yinghai

[-- Attachment #2: fix_intr_remapping.patch --]
[-- Type: text/x-patch, Size: 1191 bytes --]

---
 drivers/iommu/dmar.c |   11 +++++++++++
 include/linux/dmar.h |    4 +---
 2 files changed, 12 insertions(+), 3 deletions(-)

Index: linux-2.6/include/linux/dmar.h
===================================================================
--- linux-2.6.orig/include/linux/dmar.h
+++ linux-2.6/include/linux/dmar.h
@@ -232,9 +232,7 @@ struct dmar_atsr_unit {
 #define for_each_atsr_unit(atsr) \
 	list_for_each_entry(atsr, &dmar_atsr_units, list)
 
-extern int intel_iommu_init(void);
-#else /* !CONFIG_DMAR: */
-static inline int intel_iommu_init(void) { return -ENODEV; }
 #endif /* CONFIG_DMAR */
+extern int intel_iommu_init(void);
 
 #endif /* __DMAR_H__ */
Index: linux-2.6/drivers/iommu/dmar.c
===================================================================
--- linux-2.6.orig/drivers/iommu/dmar.c
+++ linux-2.6/drivers/iommu/dmar.c
@@ -722,6 +722,17 @@ int __init detect_intel_iommu(void)
 	return ret ? 1 : -ENODEV;
 }
 
+#ifndef CONFIG_DMAR
+int __init intel_iommu_init(void)
+{
+        if (dmar_table_init()) {
+                return  -ENODEV;
+        }
+
+        dmar_dev_scope_init();
+        return  -ENODEV;
+}
+#endif
 
 int alloc_iommu(struct dmar_drhd_unit *drhd)
 {

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

* Re: CONFIG_INTR_REMAP and CONFIG_DMAR dependencies?
  2011-07-18 23:16   ` Yinghai Lu
@ 2011-07-18 23:50     ` Andrew Vasquez
  2011-07-19  3:18       ` Yinghai Lu
  2011-07-19  4:50     ` Suresh Siddha
  1 sibling, 1 reply; 9+ messages in thread
From: Andrew Vasquez @ 2011-07-18 23:50 UTC (permalink / raw)
  To: Yinghai Lu
  Cc: linux scsi dev, linux pci, suresh.b.siddha@intel.com,
	hpa@linux.intel.com, Avik Shau, Giridhar Malavali

On Mon, 18 Jul 2011, Yinghai Lu wrote:

> On Mon, Jul 18, 2011 at 2:32 PM, Yinghai Lu <yinghai@kernel.org> wrote:
> > On Mon, Jul 18, 2011 at 2:16 PM, Andrew Vasquez
> > <andrew.vasquez@qlogic.com> wrote:
> >> Suresh,
> >>
> >> Any thoughts/ideas on this? ?Could you help with the INTR-REMAP
> >> messages?
> >>
> >> Thanks,
> >> Andrew Vasquez
> >>
> >> ----
> >>
> >> All,
> >>
> >> We've seen a few reports logged with upstream kernels where qla2xxx is
> >> unable to initialize HW due to what appears to be a lack of
> >> interrupt routing:
> >>
> >> ? ? ? ?[ 1137.271156] qla2xxx 0000:18:00.0: Found an ISP2532, irq 52, iobase 0xffffc90000028000
> >> ? ? ? ?[ 1137.271438] qla2xxx 0000:18:00.0: irq 96 for MSI/MSI-X
> >> ? ? ? ?[ 1137.271447] qla2xxx 0000:18:00.0: irq 97 for MSI/MSI-X
> >> ? ? ? ?[ 1137.271706] qla2xxx 0000:18:00.0: Configuring PCI space...
> >> ? ? ? ?[ 1137.271725] qla2xxx 0000:18:00.0: setting latency timer to 64
> >> ? ? ? ?[ 1137.271732] qla2xxx 0000:18:00.0: enabling Mem-Wr-Inval
> >> ? ? ? ?[ 1137.278705] DRHD: handling fault status reg 2
> >> ? ? ? ?[ 1137.278715] INTR-REMAP: Request device [[18:00.0] fault index 20
> >> ? ? ? ?[ 1137.278717] INTR-REMAP:[fault reason 34] Present field in the IRTE entry is clear
> >> ? ? ? ?[ 1159.389099] qla2xxx 0000:0c:07.0: Cable is unplugged...
> >> ? ? ? ?[ 1167.218478] qla2xxx 0000:18:00.0: Mailbox command timeout occurred. Scheduling ISP abort. eeh_busy: 0x0
> >> ? ? ? ?[ 1167.218490] qla2xxx 0000:18:00.0: Unable to burst-read optrom segment (100/7ff50400/18389b000).
> >> ? ? ? ?[ 1167.218496] qla2xxx 0000:18:00.0: Reverting to slow-read.
> >> ? ? ? ?[ 1197.174623] qla2xxx 0000:18:00.0: Unable to burst-read optrom segment (100/7ff50000/18389b000).
> >> ? ? ? ?[ 1197.174632] qla2xxx 0000:18:00.0: Reverting to slow-read.
> >> ? ? ? ?[ 1197.190613] qla2xxx 0000:18:00.0: Configure NVRAM parameters...
> >> ? ? ? ?[ 1197.198582] qla2xxx 0000:18:00.0: Verifying loaded RISC code...
> >> ? ? ? ?[ 1227.142951] qla2xxx 0000:18:00.0: Failed mailbox send register test
> >> ? ? ? ?[ 1227.142959] qla2xxx 0000:18:00.0: Failed to initialize adapter
> 
> please check attached patch, it should fix that configuration.
> 
> Thanks

Yinghai,

Yes, this patch seems to help. With CONFIG_INTR_REMAP=y,
CONFIG_DMAR=n, and this patch, I no longer see the
'DRHD...INTR-REMAP...' warnings, and hardware interrupts appear to be
routing normally.

One small fixup I had to do was change the path for dmar.c in your
patch file.  On upstream kernels dmar.c is in drivers/pci/, not
drivers/iommu/.

Let me know if there's something else you need from our side.  Hope
this patch makes 3.0.

Thanks, AV

> ---
>  drivers/iommu/dmar.c |   11 +++++++++++
>  include/linux/dmar.h |    4 +---
>  2 files changed, 12 insertions(+), 3 deletions(-)
> 
> Index: linux-2.6/include/linux/dmar.h
> ===================================================================
> --- linux-2.6.orig/include/linux/dmar.h
> +++ linux-2.6/include/linux/dmar.h
> @@ -232,9 +232,7 @@ struct dmar_atsr_unit {
>  #define for_each_atsr_unit(atsr) \
>  	list_for_each_entry(atsr, &dmar_atsr_units, list)
>  
> -extern int intel_iommu_init(void);
> -#else /* !CONFIG_DMAR: */
> -static inline int intel_iommu_init(void) { return -ENODEV; }
>  #endif /* CONFIG_DMAR */
> +extern int intel_iommu_init(void);
>  
>  #endif /* __DMAR_H__ */
> Index: linux-2.6/drivers/iommu/dmar.c
> ===================================================================
> --- linux-2.6.orig/drivers/iommu/dmar.c
> +++ linux-2.6/drivers/iommu/dmar.c
> @@ -722,6 +722,17 @@ int __init detect_intel_iommu(void)
>  	return ret ? 1 : -ENODEV;
>  }
>  
> +#ifndef CONFIG_DMAR
> +int __init intel_iommu_init(void)
> +{
> +        if (dmar_table_init()) {
> +                return  -ENODEV;
> +        }
> +
> +        dmar_dev_scope_init();
> +        return  -ENODEV;
> +}
> +#endif
>  
>  int alloc_iommu(struct dmar_drhd_unit *drhd)
>  {

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

* Re: CONFIG_INTR_REMAP and CONFIG_DMAR dependencies?
  2011-07-18 23:50     ` Andrew Vasquez
@ 2011-07-19  3:18       ` Yinghai Lu
  2011-07-21  9:10         ` Ingo Molnar
  0 siblings, 1 reply; 9+ messages in thread
From: Yinghai Lu @ 2011-07-19  3:18 UTC (permalink / raw)
  To: Andrew Vasquez, Ingo Molnar, Barnes, Jesse, H. Peter Anvin
  Cc: linux scsi dev, linux pci, suresh.b.siddha@intel.com,
	hpa@linux.intel.com, Avik Shau, Giridhar Malavali

On Mon, Jul 18, 2011 at 4:50 PM, Andrew Vasquez
<andrew.vasquez@qlogic.com> wrote:
> On Mon, 18 Jul 2011, Yinghai Lu wrote:
>
>> On Mon, Jul 18, 2011 at 2:32 PM, Yinghai Lu <yinghai@kernel.org> wrote:
>> > On Mon, Jul 18, 2011 at 2:16 PM, Andrew Vasquez
>> > <andrew.vasquez@qlogic.com> wrote:
>> >> Suresh,
>> >>
>> >> Any thoughts/ideas on this? ?Could you help with the INTR-REMAP
>> >> messages?
>> >>
>> >> Thanks,
>> >> Andrew Vasquez
>> >>
>> >> ----
>> >>
>> >> All,
>> >>
>> >> We've seen a few reports logged with upstream kernels where qla2xxx is
>> >> unable to initialize HW due to what appears to be a lack of
>> >> interrupt routing:
>> >>
>> >> ? ? ? ?[ 1137.271156] qla2xxx 0000:18:00.0: Found an ISP2532, irq 52, iobase 0xffffc90000028000
>> >> ? ? ? ?[ 1137.271438] qla2xxx 0000:18:00.0: irq 96 for MSI/MSI-X
>> >> ? ? ? ?[ 1137.271447] qla2xxx 0000:18:00.0: irq 97 for MSI/MSI-X
>> >> ? ? ? ?[ 1137.271706] qla2xxx 0000:18:00.0: Configuring PCI space...
>> >> ? ? ? ?[ 1137.271725] qla2xxx 0000:18:00.0: setting latency timer to 64
>> >> ? ? ? ?[ 1137.271732] qla2xxx 0000:18:00.0: enabling Mem-Wr-Inval
>> >> ? ? ? ?[ 1137.278705] DRHD: handling fault status reg 2
>> >> ? ? ? ?[ 1137.278715] INTR-REMAP: Request device [[18:00.0] fault index 20
>> >> ? ? ? ?[ 1137.278717] INTR-REMAP:[fault reason 34] Present field in the IRTE entry is clear
>> >> ? ? ? ?[ 1159.389099] qla2xxx 0000:0c:07.0: Cable is unplugged...
>> >> ? ? ? ?[ 1167.218478] qla2xxx 0000:18:00.0: Mailbox command timeout occurred. Scheduling ISP abort. eeh_busy: 0x0
>> >> ? ? ? ?[ 1167.218490] qla2xxx 0000:18:00.0: Unable to burst-read optrom segment (100/7ff50400/18389b000).
>> >> ? ? ? ?[ 1167.218496] qla2xxx 0000:18:00.0: Reverting to slow-read.
>> >> ? ? ? ?[ 1197.174623] qla2xxx 0000:18:00.0: Unable to burst-read optrom segment (100/7ff50000/18389b000).
>> >> ? ? ? ?[ 1197.174632] qla2xxx 0000:18:00.0: Reverting to slow-read.
>> >> ? ? ? ?[ 1197.190613] qla2xxx 0000:18:00.0: Configure NVRAM parameters...
>> >> ? ? ? ?[ 1197.198582] qla2xxx 0000:18:00.0: Verifying loaded RISC code...
>> >> ? ? ? ?[ 1227.142951] qla2xxx 0000:18:00.0: Failed mailbox send register test
>> >> ? ? ? ?[ 1227.142959] qla2xxx 0000:18:00.0: Failed to initialize adapter
>>
>> please check attached patch, it should fix that configuration.
>>
>> Thanks
>
> Yinghai,
>
> Yes, this patch seems to help. With CONFIG_INTR_REMAP=y,
> CONFIG_DMAR=n, and this patch, I no longer see the
> 'DRHD...INTR-REMAP...' warnings, and hardware interrupts appear to be
> routing normally.
>
> One small fixup I had to do was change the path for dmar.c in your
> patch file.  On upstream kernels dmar.c is in drivers/pci/, not
> drivers/iommu/.

in -tip, those iommu code already get moved to drivers/iommu/

>
> Let me know if there's something else you need from our side.  Hope
> this patch makes 3.0.

Not sure. should be for 3.1 instead.

Thanks

>
> Thanks, AV
>
>> ---
>>  drivers/iommu/dmar.c |   11 +++++++++++
>>  include/linux/dmar.h |    4 +---
>>  2 files changed, 12 insertions(+), 3 deletions(-)
>>
>> Index: linux-2.6/include/linux/dmar.h
>> ===================================================================
>> --- linux-2.6.orig/include/linux/dmar.h
>> +++ linux-2.6/include/linux/dmar.h
>> @@ -232,9 +232,7 @@ struct dmar_atsr_unit {
>>  #define for_each_atsr_unit(atsr) \
>>       list_for_each_entry(atsr, &dmar_atsr_units, list)
>>
>> -extern int intel_iommu_init(void);
>> -#else /* !CONFIG_DMAR: */
>> -static inline int intel_iommu_init(void) { return -ENODEV; }
>>  #endif /* CONFIG_DMAR */
>> +extern int intel_iommu_init(void);
>>
>>  #endif /* __DMAR_H__ */
>> Index: linux-2.6/drivers/iommu/dmar.c
>> ===================================================================
>> --- linux-2.6.orig/drivers/iommu/dmar.c
>> +++ linux-2.6/drivers/iommu/dmar.c
>> @@ -722,6 +722,17 @@ int __init detect_intel_iommu(void)
>>       return ret ? 1 : -ENODEV;
>>  }
>>
>> +#ifndef CONFIG_DMAR
>> +int __init intel_iommu_init(void)
>> +{
>> +        if (dmar_table_init()) {
>> +                return  -ENODEV;
>> +        }
>> +
>> +        dmar_dev_scope_init();
>> +        return  -ENODEV;
>> +}
>> +#endif
>>
>>  int alloc_iommu(struct dmar_drhd_unit *drhd)
>>  {
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: CONFIG_INTR_REMAP and CONFIG_DMAR dependencies?
  2011-07-18 23:16   ` Yinghai Lu
  2011-07-18 23:50     ` Andrew Vasquez
@ 2011-07-19  4:50     ` Suresh Siddha
  1 sibling, 0 replies; 9+ messages in thread
From: Suresh Siddha @ 2011-07-19  4:50 UTC (permalink / raw)
  To: Yinghai Lu
  Cc: Andrew Vasquez, linux scsi dev, linux pci, hpa@linux.intel.com,
	Avik Shau, Giridhar Malavali

On Mon, 2011-07-18 at 16:16 -0700, Yinghai Lu wrote:
> ---
>  drivers/iommu/dmar.c |   11 +++++++++++
>  include/linux/dmar.h |    4 +---
>  2 files changed, 12 insertions(+), 3 deletions(-)

Yinghai, Thanks for looking at this.

This issue is caused by this commit:

commit 9d5ce73a64be2be8112147a3e0b551ad9cd1247b
Author: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Date:   Tue Nov 10 19:46:16 2009 +0900

    x86: intel-iommu: Convert detect_intel_iommu to use iommu_init hook

So this is a regression. Also,

> 
> Index: linux-2.6/include/linux/dmar.h
> ===================================================================
> --- linux-2.6.orig/include/linux/dmar.h
> +++ linux-2.6/include/linux/dmar.h
> @@ -232,9 +232,7 @@ struct dmar_atsr_unit {
>  #define for_each_atsr_unit(atsr) \
>         list_for_each_entry(atsr, &dmar_atsr_units, list)
>  
> -extern int intel_iommu_init(void);
> -#else /* !CONFIG_DMAR: */
> -static inline int intel_iommu_init(void) { return -ENODEV; }
>  #endif /* CONFIG_DMAR */
> +extern int intel_iommu_init(void);
>  
>  #endif /* __DMAR_H__ */
> Index: linux-2.6/drivers/iommu/dmar.c
> ===================================================================
> --- linux-2.6.orig/drivers/iommu/dmar.c
> +++ linux-2.6/drivers/iommu/dmar.c
> @@ -722,6 +722,17 @@ int __init detect_intel_iommu(void)
>         return ret ? 1 : -ENODEV;
>  }
>  
> +#ifndef CONFIG_DMAR
> +int __init intel_iommu_init(void)
> +{
> +        if (dmar_table_init()) {
> +                return  -ENODEV;
> +        }
> +
> +        dmar_dev_scope_init();
> +        return  -ENODEV;

I think this should be return dmar_dev_scope_init();

thanks!

> +}
> +#endif
>  
>  int alloc_iommu(struct dmar_drhd_unit *drhd)
>  { 




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

* Re: CONFIG_INTR_REMAP and CONFIG_DMAR dependencies?
  2011-07-19  3:18       ` Yinghai Lu
@ 2011-07-21  9:10         ` Ingo Molnar
  0 siblings, 0 replies; 9+ messages in thread
From: Ingo Molnar @ 2011-07-21  9:10 UTC (permalink / raw)
  To: Yinghai Lu
  Cc: Andrew Vasquez, Barnes, Jesse, H. Peter Anvin, linux scsi dev,
	linux pci, suresh.b.siddha@intel.com, hpa@linux.intel.com,
	Avik Shau, Giridhar Malavali


* Yinghai Lu <yinghai@kernel.org> wrote:

> > Let me know if there's something else you need from our side.  Hope
> > this patch makes 3.0.
> 
> Not sure. should be for 3.1 instead.

Yes - the bug was introduced in 2009 and the 3.0 will be later today.

Also, the fix should be done in a (much) cleaner fashion, 
restructuring the whole DMAR mess if needed.

Thanks,

	Ingo

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

end of thread, other threads:[~2011-07-21  9:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-18 21:16 CONFIG_INTR_REMAP and CONFIG_DMAR dependencies? Andrew Vasquez
2011-07-18 21:32 ` Yinghai Lu
2011-07-18 23:16   ` Yinghai Lu
2011-07-18 23:50     ` Andrew Vasquez
2011-07-19  3:18       ` Yinghai Lu
2011-07-21  9:10         ` Ingo Molnar
2011-07-19  4:50     ` Suresh Siddha
2011-07-18 22:53 ` Shyam_Iyer
  -- strict thread matches above, loose matches on Subject: below --
2011-07-12 16:47 Andrew Vasquez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox