Quantcast
Channel: Ubuntu Forums - Virtualisation
Viewing all articles
Browse latest Browse all 4211

KVM GPU Passthrough Questions

$
0
0
My main question is does the 14.04 kernel work with GPU pass through without any kernel patches?

1) Hardware:
Code:

Mobo - MSI 970A-G43
CPU - AMD FX-6300
GPU - AMD HD7870(Guest OS/Windows) - First PCIe Slot
GPU - AMD R7 240(Host OS/Linux) - Second PCIe Slot

MoBo has IOMMU enabled
I can not switch those 2 around as far as where on the Mobo they're being used as I have a water cooler on my 7870 and it does not fit on the second PCIe slot.

2) What is being passed through?
I want the R7 to be used for Xubuntu.
The 7870 to be passed through to Win7, as well as a keyboard for initial setup(will use something else afterwards)

3) Seabios was what I used on 14.04

When using the 14.04(unpatched) version I was able to pci_stub my 7870 card but QEMU would throw errors when trying to use the device.

Code:

qemu-system-x86_64: vfio_bar_write(,0xd2ea, 0x0, 1) failed: Device or resource busy
qemu-system-x86_64: vfio_bar_write(,0xd2e9, 0x0, 1) failed: Device or resource busy
qemu-system-x86_64: vfio_bar_write(,0xd2e8, 0x0, 1) failed: Device or resource busy
qemu-system-x86_64: vfio_bar_write(,0xd2ef, 0x0, 1) failed: Device or resource busy

I did a fresh install of 15.04 as my attempted at an upgrade rendered my machine unusable. I am still having issues.

Now when I stub out the 7870 and reboot I get nothing from the r7 card. I can TTY and see items from the 7870 but no GUI.
I went ahead and tried out the 4.0.2 & 4.0.4 kernels as well...

When I stub out the 7870 the thing boots and the 7870 just displays a flashing "_". The R7 displays "activate" but are completely black and will not show anything.

Here is the output from lscpi -nn

Code:

01:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Pitcairn XT [Radeon HD 7870 GHz Edition] [1002:6818]
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] Oland PRO [Radeon R7 240] [1002:6613]
02:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series] [1002:aab0]


And /etc/initramfs-tools/modules

Code:

pci_stub ids=1002:6818,1002:aab0

Some additional information I realized...

The 3.19 kernel see's the R7 in "additional drivers" and also sees an "unknown device" The 4.0.x kernels see the 7870 in "additional drivers" and sees the same "unknown device"
I'm at a loss here. The upgrades seem to have made the issue worse. And now my DE is all busted looking.

I know both cards are being used right this moment because my right screen is DVI to the R7 and my Left screen is DVI to the 7870 and VGA to the R7. Both screens are using DVI...SO I know they're both being utilized. I just cant figure out why the R7 is not displaying anything when I stub out the 7870.

I've also tried using the pci_stub.id in the /etc/default/grub:

Code:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash amd_iommu=on vfio_iommu_type1 pci_stub.ids=1002:6818,1002:aab0"
However this still did not work. The 7870 gets stubbed out but the r7 never gets initialized. Rather than before when the screens would turn on but not display anything, now the screens simply do not get any signal from the r7.
I can run dmesg | grep stub and it shows the 7870 beinging stubbed out but thats as it.
I also tried without the audio ID in the stub line.

Viewing all articles
Browse latest Browse all 4211

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>