You are not logged in.

#1 2015-06-05 23:48:33

SkySky
Member
Registered: 2015-06-02
Posts: 3

[SOLVED] Trouble setting up KVM VGA passthrough using vfio

Hi all!

In the past two weeks I've set up my first LFS build using Arch and everything is working great! Well, almost everything.

I'm trying to get a VM set up with vfio for Windows gaming but I'm having trouble and I don't know where to look to fix this... Following this guide: https://bbs.archlinux.org/viewtopic.php?id=162768

I have compiled and am running AUR\linux-vfio, with amd_iommu=on and my processor supports virtualization. pci-stubs holding on to the card to be virtualized.

Cobbled together specs - The 7850 is my host and the 7870 is to be passed to the VM.

OS: Arch Linux 
Kernel: x86_64 Linux 4.0.4-2-vfio
CPU: AMD Phenom II X4 955 @ 3.2GHz

01:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Pitcairn PRO [Radeon HD 7850] [1002:6819]
01:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series] [1002:aab0]
02:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Pitcairn XT [Radeon HD 7870 GHz Edition] [1002:6818]
02:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series] [1002:aab0]

When I try to run the test in the linked thread, I get the following:

archdeckstawp% qemu-system-x86_64 -enable-kvm -m 1024 -cpu host,kvm=off \
> -smp 4,sockets=1,cores=4,threads=1 \
> -device vfio-pci,host=02:00.0,x-vga=on -device vfio-pci,host=02:00.1 \
> -vga none
qemu-system-x86_64: -device vfio-pci,host=02:00.0,x-vga=on: vfio: error no iommu_group for device
qemu-system-x86_64: -device vfio-pci,host=02:00.0,x-vga=on: Device initialization failed
qemu-system-x86_64: -device vfio-pci,host=02:00.0,x-vga=on: Device 'vfio-pci' could not be initialized

I checked dmesg and found the following errors, and a patch linked here from Bumblebee, but I don't believe this is the issue so I haven't tried it yet - going to investigate more: https://github.com/Bumblebee-Project/Bu … nt-5804686

archdeckstawp% dmesg | grep vgaarb                
[    0.347409] vgaarb: setting as boot device: PCI:0000:01:00.0
[    0.347411] vgaarb: device added: PCI:0000:01:00.0,decodes=io+mem,owns=io+mem,locks=none
[    0.347413] vgaarb: device added: PCI:0000:02:00.0,decodes=io+mem,owns=none,locks=none
[    0.347415] vgaarb: loaded
[    0.347416] vgaarb: bridge control possible 0000:02:00.0
[    0.347417] vgaarb: bridge control possible 0000:01:00.0
[   17.814588] vgaarb: this pci device is not a vga device
... 22 times ...
[   17.814761] vgaarb: this pci device is not a vga device
[   17.814778] vgaarb: device changed decodes: PCI:0000:02:00.0,olddecodes=io+mem,decodes=none:owns=none
[   17.814794] vgaarb: this pci device is not a vga device
... 3 times ...
[   17.814848] vgaarb: this pci device is not a vga device

For some strange reason I feel like virtualization isn't working on my machine. I've checked the BIOS, virtualization is enabled... I just can't get iommu turned on. Any ideas?

Last edited by SkySky (2015-06-12 01:14:22)

Offline

#2 2015-06-07 23:13:15

SkySky
Member
Registered: 2015-06-02
Posts: 3

Re: [SOLVED] Trouble setting up KVM VGA passthrough using vfio

So after a bit more research, looks like my motherboard doesn't support IOMMU... http://forums.tweaktown.com/gigabyte/39 … witch.html

[    0.000000] AGP: Please enable the IOMMU option in the BIOS setup
[    1.949134] AMD IOMMUv2 driver by Joerg Roedel <jroedel@suse.de>
[    1.949136] AMD IOMMUv2 functionality not available on this system

Blah, looks like I have to build a new system (or at least get a new mobo) to get this figured out. I've put in a ticket with gigabyte for my mobo to see if they'll do anything for me, but I doubt it...

I'm hesitant to mark this as solved... would anyone have any ideas on how I could get this working otherwise?

Offline

#3 2015-06-08 16:19:22

MrTUX-10
Member
Registered: 2015-01-06
Posts: 12

Re: [SOLVED] Trouble setting up KVM VGA passthrough using vfio

What motherboard do you have?

Offline

#4 2015-06-09 00:48:50

SkySky
Member
Registered: 2015-06-02
Posts: 3

Re: [SOLVED] Trouble setting up KVM VGA passthrough using vfio

MrTUX-10 wrote:

What motherboard do you have?

Gigabyte GA-790XTA-UD4, bios version F8. There's an F9 beta bios I might flash but I need to figure out how to do that from Arch or install Windows.

EDIT: Response from Gigabyte, there's no IOMMU support on the board. Marking as solved, I guess...

Last edited by SkySky (2015-06-12 01:14:05)

Offline

Board footer

Powered by FluxBB