You are not logged in.

#1351 2014-03-15 18:45:17

TripleSpeeder
Member
Registered: 2011-05-02
Posts: 47

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

On my end the VGA passthrough is working quite fine for some time now. I am thinking how to integrate this with libvirt and virtmanager instead of configuring/running quemu manually. So i'd like to use libvirtd and virtmanager to setup, configure, start, stop etc. my VMs with VGA passthrough using vfio. Anyone here have experience? Is this already possible?

Offline

#1352 2014-03-15 18:52:00

Blind Tree Frog
Member
Registered: 2013-12-31
Posts: 27

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Should be possible already.  There might be a custom line you need to add to the XML (or two) but I don't remember where in the thread it was discussed.  I know that people are doing what you ask though.

Offline

#1353 2014-03-15 20:12:29

nbhs
Member
From: Montevideo, Uruguay
Registered: 2013-05-02
Posts: 402

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

novist wrote:

One more success story here. This is all done on mint 16 by the way.
Hardware: Sabertooth FX990 R2.0 motherboard, AMD FX(tm)-8350 CPU, host GPU geforce gtx 550ti, VM GPU Radeon R9 270X.
qemu: from git
kernel: 3.13.6

00:13.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
00:13.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller
06:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Curacao XT [Radeon R9 270X]
06:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series]
~/VM/src/qemu/build/release/x86_64-softmmu/qemu-system-x86_64 \
-enable-kvm -m 4096 -cpu host -machine q35,accel=kvm \
-smp 8,sockets=1,cores=8,threads=1 \
-bios /usr/share/qemu/bios.bin \
-drive file=/dev/disk/by-id/ata-WDC_WD3200BEVT-22ZCT0_WD-WXE708J50240,if=none,id=virtio-disk0,format=raw,cache=none,aio$
-device virtio-blk-pci,scsi=off,drive=virtio-disk0,id=disk0 \
-drive file=/dev/disk/by-id/ata-WDC_WD7502AAEX-00Y9A0_WD-WCAW31075836,if=none,id=virtio-disk1,format=raw,cache=none,aio$
-device virtio-blk-pci,scsi=off,drive=virtio-disk1,id=disk1 \
-device e1000,netdev=vnet0,mac=20:64:32:c1:f9:22 -netdev tap,id=vnet0 \
-smb user,smbserver=10.0.2.4 \
-device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
-device vfio-pci,host=06:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on \
-device vfio-pci,host=06:00.1,bus=root.1,addr=00.1 \
-device vfio-pci,host=00:13.0,bus=pcie.0 \
-device vfio-pci,host=00:13.2,bus=pcie.0 \
-vga none

Some observations i made:
To correctly pass-through USB controller i had to include both 00:13.0 and 00:13.2, othervise qemu threw an error about failing to bind vfio or something.
To find correct address of USB ports i wanted i used stupid method: plugged in mouse to target port and then go through pci addresses and vfio-bind them. When mouse lights went out i knew usb port was no longer working so that was last one i bound. Then had to reboot to make them come back. There probably is better way..
I could use -vga sdl along with passed-through GPU. Using stock 1.5 qemu from repos did not quite work. Device manager reported radeon had some kind of malfunction. Compiling qemu from git made it work. Both emulated vga and passed-through one side by side. 3d apps did not run on radeon vga in that mode though and i did not care to find out how to make that happen.
Everything else went pretty much as described in original guide.
Well and bit offtopic - to use virtio for disk i had to boot OS while disk with windows was attached with -hda and then i had to attach dummy few meg image in virtio mode. That way windows picked up new device and i could install drivers. After that all disks can be attached in virtio.

Now this brings me to problems.. I am too having this issue where after reboot vga will not reset and VM with passed-through vga can not be started again. As far as i read this thread did not see a solution. Correct me if im blind and i missed it.
Also performance issue led me to believe i should use these patches:

For what kernel version are they? I fail to apply them because latest tree does not quite match code in these patches. Not entirely sure if its a good idea to apply these patches in this case.


EDIT:
After some more digging i figured out patches are for latest 3.14-rc6 kernel. Thing is after kernel update i still can not see reasonable speed improvement. I used passmarkt to test and only dx11 test seems to run at ~80% of speed compared to other users. dx9 is especially slow. Basically all other 3d tests are somewhere around 20-30% of other people's results. Really slow.. If anyone knows possible cure - hint me please!

Also i forgot to mention that if i run VM then host will not shut down properly. It hangs after bunch of "synchronizing SCISI cache" messages.
Also had to flib-back to nouveau driver for host as latest nvidia beta driver (which is supposed to work with rc6) wont install (hangs without displaying anything upon start). Anyone happen to install that beast?

Have you tried this?

echo "options kvm-amd npt=0" > /etc/modprobe.d/kvm-amd.conf

Offline

#1354 2014-03-16 09:17:41

novist
Member
Registered: 2014-03-14
Posts: 47

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Yes it is there already. Maybe i will make summary of my modprobe.d configs and grub params:
kvm-amd.conf

options kvm-amd npt=0

kvm.conf

#options kvm ignore_msrs=1
options kvm allow_unsafe_assigned_interrupts=1

qemu-system-x86.conf

options kvm_intel nested=1

vfio_iommu_type1.conf

options vfio_iommu_type1 allow_unsafe_interrupts=1

GRUB:

GRUB_CMDLINE_LINUX_DEFAULT="radeon.blacklist=1 radeonhd.blacklist=1 nouveau.blacklist=0 nouveau.modeset=1 nvidia.blacklist=1 nvidia.modeset=0 iommu=pt iommu=1 pci-stub.ids=1002:6810,1002:aab0 vfio_iommu_type1.allow_unsafe_interrupts=1"

