4

I have been trying for several days now (had to reinstall arch twice during), with setting up GPU passthrough on my pc without success. The hardware is

  • Asus Z97-P
  • Intel I5-4690
  • AMD Radeon R9 380 (catalyst sees it as R9 285)

which should be capable of IOMMU. My computer runs Arch Linux.

I have been following the following two articles on the topic:

The Goal

Unfortunately I only have one video card (and intel on-board) but I would be totally happy with starting the VM from the command line when I want to use Windows, otherwise I would like to just type startx to utilize the graphics card to the fglrx module.

How I tried to achieve it

I passed the intel_iommu=on option to initrd, which resulted in the following list using

# find /sys/kernel/iommu_groups -type l

/sys/kernel/iommu_groups/0/devices/0000:00:00.0
/sys/kernel/iommu_groups/1/devices/0000:00:01.0
/sys/kernel/iommu_groups/1/devices/0000:01:00.0
/sys/kernel/iommu_groups/1/devices/0000:01:00.1
/sys/kernel/iommu_groups/2/devices/0000:00:14.0
/sys/kernel/iommu_groups/3/devices/0000:00:16.0
/sys/kernel/iommu_groups/4/devices/0000:00:1a.0
/sys/kernel/iommu_groups/5/devices/0000:00:1b.0
/sys/kernel/iommu_groups/6/devices/0000:00:1c.0
/sys/kernel/iommu_groups/6/devices/0000:00:1c.2
/sys/kernel/iommu_groups/6/devices/0000:00:1c.3
/sys/kernel/iommu_groups/6/devices/0000:03:00.0
/sys/kernel/iommu_groups/6/devices/0000:04:00.0
/sys/kernel/iommu_groups/7/devices/0000:00:1d.0
/sys/kernel/iommu_groups/8/devices/0000:00:1f.0
/sys/kernel/iommu_groups/8/devices/0000:00:1f.2
/sys/kernel/iommu_groups/8/devices/0000:00:1f.3

which might mean that IOMMU is enabled successfully, but according to arch wiki it might not have been setup correctly (see last line of code):

#dmesg|grep -e DMAR -e IOMMU

[    0.000000] ACPI: DMAR 0x00000000DDB41D40 000080 (v01 INTEL  BDW      00000001 INTL 00000001)
[    0.000000] Intel-IOMMU: enabled
[    0.024745] dmar: IOMMU 0: reg_base_addr fed90000 ver 1:0 cap d2008c20660462 ecap f010da
[    0.024747] IOAPIC id 8 under DRHD base  0xfed90000 IOMMU 0
[    0.296873] DMAR: No ATSR found
[    0.296964] IOMMU: dmar0 using Queued invalidation
[    0.296965] IOMMU: Setting RMRR:
[    0.296973] IOMMU: Setting identity map for device 0000:00:14.0 [0xdee7d000 - 0xdee8bfff]
[    0.296996] IOMMU: Setting identity map for device 0000:00:1a.0 [0xdee7d000 - 0xdee8bfff]
[    0.297012] IOMMU: Setting identity map for device 0000:00:1d.0 [0xdee7d000 - 0xdee8bfff]
[    0.297024] IOMMU: Prepare 0-16MiB unity mapping for LPC
[    0.297029] IOMMU: Setting identity map for device 0000:00:1f.0 [0x0 - 0xffffff]
[    3.326568] AMD IOMMUv2 driver by Joerg Roedel <jroedel@suse.de>
[    3.326569] AMD IOMMUv2 functionality not available on this system

I have tried the other options mentioned on the arch wiki site (pass pci-stub to MODULES in mkinitcpio.conf), but this last line persisted.

First question: Is the first command's output sufficient to say that my system correctly utilizes IOMMU?

With a bit of distrust, I have arrived at the part where I had to bind my VGA to pci-stub, which have led to some reinstall already, so I would like to have at least some directions to go from here, whether to use pci-stub or VFIO and such.

Rui F Ribeiro
  • 56,709
  • 26
  • 150
  • 232
FloriOn
  • 305

2 Answers2

0

While this is an old question:

AMD IOMMUv2 functionality not available on this system

is expected on an Intel system, as it does not have AMD IOMMUv2. Even on AMD systems it ay be normal in case it does not support IOMMUv2 but only v1. If you can see the groups and you see messages that IOMMU is enabled, proceed.

Riley
  • 193
0

Here is a wonderful guide on GPU passthrough:

https://www.heiko-sieger.info/running-windows-10-on-linux-using-kvm-with-vga-passthrough/

Unfortunately I only have one video card (and intel on-board)

You'll probably want two GPUs.