Bug 206313 - kernel 5.5 breaks iommu
Summary: kernel 5.5 breaks iommu
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: IOMMU (show other bugs)
Hardware: All Linux
: P1 high
Assignee: drivers_iommu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-26 07:22 UTC by chriscjsus
Modified: 2020-03-15 10:01 UTC (History)
7 users (show)

See Also:
Kernel Version: 5.5
Tree: Mainline
Regression: No


Attachments

Description chriscjsus 2020-01-26 07:22:41 UTC
**From kernel logs before 5.5:**

Jan 25 23:28:55 archlinux kernel: ACPI: DMAR 0x00000000373825F0 0000A8 (v01 INTEL  SKL      00000001 INTL 00000001)
Jan 25 23:28:55 archlinux kernel: DMAR: IOMMU enabled
Jan 25 23:28:55 archlinux kernel: DMAR: Disable GFX device mapping
Jan 25 23:28:55 archlinux kernel: DMAR: Host address width 39
Jan 25 23:28:55 archlinux kernel: DMAR: DRHD base: 0x000000fed90000 flags: 0x0
Jan 25 23:28:55 archlinux kernel: DMAR: dmar0: reg_base_addr fed90000 ver 1:0 cap 1c0000c40660462 ecap 7e3ff0501e
Jan 25 23:28:55 archlinux kernel: DMAR: DRHD base: 0x000000fed91000 flags: 0x1
Jan 25 23:28:55 archlinux kernel: DMAR: dmar1: reg_base_addr fed91000 ver 1:0 cap d2008c40660462 ecap f050da
Jan 25 23:28:55 archlinux kernel: DMAR: RMRR base: 0x000000370b5000 end: 0x000000370d4fff
Jan 25 23:28:55 archlinux kernel: DMAR: RMRR base: 0x00000038800000 end: 0x0000003cffffff
Jan 25 23:28:55 archlinux kernel: DMAR-IR: IOAPIC id 2 under DRHD base  0xfed91000 IOMMU 1
Jan 25 23:28:55 archlinux kernel: DMAR-IR: HPET id 0 under DRHD base 0xfed91000
Jan 25 23:28:55 archlinux kernel: DMAR-IR: Queued invalidation will be enabled to support x2apic and Intr-remapping.
Jan 25 23:28:55 archlinux kernel: DMAR-IR: Enabled IRQ remapping in x2apic mode
Jan 25 23:28:55 archlinux kernel: DMAR: No ATSR found
Jan 25 23:28:55 archlinux kernel: DMAR: dmar1: Using Queued invalidation
Jan 25 23:28:55 archlinux kernel: pci 0000:01:00.0: DMAR: Device uses a private identity domain.
Jan 25 23:28:55 archlinux kernel: DMAR: Intel(R) Virtualization Technology for Directed I/O

**From kernel 5.5 log:**

Jan 25 21:26:46 archlinux kernel: ACPI: DMAR 0x00000000373825F0 0000A8 (v01 INTEL  SKL      00000001 INTL 00000001)
Jan 25 21:26:46 archlinux kernel: DMAR: IOMMU enabled
Jan 25 21:26:46 archlinux kernel: DMAR: Host address width 39
Jan 25 21:26:46 archlinux kernel: DMAR: DRHD base: 0x000000fed90000 flags: 0x0
Jan 25 21:26:46 archlinux kernel: DMAR: dmar0: reg_base_addr fed90000 ver 1:0 cap 1c0000c40660462 ecap 7e3ff0501e
Jan 25 21:26:46 archlinux kernel: DMAR: DRHD base: 0x000000fed91000 flags: 0x1
Jan 25 21:26:46 archlinux kernel: DMAR: dmar1: reg_base_addr fed91000 ver 1:0 cap d2008c40660462 ecap f050da
Jan 25 21:26:46 archlinux kernel: DMAR: RMRR base: 0x000000370b5000 end: 0x000000370d4fff
Jan 25 21:26:46 archlinux kernel: DMAR: RMRR base: 0x00000038800000 end: 0x0000003cffffff
Jan 25 21:26:46 archlinux kernel: DMAR: [Firmware Bug]: No firmware reserved region can cover this RMRR [0x0000000038800000-0x000000003cffffff], contact BIOS vendor for fixes
Jan 25 21:26:46 archlinux kernel: DMAR: Parse DMAR table failure.

