AMD GPU Passthrough with Windows7 32bit

netweber

Renowned Member
Feb 9, 2016
10
0
66
49
I have a new server with a X10SDV-TLN4F Xeon D mainboard running Proxmox 4.1. I am trying to get GPU passthrough working with an ATI Radeon HD 5000 and windows 7.

I have it working with the built in windows VGA drivers but it bluescreens when I load the the ATI drivers. I have seen reference to a similar problem being solved with the following line...

Code:
-device ioh3420,bus=pcie.0,id=pcie0,port=1,chassis=1,multifunction=on \

Can someone tell me how I would inject that config line into Proxmox when the VM starts?
 
Here is the VMID.conf file of the semi working passthrough.
Code:
boot: c[/INDENT]
bootdisk: virtio0
cores: 2
hostpci0: 04:00.0,pcie=1,multifunction=on,x-vga=on
hostpci1: 04:00.1,pcie=2
machine: q35
memory: 2048
name: backdesk-workstation
net0: e1000=00:30:48:D5:6D:02,bridge=vmbr0,tag=10
numa: 0
onboot: 1
ostype: win7
sata2: local:iso/virtio-win-0.1.112.iso,media=cdrom,size=55592K
smbios1: uuid=229ba43f-b87a-4b40-b3b7-7f39f5b3465b
sockets: 1
usb0: host=046d:c52b
vga: none
virtio0: ssdMirror_1TB:vm-111-disk-1,cache=writeback,size=90G

And this is the resulting KVM command line as reported by PS -aux for said vm.
Code:
/usr/bin/kvm -id 111
-chardev socket,id=qmp,path=/var/run/qemu-server/111.qmp,server,nowait
-mon chardev=qmp,mode=control
-vnc unix:/var/run/qemu-server/111.vnc,x509,password
-pidfile /var/run/qemu-server/111.pid
-daemonize
-smbios type=1,uuid=229ba43f-b87a-4b40-b3b7-7f39f5b3465b
-name backdesk-workstation
-smp 2,sockets=1,cores=2,maxcpus=2
-nodefaults
-boot menu=on,strict=on,reboot-timeout=1000
-vga none
-no-hpet
-cpu kvm64,kvm=off,+lahf_lm,+sep,+kvm_pv_unhalt,+kvm_pv_eoi,enforce
-m 2048
-k en-us
-readconfig /usr/share/qemu-server/pve-q35.cfg
-device usb-tablet,id=tablet,bus=ehci.0,port=1
-device vfio-pci,host=04:00.0,id=hostpci0,bus=ich9-pcie-port-1,addr=0x0,x-vga=on
-device vfio-pci,host=04:00.1,id=hostpci1,bus=pci.0,addr=0x11
-device usb-host,vendorid=0x046d,productid=0xc52b
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
-iscsi initiator-name=iqn.1993-08.org.debian:01:5514f02761d
-device ahci,id=ahci0,multifunction=on,bus=pci.0,addr=0x7
-drive file=/var/lib/vz/template/iso/virtio-win-0.1.112.iso,if=none,id=drive-sata2,media=cdrom,aio=threads
-device ide-drive,bus=ahci0.2,drive=drive-sata2,id=sata2
-drive file=/dev/zvol/ssdmirror/vmstorage/vm-111-disk-1,if=none,id=drive-virtio0,cache=writeback,format=raw,aio=threads,detect-zeroes=on
-device virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa,bootindex=100
-netdev type=tap,id=net0,ifname=tap111i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown
-device e1000,mac=00:30:48:D5:6D:02,netdev=net0,bus=pci.0,addr=0x12,id=net0,romfile=pxe-e1000.rom
-rtc driftfix=slew,base=localtime
-machine type=q35
-global kvm-pit.lost_tick_policy=discard
 
Last edited:
Here is the VMID.conf file of the semi working passthrough.
Code:
hostpci1: 04:00.1,pcie=2

This syntax is wrong "pcie=2" , it's 1|0 (enable|disable).
it's mandatory to have pcie=1 if machine=q35

