lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 05 Mar 2013 16:03:14 +0100
From:	Gaudenz Steinlin <gaudenz@...iologie.ch>
To:	jyli@...vell.com, iommu@...ts.linux-foundation.org
Cc:	linux-kernel@...r.kernel.org, Shun Fu <fushun@...vell.com>
Subject: Marvell 88NV9143 in mini-PCIe not working with intel_iommu=on


[ Sending this to the MVUMI driver authors and the IOMMU list as I can't
tell which part is at fault. ]

Hi

I have a Super Talent CoreStore MV 64GB mini-PCIe SSD in my ThinkPad
X200. The SSD works fine when booting with intel_iommu=off, but not if I
enable the IOMMU. This is a real PCI device with a Marvel 88NV9143
controller on it (mvumi kernel module), not one of the newer mSATA
devices in a mini-PCI form factor.

If I boot with the IOMMU enabled, early in the boot the system blocks for
a few seconds and then the mvumi driver reports a "failed handshake"
(see below). In this case no scsi device for the SSD is available. With
the IOMMU disabled everything works as expected.

The logs below are for version 3.9.0-rc1. Just to be sure that the
problem is still present in the latest kernel. I'm usually running a
Debian 3.2.35 kernel, which has the same problem.

Here are the relevant bits of dmesg output for the two cases. Just in
case I missed something relevant I also attached the full dmesg output
to this mail. The lspci information is further down. Please tell me if
you need additional information or if you have something else I should
try.

dmesg mit intel_iommu=on (non-working):
[    0.000000] Linux version 3.9.0-rc1 (gaudenz@...eor) (gcc version 4.7.2 (Debian 4.7.2-5) ) #7 SMP Tue Mar 5 12:31:37 CET 2013
[    0.000000] Command line: BOOT_IMAGE=/vmlinuz-3.9.0-rc1 root=/dev/mapper/main-root ro resume=/dev/main/swap video=i915:modeset=1 acpi_osi=Linux intel_iommu=on splash quiet
[ ... ]
[    0.000000] Intel-IOMMU: enabled
[ ... ]
[    0.024087] dmar: Host address width 36
[    0.024090] dmar: DRHD base: 0x000000feb03000 flags: 0x0
[    0.024098] dmar: IOMMU 0: reg_base_addr feb03000 ver 1:0 cap c9008020e30260 ecap 1000
[    0.024099] dmar: DRHD base: 0x000000feb01000 flags: 0x0
[    0.024105] dmar: IOMMU 1: reg_base_addr feb01000 ver 1:0 cap c0000020630260 ecap 1000
[    0.024106] dmar: DRHD base: 0x000000feb00000 flags: 0x0
[    0.024111] dmar: IOMMU 2: reg_base_addr feb00000 ver 1:0 cap c0000020630270 ecap 1000
[    0.024113] dmar: DRHD base: 0x000000feb02000 flags: 0x1
[    0.024118] dmar: IOMMU 3: reg_base_addr feb02000 ver 1:0 cap c9008020630260 ecap 1000
[    0.024120] dmar: RMRR base: 0x000000f2925c00 end: 0x000000f29263ff
[    0.024122] dmar: RMRR base: 0x000000bdc00000 end: 0x000000bfffffff
[ ... ]
[    0.148516] DMAR: Forcing write-buffer flush capability
[    0.148517] DMAR: Disabling IOMMU for graphics on this chipset
[ ... ]
[    4.017463] DMAR: No ATSR found
[    4.017527] IOMMU 2 0xfeb00000: using Register based invalidation
[    4.017529] IOMMU 0 0xfeb03000: using Register based invalidation
[    4.017530] IOMMU 3 0xfeb02000: using Register based invalidation
[    4.017533] IOMMU: Setting RMRR:
[    4.017549] IOMMU: Setting identity map for device 0000:00:1d.0 [0xf2925c00 - 0xf29263ff]
[    4.017575] IOMMU: Setting identity map for device 0000:00:1d.1 [0xf2925c00 - 0xf29263ff]
[    4.017596] IOMMU: Setting identity map for device 0000:00:1d.2 [0xf2925c00 - 0xf29263ff]
[    4.017618] IOMMU: Setting identity map for device 0000:00:1d.7 [0xf2925c00 - 0xf29263ff]
[    4.017638] IOMMU: Setting identity map for device 0000:00:1a.0 [0xf2925c00 - 0xf29263ff]
[    4.017657] IOMMU: Setting identity map for device 0000:00:1a.1 [0xf2925c00 - 0xf29263ff]
[    4.017677] IOMMU: Setting identity map for device 0000:00:1a.2 [0xf2925c00 - 0xf29263ff]
[    4.017697] IOMMU: Setting identity map for device 0000:00:1a.7 [0xf2925c00 - 0xf29263ff]
[    4.017710] IOMMU: Prepare 0-16MiB unity mapping for LPC
[    4.017719] IOMMU: Setting identity map for device 0000:00:1f.0 [0x0 - 0xffffff]
[ ... ]
[    4.342079] dmar: DRHD: handling fault status reg 2
[    4.342132] dmar: DMAR:[DMA Read] Request device [02:00.0] fault addr fffff000 
[    4.342132] DMAR:[fault reason 02] Present bit in context entry is clear
[ ... ]
[   34.344078] mvumi 0000:02:00.1: no handshake response at state 0x2.
[   34.344115] mvumi 0000:02:00.1: isr : global=0x0,status=0x0.
[   34.344146] mvumi 0000:02:00.1: handshake failed at state 0x2.
[   34.344266] mvumi: probe of 0000:02:00.1 failed with error -22

