[fedora-virt] Problem assigning an NVIDIA Quadro K2000 to a guest OS

Stephen Torri storri at torri.org
Sun Mar 8 21:30:48 UTC 2015


I followed a presentation
(www.linux-kvm.org/wiki/images/b/b4/2012-forum-VFIO.pdf) to try to
enable VGA passthrough for the guest OS. This is my first attempt at
using QEMU+KVM to install a guest OS. My intention is to have the guest
OS have direct access to the GPU for 3d gaming.

Problem: Not sure if it is setup right. Launching the VM appears to be
ok. I can open windows and such but if I try to change the resolution
from 800x600 to something higher I get a lot garbage on the screen.
Moving the mouse pointer causes the background image to draw over the
task bar.

My current setup:

GPU1: NVIDIA GeForce 780 Ti (Two monitors currently connected)
GPU2: NVIDIA Quadro K2000 (No monitors connected)
- NVIDIA 346.47 properitary drivers installed.
- Xinerama is disabled due to possible GDM bug.

Goal:

(Not using VM): Linux desktop stretched across both monitors
(Using VM): Guest OS has full screen rendering on one montior while
linux is one the other.

Steps done so far:
1. Used virt-manager to create a storage device on a SSD (50GB size)
2. Installed Windows 7 in VM
3. Updated Windows 7
4. Enable virtualization support and added PCI 0000:03:00.0 as a
physical PCI device to the VM.
5. Thinking I was not done (due to ignorance) I followed the
presentation I linked above to find device to assign:

$ sudo lspci -nn | grep NVIDIA
02:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK110B
[GeForce GTX 780 Ti] [10de:100a] (rev a1)
02:00.1 Audio device [0403]: NVIDIA Corporation GK110 HDMI Audio
[10de:0e1a] (rev a1)
03:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK107GL
[Quadro K2000] [10de:0ffe] (rev a1)
03:00.1 Audio device [0403]: NVIDIA Corporation GK107 HDMI Audio
Controller [10de:0e1b] (rev a1)

6. Worked on finding the group:

$ sudo readlink /sys/bus/pci/devices/0000\:03\:00.0/iommu_group
../../../../kernel/iommu_groups/17

7. Now that I have the group I worked to find the devices in the group:

$ sudo ls /sys/bus/pci/devices/0000\:03\:00.0/iommu_group/devices
0000:03:00.0  0000:03:00.1

*** Ok. So two devices need to dealt with here.

8. I unbinded each from the device driver

$ echo 0000:03:00.0 | sudo tee \
/sys/bus/pci/devices/0000:03:00.0/driver/unbind

$ echo 0000:03:00.1 | sudo tee \
/sys/bus/pci/devices/0000:03:00.1/driver/unbind

9. Found the vendor and device ID for each:

$ sudo lspci -n -s 03:00.0
03:00.0 0300: 10de:0ffe (rev a1)
$ sudo lspci -n -s 03:00.1
03:00.1 0403: 10de:0e1b (rev a1)

10. Now I bind them to vfio-pci
$ echo 10de 0ffe | sudo tee \
/sys/bus/pci/drivers/vfio-pci/new_id
$ echo 10de 01eb | sudo tee \
/sys/bus/pci/drivers/vfio-pci/new_id

** Not sure about this. I am not sure I have bounded them correctly.

11. Now checking them I see:
$ ls /dev/vfio
17 vfio




-------------- next part --------------
A non-text attachment was scrubbed...
Name: Change_resolution_to_1024_768.png
Type: image/png
Size: 104162 bytes
Desc: not available
URL: <http://lists.fedoraproject.org/pipermail/virt/attachments/20150308/9342abbe/attachment-0001.png>


More information about the virt mailing list