# [SOLVED] IOMMU unit and NIC seem to be conflicting

## NilPointer

For a long time I've wanted to get a motherboard that supports IOMMU to be able to try out giving a real graphics card to virtual machines with VGA passthrough. My new machine supports IOMMU (it's enabled in BIOS) and I've tried compiling kernel with AMD IOMMU support, however, for some reason my NIC doesn't work with this kernel option. NIC's kernel driver, igb emits following log entries:

```
igb 0000:06:00.0: Detected Tx Unit Hang
```

And it reports adapter resets:

```
Aug 20 16:47:43 mainstation kernel: [  105.820409] igb 0000:06:00.0 enp6s0: Reset adapter

Aug 20 16:47:47 mainstation kernel: [  109.812563] igb 0000:06:00.0 enp6s0: igb: enp6s0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX

Aug 20 16:47:57 mainstation kernel: [  119.819125] igb 0000:06:00.0 enp6s0: Reset adapter

Aug 20 16:48:01 mainstation kernel: [  123.811334] igb 0000:06:00.0 enp6s0: igb: enp6s0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX

Aug 20 16:48:11 mainstation kernel: [  133.817950] igb 0000:06:00.0 enp6s0: Reset adapter

Aug 20 16:48:15 mainstation kernel: [  137.810088] igb 0000:06:00.0 enp6s0: igb: enp6s0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX

Aug 20 16:48:25 mainstation kernel: [  147.816701] igb 0000:06:00.0 enp6s0: Reset adapter

Aug 20 16:48:29 mainstation kernel: [  151.808874] igb 0000:06:00.0 enp6s0: igb: enp6s0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX

Aug 20 16:48:39 mainstation kernel: [  161.815469] igb 0000:06:00.0 enp6s0: Reset adapter

Aug 20 16:48:43 mainstation kernel: [  165.807623] igb 0000:06:00.0 enp6s0: igb: enp6s0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX

Aug 20 16:48:53 mainstation kernel: [  175.814240] igb 0000:06:00.0 enp6s0: Reset adapter

Aug 20 16:48:57 mainstation kernel: [  179.806389] igb 0000:06:00.0 enp6s0: igb: enp6s0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX
```

I wonder if it's still possible to use both IOMMU driver and igb?

Regarding IOMMU, kernel prints following lines:

```
Aug 20 16:46:29 mainstation kernel: [    1.181115] iommu: Adding device 0000:00:00.0 to group 0

Aug 20 16:46:29 mainstation kernel: [    1.181570] iommu: Adding device 0000:00:02.0 to group 1

Aug 20 16:46:29 mainstation kernel: [    1.182017] iommu: Adding device 0000:00:03.0 to group 2

Aug 20 16:46:29 mainstation kernel: [    1.182488] iommu: Adding device 0000:00:09.0 to group 3

Aug 20 16:46:29 mainstation kernel: [    1.182937] iommu: Adding device 0000:00:11.0 to group 4

Aug 20 16:46:29 mainstation kernel: [    1.183389] iommu: Adding device 0000:00:12.0 to group 5

Aug 20 16:46:29 mainstation kernel: [    1.183516] iommu: Adding device 0000:00:12.2 to group 5

Aug 20 16:46:29 mainstation kernel: [    1.183975] iommu: Adding device 0000:00:13.0 to group 6

Aug 20 16:46:29 mainstation kernel: [    1.184105] iommu: Adding device 0000:00:13.2 to group 6

Aug 20 16:46:29 mainstation kernel: [    1.184553] iommu: Adding device 0000:00:14.0 to group 7

Aug 20 16:46:29 mainstation kernel: [    1.184998] iommu: Adding device 0000:00:14.3 to group 8

Aug 20 16:46:29 mainstation kernel: [    1.187880] iommu: Adding device 0000:00:14.4 to group 9

Aug 20 16:46:29 mainstation kernel: [    1.188324] iommu: Adding device 0000:00:14.5 to group 10

Aug 20 16:46:29 mainstation kernel: [    1.188780] iommu: Adding device 0000:00:15.0 to group 11

Aug 20 16:46:29 mainstation kernel: [    1.188909] iommu: Adding device 0000:00:15.3 to group 11

Aug 20 16:46:29 mainstation kernel: [    1.189360] iommu: Adding device 0000:00:16.0 to group 12

Aug 20 16:46:29 mainstation kernel: [    1.189513] iommu: Adding device 0000:00:16.2 to group 12

Aug 20 16:46:29 mainstation kernel: [    1.189995] iommu: Adding device 0000:01:00.0 to group 13

Aug 20 16:46:29 mainstation kernel: [    1.190135] iommu: Adding device 0000:01:00.1 to group 13

Aug 20 16:46:29 mainstation kernel: [    1.190622] iommu: Adding device 0000:02:00.0 to group 14

Aug 20 16:46:29 mainstation kernel: [    1.190767] iommu: Adding device 0000:02:00.1 to group 14

Aug 20 16:46:29 mainstation kernel: [    1.191214] iommu: Adding device 0000:03:00.0 to group 15

Aug 20 16:46:29 mainstation kernel: [    1.191334] iommu: Adding device 0000:04:06.0 to group 9

Aug 20 16:46:29 mainstation kernel: [    1.191456] iommu: Adding device 0000:05:00.0 to group 11

Aug 20 16:46:29 mainstation kernel: [    1.191586] iommu: Adding device 0000:06:00.0 to group 11

Aug 20 16:46:29 mainstation kernel: [    1.264600] AMD-Vi: Found IOMMU at 0000:00:00.2 cap 0x40

Aug 20 16:46:29 mainstation kernel: [    1.264814] AMD-Vi: Lazy IO/TLB flushing enabled
```

Last edited by NilPointer on Sat Aug 27, 2016 10:05 am; edited 1 time in total

----------

## mekong

When you have problem with host device when activate iommu, I think you need iommu=pt to add to your kernel cmdline. I don't have AMD and/or same network device but have seen somewhere while researching on this iommu option.

----------

## NilPointer

The issue seems to be gone on it's own now. I don't know why. Might've been something I changed in BIOS (RAM timings?) or the kernel. But now my NIC appears to be working with IOMMU enabled.

----------