blacklist.conf

blacklist radeon
blacklist radeonhd
#blacklist nouveau
blacklist nvidia

I probably overstretched it a bit. Some double-configs probably are not really needed but im not sure. Not an expert on linux kernel things here. I maybe even would want to move all modprobe configs related to kvm to same file but again idk if its good idea.

EDIT:
Im adding benchmark that does not make any sense. As you notice DirectCompute and especially DirectX 11 are more than one could wish for. However complex directx9 is right down the toilet. My brain cant figure out any scenario where this would make sense. It is sad because most of the games nowdays are still directx9 neutral
ictrgo.png

Last edited by novist (2014-03-16 10:04:57)

Offline

#1355 2014-03-16 11:54:20

ahl
Member
Registered: 2014-03-16
Posts: 20

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Thank you for this great guide. I immediatelly got VGA passthrough working perfectly with Debian Jessie guest.

Setup:
AMD A10-5700 APU
Asus F2A85-M PRO, BIOS 6204
Host: Radeon HD 7660D IGP (Gallium, Northern Islands)
Guest: Radeon HD 3870 (Gallium, R600)
Linux 3.12.14-gentoo
Qemu 1.7.0 (Gentoo portage)
Seabios 1.7.3.2 (Gentoo portage)

I did not apply patches of any kind.

These are needed for running as non-root (numbers may vary and I choose that 3GiB arbitrarily):
chgrp kvm /dev/vfio/2
chmod g+rw /dev/vfio/2
echo "@kvm - memlock 3145728" >> /etc/security/limits.conf


Unfortunately I ran into a problem unrelated to passthrough: I can't get WinXP 32-bit (SP3) to boot or install with "-M q35" no matter what I do! Is everyone else using newer Windows? Or what am I doing wrong?

Here is one example how to reproduce the problem:
1. qemu-system-x86_64 -machine accel=kvm -m 1024 -M q35 -drive file=/path/to/winxp_sp3.iso,if=none,id=dr0,media=cdrom -device ide-cd,bus=ide.0,drive=dr0 -net none -daemonize -vga cirrus
2. Wait ~10 seconds
3. BSOD with STOP 0xA5 appears

Above works fine without "-M q35".

Identical looking problems:
https://bugzilla.redhat.com/show_bug.cgi?id=902662
https://bugzilla.redhat.com/show_bug.cgi?id=959815

To solve the problem I have tried:
- Qemu 1.4.2, 1.5.3, 1.7.0 and git
- Seabios 1.7.2.1, 1.7.2.2, 1.7.3.2, 1.7.4, git and also the bios that came with qemu-git and also 1.7.4 with something resempling commit 2114f50148c42e374586359d23b522483ca10e8d reverted
- qemu-system-i386 and qemu-system-x86_64
- Quite a lot of different qemu options including: with and without kvm, -no-hpet, -no-acpi, various -cpu and -smp, various -vga, various memory sizes, various emulated SATA, IDE and AHCI controllers, some random -acpitables

UPDATE: I managed to get past this one ordeal. The trick is to use this virtual hd controller: -device piix4-ide,bus=pcie.0,id=piix4-ide
AND then press F7 during Windows install to disable ACPI. Any other combo won't work. So now I have WinXP working just fine with "-M q35".

Unfortunately attempts to actually boot the same WinXP with Radeon card enabled seem to lead to horrible host crashes of data corruption. Interestingly, Debian guest still works just fine.

UPDATE 2: Now using Asus BIOS 6308 and git kernel + fix_memleak.patch and qit qemu.

Still no luck with either Win7 or WinXP. Win7 works without AMD drivers but once the drivers have been installed, it crashes right after "Starting Windows". Host usually also crashes. If I start qemu from console without any graphics drivers, host seems not to crash(?), but it won't make the guest work any better. And if I accidentally do modprobe radeon after guest crash the whole system crashes? I used to get ATA-errors on host crashes, but now after some changes I don't get any error messages.