---------------
I have found that reverting commit f036c7fa0ab60b7ea47560c32c78e435eb1cd214 (iommu/vt-d: Check VT-d RMRR region in BIOS is reported as reserved) fixes this.

I had no issues at all with iommu on kernels before 5.5. 

Is there a kernel or module parameter that would fix this without the above revert?
Comment 1 chriscjsus 2020-01-27 04:36:12 UTC
Tried kernel 5.5 release.  Same results.
Revert f036c7fa0ab60b7ea47560c32c78e435eb1cd214 to fix.
Comment 2 nutodafozo 2020-02-04 16:59:51 UTC
intel cpus only?
Comment 3 romualduimi 2020-02-09 19:09:24 UTC
I get the same DMAR error:

DMAR: Host address width 39
kernel: DMAR: DRHD base: 0x000000fed90000 flags: 0x0
kernel: DMAR: dmar0: reg_base_addr fed90000 ver 1:0 cap 1c0000c40660462 ecap 7e1ff0505e
kernel: DMAR: DRHD base: 0x000000fed91000 flags: 0x1
kernel: DMAR: dmar1: reg_base_addr fed91000 ver 1:0 cap d2008c20660462 ecap f010da
kernel: DMAR: RMRR base: 0x0000009bcf2000 end: 0x0000009bd08fff
kernel: DMAR: RMRR base: 0x0000009d800000 end: 0x0000009fffffff
kernel: DMAR: [Firmware Bug]: No firmware reserved region can cover this RMRR [0x000000009d800000-0x000000009fffffff], contact BIOS vendor for fixes
kernel: DMAR: Parse DMAR table failure.

$uname -a
Linux <...> 5.5.2-arch1-1 #1 SMP PREEMPT Tue, 04 Feb 2020 18:56:18 +0000 x86_64 GNU/Linux

System: ThinkPad T450s
OS: Arch Linux
Comment 4 ulteq 2020-02-18 08:50:45 UTC
Same issue: Intel Core i9-7960X, ASUS WS X299 SAGE, NVIDIA Titan X (Pascal)
Comment 5 nutodafozo 2020-02-25 16:46:42 UTC
5.5.6 should fix it
      iommu/vt-d: Mark firmware tainted if RMRR fails sanity check
Comment 6 Jeronimo 2020-03-06 13:21:50 UTC
Same issue: Intel Core i5-5200U, Dell Inspiron 7348
$ uname -a
Linux jeronimo 5.5.8-zen1-1-zen #1 ZEN SMP PREEMPT Fri, 06 Mar 2020 00:57:35 +0000 x86_64 GNU/Linux

Also issue have linux-kernel, linux-clear.
linux-lts 5.4.24-1 have no this issue
Comment 7 faust6 2020-03-15 10:01:03 UTC
[root@server etc]# uname -a
Linux server 5.5.9-arch1-2 #1 SMP PREEMPT Thu, 12 Mar 2020 23:01:33 +0000 x86_64 GNU/Linux

мар 15 08:34:27 server kernel: DMAR: Host address width 39
мар 15 08:34:27 server kernel: DMAR: DRHD base: 0x000000fed90000 flags: 0x0
мар 15 08:34:27 server kernel: DMAR: dmar0: reg_base_addr fed90000 ver 1:0 cap 1c0000c40660462 ecap 19e2ff0505e
мар 15 08:34:27 server kernel: DMAR: DRHD base: 0x000000fed91000 flags: 0x1
мар 15 08:34:27 server kernel: DMAR: dmar1: reg_base_addr fed91000 ver 1:0 cap d2008c40660462 ecap f050da
мар 15 08:34:27 server kernel: DMAR: RMRR base: 0x0000008c955000 end: 0x0000008c974fff
мар 15 08:34:27 server kernel: DMAR: RMRR base: 0x0000008d800000 end: 0x0000008fffffff
мар 15 08:34:27 server kernel: DMAR: [Firmware Bug]: No firmware reserved region can cover this RMRR [0x000000008d800000-0x000000008fffffff], contact BIOS vendor for fixes
мар 15 08:34:27 server kernel: ------------[ cut here ]------------
мар 15 08:34:27 server kernel: Your BIOS is broken; bad RMRR [0x000000008d800000-0x000000008fffffff]
                                  BIOS vendor: American Megatrends Inc.; Ver: P7.00; Product Version: To Be Filled By O.E.M.