dmesg mit intel_iommu=off (working):
[    0.000000] Linux version 3.9.0-rc1 (gaudenz@...eor) (gcc version 4.7.2 (Debian 4.7.2-5) ) #7 SMP Tue Mar 5 12:31:37 CET 2013
[    0.000000] Command line: BOOT_IMAGE=/vmlinuz-3.9.0-rc1 root=/dev/mapper/main-root ro resume=/dev/main/swap video=i915:modeset=1 acpi_osi=Linux intel_iommu=off splash quiet
[ ... ]
[    0.024088] dmar: Host address width 36
[    0.024091] dmar: DRHD base: 0x000000feb03000 flags: 0x0
[    0.024099] dmar: IOMMU 0: reg_base_addr feb03000 ver 1:0 cap c9008020e30260 ecap 1000
[    0.024101] dmar: DRHD base: 0x000000feb01000 flags: 0x0
[    0.024106] dmar: IOMMU 1: reg_base_addr feb01000 ver 1:0 cap c0000020630260 ecap 1000
[    0.024107] dmar: DRHD base: 0x000000feb00000 flags: 0x0
[    0.024113] dmar: IOMMU 2: reg_base_addr feb00000 ver 1:0 cap c0000020630270 ecap 1000
[    0.024114] dmar: DRHD base: 0x000000feb02000 flags: 0x1
[    0.024119] dmar: IOMMU 3: reg_base_addr feb02000 ver 1:0 cap c9008020630260 ecap 1000
[    0.024121] dmar: RMRR base: 0x000000f2925c00 end: 0x000000f29263ff
[    0.024123] dmar: RMRR base: 0x000000bdc00000 end: 0x000000bfffffff
[ ... ]
[    7.680038] scsi 0:0:0:0: Processor         SR64C8MM Flash Console    2037 PQ: 0 ANSI: 3
[    7.680192] scsi 0:0:0:0: Attached scsi generic sg1 type 3
[    7.880035] scsi 0:0:1:0: Direct-Access     SR64C8MM Flash Disk       2037 PQ: 0 ANSI: 3
[    7.880203] sd 0:0:1:0: Attached scsi generic sg2 type 0
[    8.080029] sd 0:0:1:0: [sdb] 104857600 512-byte logical blocks: (53.6 GB/50.0 GiB)
[    8.180025] sd 0:0:1:0: [sdb] Write Protect is off
[    8.180028] sd 0:0:1:0: [sdb] Mode Sense: 17 00 00 00
[    8.380023] sd 0:0:1:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    8.980085]  sdb: sdb1
[    9.480031] sd 0:0:1:0: [sdb] Attached SCSI disk

And the full lspic output for this device:

gaudenz@...eor:~$ sudo lspci -vv -nnq -s 02:
02:00.0 Mass storage controller [01ff]: Marvell Technology Group Ltd. Device [1b4b:91f3]
	Subsystem: Marvell Technology Group Ltd. Device [1b4b:9143]
	Physical Slot: 0
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 64 bytes
	Interrupt: pin A routed to IRQ 11
	Region 0: I/O ports at 2020 [size=8]
	Region 1: I/O ports at 2014 [size=4]
	Region 2: I/O ports at 2018 [size=8]
	Region 3: I/O ports at 2010 [size=4]
	Region 4: I/O ports at 2000 [size=16]
	Region 5: Memory at f2500000 (32-bit, non-prefetchable) [size=8K]
	[virtual] Expansion ROM at f2510000 [disabled] [size=64K]
	Capabilities: [50] Power Management version 3
		Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot+,D3cold-)
		Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [60] MSI: Enable- Count=1/1 Maskable- 64bit+
		Address: 0000000000000000  Data: 0000
	Capabilities: [80] Express (v2) Legacy Endpoint, MSI 00
		DevCap:	MaxPayload 512 bytes, PhantFunc 0, Latency L0s <1us, L1 <8us
			ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
		DevCtl:	Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
			RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-
			MaxPayload 128 bytes, MaxReadReq 512 bytes
		DevSta:	CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr- TransPend-
		LnkCap:	Port #0, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <512ns, L1 <64us
			ClockPM- Surprise- LLActRep- BwNot-
		LnkCtl:	ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
			ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
		LnkSta:	Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
		DevCap2: Completion Timeout: Not Supported, TimeoutDis+
		DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-
		LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-, Selectable De-emphasis: -6dB
			 Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
			 Compliance De-emphasis: -6dB
		LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1-
			 EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
	Capabilities: [100 v1] Advanced Error Reporting
		UESta:	DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
		UEMsk:	DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
		UESvrt:	DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
		CESta:	RxErr+ BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
		CEMsk:	RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
		AERCap:	First Error Pointer: 00, GenCap- CGenEn- ChkCap- ChkEn-
	Capabilities: [140 v1] Virtual Channel
		Caps:	LPEVC=0 RefClk=100ns PATEntryBits=1
		Arb:	Fixed- WRR32- WRR64- WRR128-
		Ctrl:	ArbSelect=Fixed
		Status:	InProgress-
		VC0:	Caps:	PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
			Arb:	Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
			Ctrl:	Enable+ ID=0 ArbSelect=Fixed TC/VC=01
			Status:	NegoPending- InProgress-