(I also found out there was no need for allow_unsafe_interrupts=1. I simply didn't have Interrupt Mapping compiled in kernel.)

Last edited by ahl (2014-03-18 05:34:27)

Offline

#1356 2014-03-16 15:38:34

novist
Member
Registered: 2014-03-14
Posts: 47

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

ahl wrote:

Thank you for this great guide. I immediatelly got VGA passthrough working perfectly with Debian Jessie guest.

Setup:
AMD A10-5700 APU
Asus F2A85-M PRO, BIOS 6204
Host: Radeon HD 7660D IGP (Gallium, Northern Islands)
Guest: Radeon HD 3870 (Gallium, R600)
Linux 3.12.14-gentoo
Qemu 1.7.0 (Gentoo portage)
Seabios 1.7.3.2 (Gentoo portage)

I did not apply patches of any kind.

Required hacks:
vfio_iommu_type1.allow_unsafe_interrupts=1
chgrp kvm /dev/vfio/2
chmod g+rw /dev/vfio/2
echo "@kvm - memlock 3145728" >> /etc/security/limits.conf

I wonder what are the implications of that interrupt hack? "unsafe" doesn't sound good.


Unfortunately I ran into a problem unrelated to passthrough: I can't get WinXP 32-bit (SP3) to boot or install with "-M q35" no matter what I do! Is everyone else using newer Windows? Or what am I doing wrong?

Here is one example how to reproduce the problem:
1. qemu-system-x86_64 -machine accel=kvm -m 1024 -M q35 -drive file=/path/to/winxp_sp3.iso,if=none,id=dr0,media=cdrom -device ide-cd,bus=ide.0,drive=dr0 -net none -daemonize -vga cirrus
2. Wait ~10 seconds
3. BSOD with STOP 0xA5 appears

Above works fine without "-M q35".

Identical looking problems:
https://bugzilla.redhat.com/show_bug.cgi?id=902662
https://bugzilla.redhat.com/show_bug.cgi?id=959815

To solve the problem I have tried:
- Qemu 1.5.3, 1.7.0 and git
- Seabios 1.7.1, 1.7.2, 1.7.2.2, 1.7.3.2, 1.7.4 and also the bios that came with qemu-git and also 1.7.4 with something resempling commit 2114f50148c42e374586359d23b522483ca10e8d reverted
- qemu-system-i386 and qemu-system-x86_64
- Quite a lot of different qemu options including: with and without kvm, -no-hpet, -no-acpi, various -cpu and -smp, various -vga, various memory sizes, various emulated SATA, IDE and AHCI controllers, some random -acpitables

Any ideas?

but why would you want that old OS? i mean seriously.. its done. move on.. also q35 is still in development and kind of experimental. i suppose noone cared to test obsolete OS with it.. i suggest picking up windows7. its fastest way to get you up and running.


Also anyone having stability issues with windows VMs?  Mine for some reason restarts some time after boot. Still no idea what could be causing it. Not even BSOD, just reboots instantly. I compiled qemu with --enable-debug but it does not output any more error messages. there is lots of following spam:

qemu-system-x86_64: vfio: Cannot reset device 0000:00:13.0, no available reset mechanism.

but i suppose its fine since 0000:00:13.0 is passed-through usb port and im switching between host and guest with kvm switch. this is real bummer..

Offline

#1357 2014-03-16 15:43:50

pereczes
Member
Registered: 2014-03-08
Posts: 14

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

this thread is getting really long... would take pb weeks for someone to resume the most valuable info wink

IMPORTANT: there were to things that were making freezing my host:
-> if i wast trying to run CCC
-> but also the fact that I had the HDMI cable attached

details about the second:
I was booting windows 7.1 guest on primary monitor attached to ATI/RADEN DIV connector.
Once I was attaching the HDMI, the guest was causing the host to freeze. Crazy...

Now tried to boot with DIV removed, but HDMI attached. Though there was no boot screen,
probably the card was sending the signal only to DIV, the guest booted and worked no crash.
Now re-installed CCC, and indeed once started CCC it crashed. At high level I can conclude that
the crash is related to manipulation of VIDEO output.
So there is a huge progress for me, but I still cannot live with the situation as the hdmi signal
someway does not show full screen. I had the same problem on linux as well and only CCC could
stretch the screen to the full size (though windows reports it is at max resolution)

Offline

#1358 2014-03-16 17:20:58

ahl
Member
Registered: 2014-03-16
Posts: 20

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

novist wrote:

but why would you want that old OS? i mean seriously.. its done. move on.. also q35 is still in development and kind of experimental. i suppose noone cared to test obsolete OS with it.. i suggest picking up windows7. its fastest way to get you up and running.

Thanks but I have "moved on" to Linux. Giving more money to Microsoft for them to harass me more just doesn't feel right. And more importantly, there is nothing wrong with running old software in restricted environment. It's not like I'd be surfing the net with it.

I also tried Windows 2000 Pro now. Different looking BSoD but exact same error and message.

More luck with Windows 98 SE, perhaps? (Honestly, I'm out of ideas now...)

pereczes wrote:

So there is a huge progress for me, but I still cannot live with the situation as the hdmi signal
someway does not show full screen. I had the same problem on linux as well and only CCC could
stretch the screen to the full size (though windows reports it is at max resolution)

I believe that's called underscanning and overscanning of video -- a ridiculous legacy feature of the HDMI protocol. A most reliable way to get rid of it, is to use good old VGA when possible.

Offline

#1359 2014-03-16 17:53:05

novist
Member
Registered: 2014-03-14
Posts: 47

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

ahl wrote:

Thanks but I have "moved on" to Linux. Giving more money to Microsoft for them to harass me more just doesn't feel right. And more importantly, there is nothing wrong with running old software in restricted environment. It's not like I'd be surfing the net with it.

Poor support is exactly what is wrong with running old software. Suppose you survive pains of getting XP to run. It wont be long until you need software <insert name here> but it does not run on that legacy OS so upgrade is inevitable. You might try XP x64, it has rather different kernel from 32 bit counterpart (newer one). Maybe that would do the trick. By the way you can rearm Windows7 few times to extend trial to 120 days. Or you can do some other things. Im not even sure what happens when trial expires. I use one VM with expired 2008 r2 server trial and all i get is nag screen and no updates.



Now my update: i made interesting observation. I played FEAR3 for a period of time. GPU was working really loud and there was no lag whatsoever. I had no FPS counter visible so i dont know numbers but it was totally smooth on highest settings. Right after i started arma3 which lags quite a lot. Now GPU worked rather silently. Not sure what to make of it. Also this entire session lasted longer than what it took for system to go down earlier. Interesting fact is that when i had stability issues i was also running vmware with powered on VM. this time i had no VM on. So i suspect vmware might make qemu VM unstable. Will test this hypothesis in following days.

Offline

#1360 2014-03-16 19:21:53

pereczes
Member
Registered: 2014-03-08
Posts: 14

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

everything has a cost wink ... removed the NVIDIA card, and left only powercolor 6950

not behaving anymore as used to be:
-> HDMI no signal (though not 100% sure if cable is not broken... next thing to check)
-> on HDMI port both on BIOS setup strange characters, more precisely roughly 30%
of the text is displayed with wrong characters. "Loading operating system" is displayed
correctly, though the linux grub menu is the same messed up... Radeon driver would
just freeze the system (host!!), without driver managed to log in and write this...

as I was not sure if the latest gigabyte bios would have caused this (never used booting with
the radeon since I started the experiment), I reverted it to earlier version, but no changes.

Question: as I suspect that I might have corrupted the bios with all the experiments,
is there a way to reflash the bios from linux?

thanks

Offline

#1361 2014-03-17 02:15:59

fukhda
Member
Registered: 2014-02-24
Posts: 2

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Hi all,

I have been working on VGA passthrough for a while but no success yet. The prbolem I got is code12 for VGA card assigned to Win7 VM. Please check my work here and any comments are welcome. Thanks in advance, guys.

[Somethings to be noted first]
I am a newbie to linux and kvm. So please correct me if anything wrong.
I am working on Fedora 20, not archlinux.
The ingredients nbhs provided in post1. I do not know how to apply them properly in Fedora. (Will explain how I did it later)

[Env. setup]
CPU: Intel(R) Core(TM) i5-4430 CPU @ 3.00GHz
Motherboard: ASUS B85M-E
RAM: 4GB DDR3 1600 MHz
DISK:
VGA1: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller (rev 06)
VGA2: AMD Radeon HD 7700


[Patches]
Following is my way to apply tngredients (nbhs provided in post1) in Fedora.

1. linux-mainline.tar.gz
The base is kernel linux-3.13.3 (https://www.kernel.org/pub/linux/kernel … 3.3.tar.gz)
I manually merge the diff code (six *.patch files, such as override_for_missing_acs_capabilities.patch) into linux-3.13.3. And add CONFIG_VIFO*=y in menuconfig. Then rebuild the kernel and install.

2. qemu-git.tar.gz
The base is qemu-1.7.0 (http://wiki.qemu-project.org/download/q … .0.tar.bz2)
Just follow the configure switch according to PKGBUILD

  ./configure --prefix=/usr --sysconfdir=/etc --audio-drv-list='pa alsa sdl oss' \
              --python=/usr/bin/python2 --smbd=/usr/bin/smbd \
              --enable-docs --libexecdir=/usr/lib/qemu \
              --disable-gtk --enable-linux-aio --enable-seccomp \
              --enable-spice --localstatedir=/var
  make
  make install

3. seabios-git.tar.gz
I am not doing any change here. Just run make in qemu-1.7.0/roms/seabios

[Grub.cfg]
Add below switches in /boot/grub2/grub.cfg
pcie_acs_override=downstream intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1

So, cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-3.13.3 root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/swap vconsole.font=latarcyrheb-sun16 rd.lvm.lv=fedora/root pcie_acs_override=downstream intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 rhgb quiet LANG=en_US.UTF-8

[Before launching VM]
1. blacklist radeon in /etc/modprobe.d/blacklist.conf

2. make vfio-bind.service according from 1st post into /etc/systemd/system
   add DEVICES="0000:04:00.0 0000:04:00.1" in /etc/vfio-pci.cfg
   /*
   || This service is not launched automatically while machine reboots.
   || Instead, I manually run vfio-bind 0000:04:00.0 0000:04:00.1 before launching VM
   */

3.

modprobe -r kvm_intel
modprobe kvm_intel emulate_invalid_guest_state=0

4.
/* vfio-bind is from 1st post */

vfio-bind 0000:04:00.0 0000:04:00.1

 

[Launch VM]
I did a clean installation using the Win7x32.iso downloaded from MSDN. Once installation completed, "-drive file=/home/test/fuhsiao/win7.iso,id=isocd -device ide-cd,bus=ahci.1,drive=isocd" is removed from the below script.

qemu-kvm --enable-kvm -M q35 -m 2048 \
-cpu host -smp 1,sockets=1,cores=1,threads=1 \
-bios /usr/local/src/qemu-1.7.0/roms/seabios/out/bios.bin \
-device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
-device vfio-pci,host=04:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on \
-device vfio-pci,host=04:00.1,bus=root.1,addr=00.1 \
-device ahci,bus=pcie.0,id=ahci  \
-drive file=/home/test/fuhsiao/test.img,id=disk,format=raw \
-drive file=/home/test/fuhsiao/win7.iso,id=isocd -device ide-cd,bus=ahci.1,drive=isocd \
-device ide-hd,bus=ahci.0,drive=disk \
-boot c \

[The problem is?]
In win7 device manager, it showed that passed AMD card has got code 12 "The device can not find enough free resources that it can use"

[What I have tried to solve the problem]
1. Instead of passing through AMD Radeon HD 7700, I also tried NVIDIA EGVA GTX650. Still code12.

2. Diable iGPU
VGA1: iGPU is disabled from BIOS
VGA2: AMD Radeon HD 7700
VGA3: NVIDIA EGVA GTX650
Either passing AMD or NVIDIA, still code12.

3. Use the different qemu source
git://github.com/awilliam/qemu-vfio.git tags/vfio-pci-for-qemu-20131003.0
NOT the earlier http://wiki.qemu-project.org/download/q … .0.tar.bz2. Still code12.


[FYI]

lspci
00:00.0 Host bridge: Intel Corporation 4th Gen Core Processor DRAM Controller (rev 06)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06)
00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller (rev 06)
00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06)
00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 04)
00:16.0 Communication controller: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 (rev d4)
00:1c.2 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #3 (rev d4)
00:1c.4 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #5 (rev d4)
00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation B85 Express LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 04)
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 09)
04:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde LE [Radeon HD 7730/8730]
04:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series]