hostpci0: 04:00.0,pcie=1,multifunction=on,x-vga=on
hostpci1: 04:00.1,pcie=2
multifunction=on is not need anymore. (don't known where you have found your example, but it seem to be quite old)

should be
hostpci0: 04:00,pcie=1,x-vga=on


you should really read the wiki
 
Last edited:
Although it may be hard to believe I did actually follow the wiki. I began deviating from the wiki in an attempt to get the ATI sourced drivers working.

This syntax is wrong "pcie=2" , it's 1|0 (enable|disable).
it's mandatory to have pcie=1 if machine=q35
I did not realize that that pcie=1 was a boolean. I didn't see anything in the wiki stating that or indicating what the pci= 1 feature is for. Thanks for clarifying that. Since I was trying to pass both the video and audio portion of my Radeon card through I added a second hostpci line for the audio device but since there is no example in the wiki mapping two devices to the VM, I was just guessing as to how the second line should be configured. Initially I did not increment the second hostpci line so I had two lines with hostpci0. This did not work and with the absence of information explaining what the various configuration arguments were doing I incremented the pcie=1 section as well.

I'll try changing the pcie=2 to pcie=1 and see if that helps.

multifunction=on is not need anymore. (don't known where you have found your example, but it seem to be quite old)
The QEMU-Devel mailing list archive is where I got this from. This post https://lists.gnu.org/archive/html/qemu-devel/2014-02/msg00753.html seemed to describe my problem exactly and that is why I was using multifunction=on. The other key piece it seemed to solving the problem was the following line.
Code:
-device ioh3420,bus=pcie.0,id=pcie0,port=1,chassis=1,multifunction=on \
That is why I would like to know how to add this config option in proxmox.

Can you help?
 
The QEMU-Devel mailing list archive is where I got this from. This post https://lists.gnu.org/archive/html/qemu-devel/2014-02/msg00753.html seemed to describe my problem exactly and that is why I was using multifunction=on. The other key piece it seemed to solving the problem was the following line.
Code:
-device ioh3420,bus=pcie.0,id=pcie0,port=1,chassis=1,multifunction=on \
That is why I would like to know how to add this config option in proxmox.

Can you help?

hostpci0: 04:00,pcie=1,x-vga=on

(04:00 -> will detect all functions .0 (video) , .1 (audio) -> multifunction will be enabled automaticaly)

It's in the wiki ;)
https://pve.proxmox.com/wiki/Pci_pa...our_PCI_card_address.2C_and_configure_your_VM
 
Also, is it possible to address a pci express video card as a pci card from the VM. In other words, can I follow the pci directions even though my card is pci express?

yes. sometime is works better with pci , sometime with pciexpress (even if the physical card is always pciexpress)

they are 4 differents setup in wiki,

If you can, try ovmf method, this is the best supported method (but this need uefi comptable gpu rom)
 
I have tried the various iterations of the wiki configs and unfortunately none of them work with the ATI drivers. The only one I haven't tried is the OVMF method. I don't think I can use that one because my MSI R5450 card does not appear to support UEFI.

I did find this site with a link to the BIOS ROM for my card.
http://www.techpowerup.com/vgabios/...del=HD+5450&interface=PCI-E&memType=&memSize=
Does anyone have any troubleshooting advice for me?
 
This is my current iteration of the vmid.conf

Code:
bootdisk: virtio0
cores: 2
hostpci0: 04:00,pcie=1,x-vga=on                 
machine: q35
memory: 2048
name: backdesk-workstation
net0: e1000=00:30:48:D5:6D:02,bridge=vmbr0,tag=10
numa: 0
onboot: 1
ostype: win7
parent: Pre_ATI_Driver
sata2: local:iso/virtio-win-0.1.112.iso,media=cdrom,size=55592K
smbios1: uuid=229ba43f-b87a-4b40-b3b7-7f39f5b3465b
sockets: 1
usb0: host=046d:c52b
vga: none
virtio0: ssdMirror_1TB:vm-111-disk-1,cache=writeback,size=90G
 
I have tried the various iterations of the wiki configs and unfortunately none of them work with the ATI drivers. The only one I haven't tried is the OVMF method. I don't think I can use that one because my MSI R5450 card does not appear to support UEFI.

I did find this site with a link to the BIOS ROM for my card.
http://www.techpowerup.com/vgabios/...del=HD+5450&interface=PCI-E&memType=&memSize=
Does anyone have any troubleshooting advice for me?

from qemu release note, HD 5450 was supported in qemu 1.5 without ovmf.
So it working in past, maybe something has changed ? (new drivers maybe ?)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!