мар 15 08:34:27 server kernel: WARNING: CPU: 0 PID: 0 at drivers/iommu/intel-iommu.c:4333 dmar_parse_one_rmrr+0x7d/0x10d
мар 15 08:34:27 server kernel: Modules linked in:
мар 15 08:34:27 server kernel: CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.5.9-arch1-2 #1
мар 15 08:34:27 server kernel: Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./H110M-ITX, BIOS P7.00 10/27/2016
мар 15 08:34:27 server kernel: RIP: 0010:dmar_parse_one_rmrr+0x7d/0x10d
мар 15 08:34:27 server kernel: Code: bf 01 00 00 00 48 89 c5 e8 09 e3 db fe 48 8b 53 10 48 8b 73 08 4d 89 e1 48 89 c1 49 89 e8 48 c7 c7 98 ba 17 97 e8 5e 03 70 fe <0f> 0b 48 8b 3d 13 a>
мар 15 08:34:27 server kernel: RSP: 0000:ffffffff97403e08 EFLAGS: 00010286
мар 15 08:34:27 server kernel: RAX: 0000000000000000 RBX: ffffa0618000d148 RCX: 0000000000000000
мар 15 08:34:27 server kernel: RDX: 0000000000000002 RSI: 0000000000000086 RDI: 00000000ffffffff
мар 15 08:34:27 server kernel: RBP: ffffffff97e0001c R08: 00000000000000fb R09: 0000000000000004
мар 15 08:34:27 server kernel: R10: 0000000000000000 R11: 0000000000000001 R12: ffffffff97e00060
мар 15 08:34:27 server kernel: R13: ffffffff97403e58 R14: 000000007f0424a8 R15: 0000000000000001
мар 15 08:34:27 server kernel: FS:  0000000000000000(0000) GS:ffff9aeb26c00000(0000) knlGS:0000000000000000
мар 15 08:34:27 server kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
мар 15 08:34:27 server kernel: CR2: ffff9aea20c01000 CR3: 000000016020a001 CR4: 00000000000606b0
мар 15 08:34:27 server kernel: Call Trace:
мар 15 08:34:27 server kernel:  dmar_walk_remapping_entries+0x76/0x120
мар 15 08:34:27 server kernel:  dmar_table_init+0xce/0x15e
мар 15 08:34:27 server kernel:  ? dmar_free_dev_scope+0x70/0x70
мар 15 08:34:27 server kernel:  ? intel_iommu_setup+0x20b/0x20b
мар 15 08:34:27 server kernel:  ? iommu_resume+0x1b0/0x1b0
мар 15 08:34:27 server kernel:  ? amd_iommu_bind_pasid+0x200/0x200
мар 15 08:34:27 server kernel:  ? amd_iommu_v2_init+0x6d/0x6d
мар 15 08:34:27 server kernel:  intel_prepare_irq_remapping+0x3d/0x227
мар 15 08:34:27 server kernel:  irq_remapping_prepare+0x1d/0x5f
мар 15 08:34:27 server kernel:  enable_IR_x2apic+0x21/0x188
мар 15 08:34:27 server kernel:  default_setup_apic_routing+0x12/0x6f
мар 15 08:34:27 server kernel:  apic_intr_mode_init+0xc9/0xec
мар 15 08:34:27 server kernel:  x86_late_time_init+0x20/0x25
мар 15 08:34:27 server kernel:  start_kernel+0x4cd/0x586
мар 15 08:34:27 server kernel:  secondary_startup_64+0xb6/0xc0
мар 15 08:34:27 server kernel: ---[ end trace c02d5e3ae1b9fb7d ]---
мар 15 08:34:27 server kernel: DMAR-IR: IOAPIC id 2 under DRHD base  0xfed91000 IOMMU 1
мар 15 08:34:27 server kernel: DMAR-IR: HPET id 0 under DRHD base 0xfed91000
мар 15 08:34:27 server kernel: DMAR-IR: x2apic is disabled because BIOS sets x2apic opt out bit.
мар 15 08:34:27 server kernel: DMAR-IR: Use 'intremap=no_x2apic_optout' to override the BIOS setting.
мар 15 08:34:27 server kernel: DMAR-IR: Enabled IRQ remapping in xapic mode

Note You need to log in before you can comment on or make changes to this bug.