lsgroup
### Group 0 ###
    00:00.0 Host bridge: Intel Corporation 4th Gen Core Processor DRAM Controller (rev 06)
### Group 1 ###
    00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06)
### Group 2 ###
    00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller (rev 06)
### Group 3 ###
    00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06)
### Group 4 ###
    00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 04)
### Group 5 ###
    00:16.0 Communication controller: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 (rev 04)
### Group 6 ###
    00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 04)
### Group 7 ###
    00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 04)
### Group 8 ###
    00:1c.0 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 (rev d4)
### Group 9 ###
    00:1c.2 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #3 (rev d4)
### Group 10 ###
    00:1c.4 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #5 (rev d4)
### Group 11 ###
    00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 (rev 04)
### Group 12 ###
    00:1f.0 ISA bridge: Intel Corporation B85 Express LPC Controller (rev 04)
    00:1f.2 SATA controller: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] (rev 04)
    00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 04)
### Group 13 ###
    03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 09)
### Group 14 ###
    04:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde LE [Radeon HD 7730/8730]
    04:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series]

Offline

#1362 2014-03-17 12:08:25

AKSN74
Member
From: Taichung, Taiwan
Registered: 2014-02-18
Posts: 52

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Hello, guys.
Now I got a another problem.

I'm not sure it's GTX480 problem or KVM problem.

