Skip to content

iommu Linux kernel WARNING on every boot #320

@srcshelton

Description

@srcshelton

PCEngines firmware version

Currently v4.19.0.1, but previous firmware releases were also affected.

APU variant

apu2e4

OS and OS Version

Linux apu2e 6.1.4-gentoo #3 SMP Sat Feb 4 14:42:43 GMT 2023 x86_64 AMD GX-412TC SOC AuthenticAMD GNU/Linux

Affected component(s), peripheral(s) or functionality

~20 second boot delay and kernel warning issued.

Brief summary

I have the AMD IOMMU enabled in the BIOS settings.

On every boot with at least every 5.x and 6.x kernel, the boot sequence output reads:

[    1.961190] pci 0000:00:02.2: PCI bridge to [bus 01]
[    1.966873] pci 0000:00:02.2:   bridge window [io  0x1000-0x1fff]
[    1.973677] pci 0000:00:02.2:   bridge window [mem 0xd0000000-0xd00fffff]
[    1.981176] pci 0000:00:02.3: PCI bridge to [bus 02]
[    1.986846] pci 0000:00:02.3:   bridge window [io  0x2000-0x2fff]
[    1.993647] pci 0000:00:02.3:   bridge window [mem 0xd0100000-0xd01fffff]
[    2.001142] pci 0000:00:02.4: PCI bridge to [bus 03]
[    2.006813] pci 0000:00:02.4:   bridge window [io  0x3000-0x3fff]
[    2.013617] pci 0000:00:02.4:   bridge window [mem 0xd0200000-0xd02fffff]
[    2.021141] pci_bus 0000:00: resource 4 [io  0x0000-0x0cf7 window]
[    2.028043] pci_bus 0000:00: resource 5 [io  0x0d00-0xffff window]
[    2.034926] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000dffff]
[    2.041902] pci_bus 0000:00: resource 7 [mem 0xd0000000-0xffffffff]
[    2.048878] pci_bus 0000:01: resource 0 [io  0x1000-0x1fff]
[    2.055161] pci_bus 0000:01: resource 1 [mem 0xd0000000-0xd00fffff]
[    2.062138] pci_bus 0000:02: resource 0 [io  0x2000-0x2fff]
[    2.068420] pci_bus 0000:02: resource 1 [mem 0xd0100000-0xd01fffff]
[    2.075389] pci_bus 0000:03: resource 0 [io  0x3000-0x3fff]
[    2.081669] pci_bus 0000:03: resource 1 [mem 0xd0200000-0xd02fffff]
[    2.089644] pci 0000:00:13.0: PME# does not work under D3, disabling it
[    2.097060] PCI: CLS 64 bytes, default 64
[    2.101816] pci 0000:00:00.2: AMD-Vi: IOMMU performance counters supported
[    2.109567] pci 0000:00:02.0: Adding to iommu group 0
[    2.115390] pci 0000:00:02.2: Adding to iommu group 1
[    2.121200] pci 0000:00:02.3: Adding to iommu group 2
[    2.127017] pci 0000:00:02.4: Adding to iommu group 3
[    2.132841] pci 0000:00:08.0: Adding to iommu group 4
[    2.138634] pci 0000:00:10.0: Adding to iommu group 5
[    2.144447] pci 0000:00:11.0: Adding to iommu group 6
[    2.150253] pci 0000:00:13.0: Adding to iommu group 7
[    2.156077] pci 0000:00:14.0: Adding to iommu group 8
[    2.161864] pci 0000:00:14.3: Adding to iommu group 8
[    2.167654] pci 0000:00:14.7: Adding to iommu group 8
[    2.173508] pci 0000:00:18.0: Adding to iommu group 9
[    2.179316] pci 0000:00:18.1: Adding to iommu group 9
[    2.185109] pci 0000:00:18.2: Adding to iommu group 9
[    2.190897] pci 0000:00:18.3: Adding to iommu group 9
[    2.196686] pci 0000:00:18.4: Adding to iommu group 9
[    2.202480] pci 0000:00:18.5: Adding to iommu group 9
[    2.208280] pci 0000:01:00.0: Adding to iommu group 10
[    2.214186] pci 0000:02:00.0: Adding to iommu group 11
[    2.220076] pci 0000:03:00.0: Adding to iommu group 12
[    2.226180] pci 0000:00:00.2: can't derive routing for PCI INT A
[    2.232897] pci 0000:00:00.2: PCI INT A: no GSI
[    2.238157] pci 0000:00:00.2: AMD-Vi: Found IOMMU cap 0x40
[    2.244349] AMD-Vi: Extended features (0x800290ad2, 0x0): PPR GT IA GA PC GA_vAPIC
[    2.252632] AMD-Vi: Interrupt remapping enabled
[   23.598239] ------------[ cut here ]------------
[   23.603562] WARNING: CPU: 1 PID: 1 at drivers/iommu/amd/init.c:930 enable_iommus_vapic+0x30d/0x370
[   23.613235] Modules linked in:
[   23.616995] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 6.1.4-gentoo #3
[   23.624144] Hardware name: PC Engines apu2/apu2, BIOS v4.19.0.1 01/31/2023
[   23.631720] RIP: 0010:enable_iommus_vapic+0x30d/0x370
[   23.637482] Code: 29 12 8a 4d 89 ec 41 bd e0 00 00 00 48 39 c3 0f 85 2a fe ff ff 80 0d 41 ab ba 00 01 48 c7 c7 0d 35 d0 89 e8 2e 82 b2 ff eb 02 <0f> 0b 65 48 8b 04 25 28 00 00 00 48 3b 44 24 08 75 48 48 83 c4 10
[   23.656937] RSP: 0018:ffffb6d380023b38 EFLAGS: 00010247
[   23.662873] RAX: 000000008449dcdb RBX: ffff9f5f80059800 RCX: 0000000000000001
[   23.670706] RDX: 000000000000272b RSI: 0000000000000001 RDI: 00000000000026fe
[   23.678541] RBP: 0800000000000000 R08: 0000000000000001 R09: 000000098449b5b0
[   23.686376] R10: ffffe5128402fe80 R11: 0000000000000000 R12: 0000000000000000
[   23.694212] R13: 000fffff80000000 R14: ffffffff7fffffff R15: 0000000000000000
[   23.702053] FS:  0000000000000000(0000) GS:ffff9f5faac80000(0000) knlGS:0000000000000000
[   23.710848] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   23.717296] CR2: 0000000000000000 CR3: 0000000109009000 CR4: 00000000000406e0
[   23.725131] Call Trace:
[   23.728292]  <TASK>
[   23.731105]  state_next+0x18e/0x1e0
[   23.735309]  ? iommu_setup+0x295/0x295
[   23.739768]  iommu_go_to_state+0x1f/0x33
[   23.744405]  pci_iommu_init+0x6/0x24
[   23.748697]  __initstub__kmod_pci_dma__239_208_pci_iommu_initrootfs+0x9/0xc
[   23.756363]  do_one_initcall+0x11a/0x280
[   23.761008]  do_initcall_level+0x71/0x84
[   23.765647]  do_initcalls+0x44/0x6b
[   23.769848]  kernel_init_freeable+0x10c/0x167
[   23.774918]  ? rest_init+0xb0/0xb0
[   23.779034]  kernel_init+0x15/0x190
[   23.783237]  ret_from_fork+0x1f/0x30
[   23.787521]  </TASK>
[   23.790412] ---[ end trace 0000000000000000 ]---

How reproducible

Every boot.

How to reproduce

Steps to reproduce the behavior:

  1. Enable IOMMU in BIOS settings
  2. Reboot apu2e4
  3. Observe kernel boot-log output

Expected behavior

Kernel WARNINGs shouldn't be triggered.

Actual behavior

There is a ~20s delay during the early-boot sequence and then the above WARNING is output.

(I believe that @metux is the kernel maintainer for APU boards? This may be unrelated if this is a general IOMMU issue...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions