Hi Powerhouse, had been thinking my old XEN setup (following your previous guide) needed upgrading, then I found you wrote this...
my HW:
CPU: i7-3770
M/B: Asrock Z77 Extreme4-M
RAM: 16GB
Host GPU: integrated
VM GPU: AMD HD7950
Storage: 120G OCZ Agility 3 (for host) & Samsung EVO 850 (for guest)
*I'm also using the new Linux Mint 18 release
Couple things I had to do differently:
1 - change kernel parameters
radeon.blacklist=1 to
radeon.modeset=0
With
radeon.blacklist=1:
radeon does not get disabled, grabs half the GPU before pci-stub gets a chance, the pci-stub gets the audio-half
Code: Select all
$ dmesg
<...>
[ 0.746882] radeon: unknown parameter 'blacklist' ignored
<...>
[ 0.750454] radeon 0000:01:00.0: enabling device (0000 -> 0003)
<...>
[ 4.295363] pci-stub: add 1002:679A sub=FFFFFFFF:FFFFFFFF cls=00000000/00000000
[ 4.295367] pci-stub: add 1002:AAA0 sub=FFFFFFFF:FFFFFFFF cls=00000000/00000000
[ 4.295420] pci-stub 0000:01:00.1: claimed by stub
confirmed with lspci:
Code: Select all
$ lspci -nnk
<...>
01:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Tahiti PRO [Radeon HD 7950/8950 OEM / R9 280] [1002:679a]
Subsystem: Gigabyte Technology Co., Ltd Tahiti PRO [Radeon HD 7950/8950 OEM / R9 280] [1458:254c]
Kernel driver in use: radeon
Kernel modules: radeon
01:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Tahiti XT HDMI Audio [Radeon HD 7970 Series] [1002:aaa0]
Subsystem: Gigabyte Technology Co., Ltd Tahiti XT HDMI Audio [Radeon HD 7970 Series] [1458:aaa0]
Kernel driver in use: pci-stub
Kernel modules: snd_hda_intel
<...>
Then with
radeon.modeset=0:
Code: Select all
$ dmesg
<...>
[ 0.745078] [drm:radeon_init [radeon]] *ERROR* No UMS support in radeon module!
<...>
[ 1.207983] pci-stub: add 1002:679A sub=FFFFFFFF:FFFFFFFF cls=00000000/00000000
[ 1.208036] pci-stub 0000:01:00.0: claimed by stub
[ 1.208040] pci-stub: add 1002:AAA0 sub=FFFFFFFF:FFFFFFFF cls=00000000/00000000
[ 1.208060] pci-stub 0000:01:00.1: claimed by stub
<...>
once more confirmed with lspci:
Code: Select all
$ lspci -nnk
<...>
01:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Tahiti PRO [Radeon HD 7950/8950 OEM / R9 280] [1002:679a]
Subsystem: Gigabyte Technology Co., Ltd Tahiti PRO [Radeon HD 7950/8950 OEM / R9 280] [1458:254c]
Kernel driver in use: pci-stub
Kernel modules: radeon
01:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Tahiti XT HDMI Audio [Radeon HD 7970 Series] [1002:aaa0]
Subsystem: Gigabyte Technology Co., Ltd Tahiti XT HDMI Audio [Radeon HD 7970 Series] [1458:aaa0]
Kernel driver in use: pci-stub
Kernel modules: snd_hda_intel
<...>
For reference my full kernel command line:
Code: Select all
GRUB_CMDLINE_LINUX_DEFAULT="radeon.modeset=0 quiet splash intel_iommu=on pci-stub.ids=1002:679a,1002:aaa0"
2 - Mess with the GPU passthrough (a lot!)
The pass-through initially worked fine for me, I just got stuck when installing the GPU drivers - the VM would immediately crash no matter what, then guest reboots after that would be highly unreliable and crash at random.
First I found:
https://www.redhat.com/archives/vfio-us ... 00120.html
After putting my GPU behind a 'ioh3420' device, the VM did not crash, but the display never came back - so progress i guess?
Then:
https://lists.fedoraproject.org/piperma ... 03911.html
Which lead on to:
https://bbs.archlinux.org/viewtopic.php?pid=1361071
which has lead me to construct my current abomination of a qemu command-line (still in the win10vm.sh script):
Code: Select all
qemu-system-x86_64 \
-name $vmname,process=$vmname \
-cpu host \
-machine type=q35,accel=kvm \
-smp 4,sockets=1,cores=2,threads=2 \
-enable-kvm \
-m 4G \
-mem-prealloc \
-balloon none \
-rtc clock=host,base=localtime \
-vga none \
-nographic \
-serial none \
-parallel none \
-soundhw hda \
-usb -usbdevice host:046d:c31d -usbdevice host:046d:c05a \
-device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
-device vfio-pci,host=01:00.0,multifunction=on,bus=root.1,addr=00.0 \
-device vfio-pci,host=01:00.1,bus=pcie.0,multifunction=on \
-device ich9-intel-hda,bus=pcie.0,addr=1b.0,id=sound0 \
-device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 \
-drive if=pflash,format=raw,readonly,file=/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd \
-drive if=pflash,format=raw,file=/tmp/my_vars.fd \
-boot order=dc \
-device virtio-scsi-pci,id=scsi \
-drive id=disk0,if=virtio,cache=none,format=raw,file=/media/user/win.img \
-drive file=/media/isos/Win10_1511_2_EnglishInternational_x64.iso,id=isocd,format=raw,if=none -device scsi-cd,drive=isocd \
-drive file=/media/isos/virtio-win-0.1.118.iso,id=virtiocd,format=raw,if=none -device ide-cd,bus=ide.1,drive=virtiocd \
-netdev type=tap,id=net0,ifname=tap0,vhost=on \
-device virtio-net-pci,netdev=net0,mac=00:16:3e:00:01:01
Note: i have flashed the GPU rom to get UEFI support.
With that I am able to boot the VM, install windows
AND install the GPU drivers!
From here I plan to experiment some more trying to trim down the command line to find what it was that eventually made the pass-through succeed, then i'll blow it all away and do a 'proper' LVM-based install, but thought I should share first