When I entered code, KVM can start normally and it can pass my GTX480 into VM.
But when I plug DVI cable to GTX480, it got nothing but no signal. Even tried another DVI, same result.

I know KVM is working because I'm already installed TeamViewer in guest OS and it can connect, also I can see OS screen.
Does someone tried before?

Offline

#1363 2014-03-17 12:14:45

novist
Member
Registered: 2014-03-14
Posts: 47

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

AKSN74 wrote:

Hello, guys.
Now I got a another problem.

I'm not sure it's GTX480 problem or KVM problem.

When I entered code, KVM can start normally and it can pass my GTX480 into VM.
But when I plug DVI cable to GTX480, it got nothing but no signal. Even tried another DVI, same result.

I know KVM is working because I'm already installed TeamViewer in guest OS and it can connect, also I can see OS screen.
Does someone tried before?

no signal sounds like your card is not passed through.

Offline

#1364 2014-03-17 13:17:50

AKSN74
Member
From: Taichung, Taiwan
Registered: 2014-02-18
Posts: 52

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

novist wrote:
AKSN74 wrote:

Hello, guys.
Now I got a another problem.

I'm not sure it's GTX480 problem or KVM problem.

When I entered code, KVM can start normally and it can pass my GTX480 into VM.
But when I plug DVI cable to GTX480, it got nothing but no signal. Even tried another DVI, same result.

I know KVM is working because I'm already installed TeamViewer in guest OS and it can connect, also I can see OS screen.
Does someone tried before?

no signal sounds like your card is not passed through.

But it pass-through I'm sure, because Windows 7 detected and driver installation is successful.

Last edited by AKSN74 (2014-03-17 13:18:24)

Offline

#1365 2014-03-17 13:57:52

TripleSpeeder
Member
Registered: 2011-05-02
Posts: 47

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Okay, I am out of ideas now. I got everything running perfectly when starting qemu manual. Now i want to move to a libvirt xml file, so i can start/stop/manage my VMs with virtmanager. But no matter what I do, i don't get the card passed through.
Here is a minimal xml config to reproduce:

<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>win7</name>
  <uuid>87e41de8-b3a5-4d76-a048-5d8d206aacc2</uuid>
  <memory unit='KiB'>6144000</memory>
  <currentMemory unit='KiB'>6144000</currentMemory>
  <vcpu placement='static' current='2'>4</vcpu>
  <os>
    <type arch='x86_64' machine='pc-q35-1.5'>hvm</type>
    <boot dev='hd'/>
    <bootmenu enable='yes'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <cpu mode='custom' match='exact'>
    <model fallback='allow'>SandyBridge</model>
    <vendor>Intel</vendor>
    <feature policy='require' name='vme'/>
    <feature policy='require' name='dtes64'/>
    <feature policy='require' name='vmx'/>
    <feature policy='require' name='erms'/>
    <feature policy='require' name='xtpr'/>
    <feature policy='require' name='smep'/>
    <feature policy='require' name='pcid'/>
    <feature policy='require' name='est'/>
    <feature policy='require' name='monitor'/>
    <feature policy='require' name='smx'/>
    <feature policy='require' name='tm'/>
    <feature policy='require' name='acpi'/>
    <feature policy='require' name='osxsave'/>
    <feature policy='require' name='ht'/>
    <feature policy='require' name='pdcm'/>
    <feature policy='require' name='fsgsbase'/>
    <feature policy='require' name='f16c'/>
    <feature policy='require' name='ds'/>
    <feature policy='require' name='tm2'/>
    <feature policy='require' name='ss'/>
    <feature policy='require' name='pbe'/>
    <feature policy='require' name='ds_cpl'/>
    <feature policy='require' name='rdrand'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <pm>
    <suspend-to-mem enabled='no'/>
    <suspend-to-disk enabled='no'/>
  </pm>
  <devices>
    <emulator>/usr/sbin/qemu-system-x86_64</emulator>
    <controller type='pci' index='0' model='pcie-root'/>
    <controller type='pci' index='1' model='dmi-to-pci-bridge'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </controller>
    <controller type='pci' index='2' model='pci-bridge'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/>
    </controller>
    <controller type='usb' index='0'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x2'/>
    </controller>
    <controller type='sata' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </controller>
    <memballoon model='none'/>
  </devices>
  <seclabel type='none'/>
  <qemu:commandline>
    <qemu:arg value='-device'/>
    <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/>
    <qemu:arg value='-bios'/>
    <qemu:arg value='/usr/share/qemu/bios.bin'/>
  </qemu:commandline>