02:00.1 Mass storage controller [0180]: Marvell Technology Group Ltd. Device [1b4b:9143] (rev 10)
	Subsystem: Marvell Technology Group Ltd. Device [1b4b:9143]
	Physical Slot: 0
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 64 bytes
	Interrupt: pin A routed to IRQ 16
	Region 0: Memory at f2a00000 (32-bit, prefetchable) [size=1M]
	[virtual] Expansion ROM at f2520000 [disabled] [size=64K]
	Capabilities: [50] Power Management version 3
		Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot+,D3cold-)
		Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [60] MSI: Enable- Count=1/1 Maskable- 64bit+
		Address: 0000000000000000  Data: 0000
	Capabilities: [80] Express (v2) Legacy Endpoint, MSI 00
		DevCap:	MaxPayload 512 bytes, PhantFunc 0, Latency L0s <1us, L1 <8us
			ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
		DevCtl:	Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
			RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-
			MaxPayload 128 bytes, MaxReadReq 512 bytes
		DevSta:	CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr- TransPend-
		LnkCap:	Port #0, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <512ns, L1 <64us
			ClockPM- Surprise- LLActRep- BwNot-
		LnkCtl:	ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
			ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
		LnkSta:	Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
		DevCap2: Completion Timeout: Not Supported, TimeoutDis+
		DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-
		LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-, Selectable De-emphasis: -6dB
			 Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
			 Compliance De-emphasis: -6dB
		LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1-
			 EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
	Capabilities: [100 v1] Advanced Error Reporting
		UESta:	DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
		UEMsk:	DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
		UESvrt:	DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
		CESta:	RxErr+ BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
		CEMsk:	RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
		AERCap:	First Error Pointer: 00, GenCap- CGenEn- ChkCap- ChkEn-
	Kernel driver in use: mvumi

02:00.2 Non-Volatile memory controller [0108]: Marvell Technology Group Ltd. Device [1b4b:91e3] (prog-if 01)
	Subsystem: Marvell Technology Group Ltd. Device [1b4b:9143]
	Physical Slot: 0
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 64 bytes
	Interrupt: pin A routed to IRQ 11
	Region 0: Memory at f2502000 (64-bit, non-prefetchable) [size=8K]
	Region 2: I/O ports at 2028 [size=8]
	[virtual] Expansion ROM at f2530000 [disabled] [size=64K]
	Capabilities: [50] Power Management version 3
		Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
		Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [60] MSI: Enable- Count=1/1 Maskable- 64bit+
		Address: 0000000000000000  Data: 0000
	Capabilities: [80] Express (v2) Legacy Endpoint, MSI 00
		DevCap:	MaxPayload 512 bytes, PhantFunc 0, Latency L0s <1us, L1 <8us
			ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
		DevCtl:	Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
			RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-
			MaxPayload 128 bytes, MaxReadReq 512 bytes
		DevSta:	CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr- TransPend-
		LnkCap:	Port #0, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <512ns, L1 <64us
			ClockPM- Surprise- LLActRep- BwNot-
		LnkCtl:	ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
			ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
		LnkSta:	Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
		DevCap2: Completion Timeout: Not Supported, TimeoutDis+
		DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-
		LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-, Selectable De-emphasis: -6dB
			 Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
			 Compliance De-emphasis: -6dB
		LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1-
			 EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
	Capabilities: [100 v1] Advanced Error Reporting
		UESta:	DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
		UEMsk:	DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
		UESvrt:	DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
		CESta:	RxErr+ BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
		CEMsk:	RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
		AERCap:	First Error Pointer: 00, GenCap- CGenEn- ChkCap- ChkEn-


Thanks for your help!

Gaudenz


View attachment "dmesg_iommu_on.txt" of type "text/plain" (71713 bytes)

View attachment "dmesg_iommu_off.txt" of type "text/plain" (71159 bytes)


-- 
Ever tried. Ever failed. No matter.
Try again. Fail again. Fail better.
~ Samuel Beckett ~

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