</domain>

When starting this instance e.g. through "virsh start win7" i get the following error:

# virsh start win7
error: Failed to start domain win7
error: internal error: early end of file from monitor: possible problem:
qemu-system-x86_64: -device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: vfio: error opening /dev/vfio/13: Operation not permitted
qemu-system-x86_64: -device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: vfio: failed to get group 13
qemu-system-x86_64: -device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: Device initialization failed.
qemu-system-x86_64: -device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: Device 'vfio-pci' could not be initialized

What I did:

  • Make sure that AMD-card is assigned to vfio

  • Edit /etc/libvirt/qemu.conf and set user/group qemu runs as to "root"

  • Getting desperate: chmod a+rw /dev/vfio/13

But no luck. Everytime the same error :-(

Does anyone have a clue what I am missing? As I said, when I launch qemu manually (as root) everything works fine...

Offline

#1366 2014-03-17 14:12:20

Blind Tree Frog
Member
Registered: 2013-12-31
Posts: 27

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Blind Tree Frog wrote:
Bronek wrote:
Blind Tree Frog wrote:

1) Do I need multiple video cards or can this be done with just one? ...

2) Any source I should look at to set this up from a fresh install? ...

I also plan to build such a machine, with essentially headless host and Windows running on selected cores with VGA passthrough. For the time being my plan is to use the newest stable kernel and rely on top post in this thread, since it seems to be kept up-to date (thanks nbhs !)

I've been swamped lately and I'm only now getting back to this thread, but I noticed that it looks like my first question might be doable.  So 'yay!' for that.  Skimming also seems to suggest that powering through the first post is going to be my best option for the second.

I'm planning on reinstalling my machine this week and give this another go.  Hopefully I'll get it working and be able to report back with great success.  I'll be sure to take notes.

I got portions of this to work last night without trouble, but proceeding much further ran into difficulty.

Using the mainline, bios, and qemu code from the first post everything looked to build correctly.  I switched kernels and passed "quiet iommu video=efifb:off pci-stub.ids=...." as the cmd line (where '....' would be the id's for my one video card and my USB devices).  I also blacklisted 'radeon' as well as enabling the service described in post one.  Reboot.  I then SSH'd in for the rest of the steps.

The good news is that I was able to boot the seagate BIOS and see the output on my screen.   It came up and said that it couldn't find any boot devices.

The bad news is that I got no further than that even if I passed a LiveCD ISO in with the '-cdrom' option; The BIOS still claimed that it couldn't find a bootable device.  Also, I had to dial back some of the USB ID's I was passing to PCI stub as they didn't seem to work when passed to qemu.  And if I didn't blacklist the radeon driver qemu wouldn't pick it up regardless of if it was in the pci_stub.ids list or not. And the vfio-bind service does seem to properly bind the USB devices, but fails to bind the video card so it needs to be run twice (Once by the system as per enabling, and once by the user after boot.  The first time might not be required honestly but the second time is).

Hopefully I'll be able to investigate some more sometime this week and get meaningful questions.

Hardware:
ASUS Sabertooth 990FX/Gen3 R2
Asus Radeon HD7770 GHz Ed.

Offline

#1367 2014-03-17 14:45:01

aw
Member
Registered: 2013-10-04
Posts: 921
Website

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

novist wrote:

EDIT:
Im adding benchmark that does not make any sense. As you notice DirectCompute and especially DirectX 11 are more than one could wish for. However complex directx9 is right down the toilet. My brain cant figure out any scenario where this would make sense. It is sad because most of the games nowdays are still directx9 neutral
http://i61.tinypic.com/ictrgo.png

What is this benchmark?


http://vfio.blogspot.com
Looking for a more open forum to discuss vfio related uses?  Try https://www.redhat.com/mailman/listinfo/vfio-users

Offline

#1368 2014-03-17 15:20:46

novist
Member
Registered: 2014-03-14
Posts: 47

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

aw wrote:
novist wrote:

EDIT:
Im adding benchmark that does not make any sense. As you notice DirectCompute and especially DirectX 11 are more than one could wish for. However complex directx9 is right down the toilet. My brain cant figure out any scenario where this would make sense. It is sad because most of the games nowdays are still directx9 neutral
http://i61.tinypic.com/ictrgo.png

What is this benchmark?

passmark performance test ( https://www.passmark.com/products/pt.htm )

Offline

#1369 2014-03-17 15:46:58

aw
Member
Registered: 2013-10-04
Posts: 921
Website

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

novist wrote:
aw wrote:
novist wrote:

EDIT:
Im adding benchmark that does not make any sense. As you notice DirectCompute and especially DirectX 11 are more than one could wish for. However complex directx9 is right down the toilet. My brain cant figure out any scenario where this would make sense. It is sad because most of the games nowdays are still directx9 neutral
http://i61.tinypic.com/ictrgo.png

What is this benchmark?

passmark performance test ( https://www.passmark.com/products/pt.htm )

Ok, last time I tried passmark the VM blue screened regardless of having an assigned GPU.  I'll try it again.


http://vfio.blogspot.com
Looking for a more open forum to discuss vfio related uses?  Try https://www.redhat.com/mailman/listinfo/vfio-users

Offline

#1370 2014-03-17 18:59:02

trimm
Member
Registered: 2014-03-06
Posts: 31

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Hello again guys.

I wanted to give you an quick update on my setup.
I had a 1TB raw image partitioned on a BTRFS drive and it was unbearable slow. It took ages loading stuff (however, writing did not seem that bad).

I fixed it by following Arch guide(disabling CoW): https://wiki.archlinux.org/index.php/Btrfs

$ mv /path/to/dir /path/to/dir_old
$ mkdir /path/to/dir
$ chattr +C /path/to/dir
$ cp /path/to/dir_old/* /path/to/dir
$ rm -rf /path/to/dir_old

Now its as fast as it can be and games load much, much faster.

Another thing though, and its my sound. I gave up on passing through my USB headset(crackling noise) and sharing sound between my host and guest. (I tried following the first post without success)
Im thinking I can passthrough my integrated sound on the motherboard, and I tried doing it like this:

Binding the sound:

vfio-pci 0000:00:1b.0

In my dmesg I get the following:

vfio-pci 0000:00:1b.0: kvm assign device

And in my script I have this:

-device vfio-pci,host=00:1b.0

No errors in Linux, but I get a red mark over my audio icon in Windows. Going into "sound" tab inside audio properties and the whole VM totally freezes.

I passthroughed with vfio-pci, a drive and my secondary network card without any issues, however I have not had any success with audio.
I have also passthroughed my Xbox Controller and Rocksmith USB adapter.

Any help is appreciated!

Offline

#1371 2014-03-17 20:48:31

pereczes
Member
Registered: 2014-03-08
Posts: 14

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

anybody tried and succeeded with ATIWinflash to reflash radeon card under qemu?

I tried ... but completely corrupted bios. Now booted with qxl, TechPowerUp GPU-Z can see the card but BIos Version is just a messy string.

Another strange thing is that my 6950 was showing 768 Shaders, though everybody is reporting double the ammount. It is like I would have only one core.

Offline

#1372 2014-03-17 20:54:59

aw
Member
Registered: 2013-10-04
Posts: 921
Website

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

pereczes wrote:

anybody tried and succeeded with ATIWinflash to reflash radeon card under qemu?

I would strongly discourage this.  The ROM BAR is entirely emulated to the guest, we enable and read the ROM on the first guest access, from then on the guest only reads from the cached copy.  Any sort of ROM update utility is likely to get very, very confused by this.


http://vfio.blogspot.com
Looking for a more open forum to discuss vfio related uses?  Try https://www.redhat.com/mailman/listinfo/vfio-users

Offline

#1373 2014-03-17 20:59:30

aw
Member
Registered: 2013-10-04
Posts: 921
Website

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

trimm wrote:

Another thing though, and its my sound. I gave up on passing through my USB headset(crackling noise) and sharing sound between my host and guest. (I tried following the first post without success)
Im thinking I can passthrough my integrated sound on the motherboard, and I tried doing it like this:

Binding the sound:

vfio-pci 0000:00:1b.0

In my dmesg I get the following:

vfio-pci 0000:00:1b.0: kvm assign device

And in my script I have this:

-device vfio-pci,host=00:1b.0

No errors in Linux, but I get a red mark over my audio icon in Windows. Going into "sound" tab inside audio properties and the whole VM totally freezes.

I passthroughed with vfio-pci, a drive and my secondary network card without any issues, however I have not had any success with audio.
I have also passthroughed my Xbox Controller and Rocksmith USB adapter.

Any help is appreciated!

I haven't had any trouble passing HDA audio from the chipset through to the guest.  I notice a discrepancy in your process though, the string "kvm assign device" is only printed out by virt/kvm/iommu.c:kvm_assign_device() which is only called if using pci-assign instead of vfio-pci.  AFAIK either will work, but I don't know what to trust in your report...


http://vfio.blogspot.com
Looking for a more open forum to discuss vfio related uses?  Try https://www.redhat.com/mailman/listinfo/vfio-users

Offline

#1374 2014-03-17 21:18:10

stefan_vgapass
Member
Registered: 2014-03-17
Posts: 6

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

Hi KVM vga passthrough enthusiasts,

   Thank you so much for your posts, they were invaluable for a KVM vga passthrough beginner like myself to be able to find my way through this unknown teritory.
   
   I can confirm that I've finally got KVM vga passthrough working with an windows 7 x64 guest.
   What finally helped is something from FruitieX's post that made me realize I was still trying to get vga passthrough to work with a 3 month old qemu, so I tried qemu git which worked.
   

FruitieX wrote:

1. Compiled latest qemu and seabios from git, used these.

   FruitieX's post - https://bbs.archlinux.org/viewtopic.php … 6#p1390326
   
Specs:

Mainboard: intel DX79TO http://ark.intel.com/products/55800/Int … ard-DX79TO
CPU: Intel(R) Core(TM) i7-3820 CPU @ 3.60GHz
Host graphics card: Asus Nvidia GeForce GT 620 2GB mem
Guest graphics card ( passed to the windows guest ): XFX Radeon HD 7850 2GB mem
Host OS: headless Ubuntu 12.04.3 LTS x64
Host kernel: Linux engine 3.14.0-031400rc5-generic #201403022235 SMP Mon Mar 3 03:36:27 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Guest OS: windows 7 ultimate x64
Guest OS disk: virtio ( running 2 virtual HDDs - win7 is a hog after installation ~ 20GB of diskspace used so I've added a second disk )
Guest Network: virtio bridged network

I'm passing to the windows guest the ATI VGA ( without HDMI ), an usb port, and the onboard Intel HDA sound card therefore getting video, usb and audio inside my windows guest.


   Initially I thought that I need to compile all VFIO kernel module in the kernel ( not as modules ) so I spent time compiling 3.14.0 with .*VFIO=y .
   Then I booted accidentally back into the original ubuntu built 3.14 and KVM vga passthrough works fine, with these kernel modules

# grep VFIO /boot/config-3.14.0-031400rc5-generic 
CONFIG_VFIO_IOMMU_TYPE1=m
CONFIG_VFIO=m
CONFIG_VFIO_PCI=m
CONFIG_VFIO_PCI_VGA=y
CONFIG_KVM_VFIO=y

   I used latest qemu-git and seabios from git.
   I've configured pci_stub to bind to the 3 components that I'm passing to the VM by re-building initramfs like this:

vim /etc/initramfs-tools/modules
pci_stub ids=1002:6819,1002:aab0,8086:1d20

sudo update-initramfs -u

   This is how I boot the windows guest ( using vfio-pci to bind before this qemu command - see original post #1 for vfio-pci ) :

/opt/qemu-git/bin/qemu-system-x86_64 -enable-kvm -M q35 \
-m 8196 -mem-prealloc -mem-path /mnt/hugepages \
-cpu SandyBridge \
-smp 4,sockets=1,cores=2,threads=2 \
-bios /root/kvm-vga-passthrough/vfio-post3.13/seabios/seabios/out/bios.bin -vga none \
-boot order=cd,menu=on \
-device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
-device vfio-pci,host=04:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on \
-device vfio-pci,host=00:1d.0,bus=root.1,addr=00.1 \
-device vfio-pci,host=00:1b.0,bus=root.1,addr=00.2 \
-device ahci,bus=pcie.0,id=ahci \
-netdev bridge,br=br0,id=hostnet0 \
-device virtio-net-pci,netdev=hostnet0,id=net0 \
-drive file=/var/lib/libvirt/images/wind764test02.img,id=disk,format=raw -device ide-hd,bus=ahci.0,drive=disk \
-drive file=/var/lib/libvirt/images/wind764test02-disk02.img,id=disk02,format=raw -device ide-hd,bus=ahci.1,drive=disk02 \
-drive file=/var/lib/libvirt/images/Windows.7.SP1.ENG.x86-x64.iso,id=isocd -device ide-cd,bus=ahci.2,drive=isocd

Tip:
In order to be able to use bridged network I had to tell qemu-git to allow it in:

# cat /opt/qemu-git/conf/bridge.conf
allow br0

Tests:
I've ran unigine heaven and valley tests ( don't know how they compare with running with windows 7 as host os )
Unigine valley https://unigine.com/products/valley/

Unigine Valley Benchmark 1.0
FPS:	33.4
Score: 1396
Min FPS:	18.3
Max FPS:	60.9

System
Platform:	Windows 7 (build 7601, Service Pack 1) 64bit
CPU model:	Intel Xeon E312xx (Sandy Bridge) (3599MHz) x2
GPU model:	AMD Radeon HD 7800 Series 13.251.0.0 (2048MB) x1

Settings
Render:	Direct3D11
Mode:	1920x1200 2xAA fullscreen
Preset	Custom
Quality	High

Unigine heaven https://unigine.com/products/heaven/

Unigine Heaven Benchmark 4.0
FPS:	31.7
Score: 798
Min FPS: 7.3
Max FPS: 62.7

System
Platform:	Windows 7 (build 7601, Service Pack 1) 64bit
CPU model:	Intel Xeon E312xx (Sandy Bridge) (3599MHz) x2
GPU model:	AMD Radeon HD 7800 Series 13.251.0.0 (2048MB) x1

Settings
Render:	Direct3D11
Mode:	1920x1200 2xAA fullscreen
Preset	Custom
Quality	High
Tessellation:	Moderate

I've ran crysis 3 demo with 1920x1200 antialiasing 2x smooth no issues.
I've ran starcraft 2 max settings 1920x1200 no issues.

Next things to try: KVM vga passthrough with a linux guest and Steam client running on the ATI HD7850 !

Offline

#1375 2014-03-17 21:27:15

pereczes
Member
Registered: 2014-03-08
Posts: 14

Re: KVM VGA-Passthrough using the new vfio-vga support in kernel =>3.9

aw wrote:
pereczes wrote:

anybody tried and succeeded with ATIWinflash to reflash radeon card under qemu?

I would strongly discourage this.  The ROM BAR is entirely emulated to the guest, we enable and read the ROM on the first guest access, from then on the guest only reads from the cached copy.  Any sort of ROM update utility is likely to get very, very confused by this.

tried it already... probably could not damage.. saw afterwards following output on my terminal

Device option ROM contents are probably invalid (check dmesg).
Skip option ROM probe with rombar=0, or load from file with romfile=
qemu-system-x86_64: vfio-pci: Cannot read device rom at 0000:04:00.0

added though

-device vfio-pci,host=04:00.0,bus=root.1,multifunction=on,x-vga=on,addr=0.0,romfile=$ROMBIOSPATH/Powercolor.HD6970.2048.110221.rom

but strange enough GPU-Z, reports the increase of shaders (6950 versus 6970) and increase of freq 800 versus 880, but
the number of shaders is half, as one of the cores would not be able...

-> is there any other way to check if both cores are active or GPU-Z is right?
-> is there any way from linux to reload the ROM?

Offline

Board footer

Powered by FluxBB