You are not logged in.

#2201 2014-06-24 22:01:19

mdm
Member
Registered: 2014-06-22
Posts: 3

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

Does the nosnoop patch still need to be applied to qemu.git?  I have check and my Nvidia card does have NoSnoop+.  I applied this patch http://lists.nongnu.org/archive/html/qe … 00597.html, but now get the follow errors:

[ 8055.445808] vfio-pci 0000:01:00.0: enabling device (0006 -> 0007)
[ 8056.454042] vfio_ecap_init: 0000:01:00.0 hiding ecap 0x19@0x900
[ 8056.713926] qemu-system-x86[7317]: segfault at 4 ip 00007f27870719b0 sp 00007fff40d8ca38 error 4 in libc-2.19.so[7f2786f3c000+1a4000]

Qemu:

qemu-system-x86_64 -enable-kvm -M q35 -m 1024 \
-cpu host,hv-time,kvm=off -smp 6,sockets=1,cores=6,threads=1 \
-bios /usr/share/qemu/bios.bin -vga vmware \
-device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
-device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on \
-drive file=/vm/windows.img,id=disk,format=raw -device ide-hd,bus=ide.0,drive=disk

Without the patch, I am able to get into Windows 8 but receive error 43.

Last edited by mdm (2014-06-24 22:08:23)

Offline

#2202 2014-06-24 23:14:08

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

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

mdm wrote:

Does the nosnoop patch still need to be applied to qemu.git?  I have check and my Nvidia card does have NoSnoop+.  I applied this patch http://lists.nongnu.org/archive/html/qe … 00597.html, but now get the follow errors:

[ 8055.445808] vfio-pci 0000:01:00.0: enabling device (0006 -> 0007)
[ 8056.454042] vfio_ecap_init: 0000:01:00.0 hiding ecap 0x19@0x900
[ 8056.713926] qemu-system-x86[7317]: segfault at 4 ip 00007f27870719b0 sp 00007fff40d8ca38 error 4 in libc-2.19.so[7f2786f3c000+1a4000]

Qemu:

qemu-system-x86_64 -enable-kvm -M q35 -m 1024 \
-cpu host,hv-time,kvm=off -smp 6,sockets=1,cores=6,threads=1 \
-bios /usr/share/qemu/bios.bin -vga vmware \
-device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
-device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on \
-drive file=/vm/windows.img,id=disk,format=raw -device ide-hd,bus=ide.0,drive=disk

Without the patch, I am able to get into Windows 8 but receive error 43.

No, the nosnoop patch is defunct.  It was never going to be a reliable solution.  Since you're already using kvm=off, I don't know what's wrong.  Is anyone running Windows 8 successfully with NVIDIA?  TBH, I've almost exclusively tested Windows 7.


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

#2203 2014-06-24 23:44:54

dwe11er
Member
Registered: 2014-03-18
Posts: 73

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

aw wrote:
mdm wrote:

Does the nosnoop patch still need to be applied to qemu.git?  I have check and my Nvidia card does have NoSnoop+.  I applied this patch http://lists.nongnu.org/archive/html/qe … 00597.html, but now get the follow errors:

[ 8055.445808] vfio-pci 0000:01:00.0: enabling device (0006 -> 0007)
[ 8056.454042] vfio_ecap_init: 0000:01:00.0 hiding ecap 0x19@0x900
[ 8056.713926] qemu-system-x86[7317]: segfault at 4 ip 00007f27870719b0 sp 00007fff40d8ca38 error 4 in libc-2.19.so[7f2786f3c000+1a4000]

Qemu:

qemu-system-x86_64 -enable-kvm -M q35 -m 1024 \
-cpu host,hv-time,kvm=off -smp 6,sockets=1,cores=6,threads=1 \
-bios /usr/share/qemu/bios.bin -vga vmware \
-device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
-device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on \
-drive file=/vm/windows.img,id=disk,format=raw -device ide-hd,bus=ide.0,drive=disk

Without the patch, I am able to get into Windows 8 but receive error 43.

No, the nosnoop patch is defunct.  It was never going to be a reliable solution.  Since you're already using kvm=off, I don't know what's wrong.  Is anyone running Windows 8 successfully with NVIDIA?  TBH, I've almost exclusively tested Windows 7.

I had my GTS450 running under Windows 8.1, with 335.xx driver tho.

Offline

#2204 2014-06-25 01:04:35

rabcor
Banned
Registered: 2013-02-09
Posts: 500

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

Enabling intel's DMA remapping in the kernel/cmdline is breaking my nvidia's vdpau on an Intel/Nvidia setup (as I state in this thread) I assume either vdpau or the DMA Remapping code need some patch for this.

Where can I get help with this?

Offline

#2205 2014-06-25 01:08:37

mdm
Member
Registered: 2014-06-22
Posts: 3

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

belliash wrote:
mdm wrote:

I have been working through getting this setup on my laptop.  I am at the point now where I just get a black screen when booting up my virtual machine.  Here are my laptop specs:

Sager np8250
CPU: i7-4800MQ w/ HD 4600
MB Chipset: HM87
GPU: GTX 780M using Optimus

Before I get into more troubleshooting, is it possible to even use the GTX 780M with the pass through since it is on a laptop with Optimus?

Install Windows (8 preferrably) using additional emulated VGA like currus or vmware. Then install nvidia drivers and check if it will be working, or if you get error 43.
If you got error 43, check if disabling and re-enablig nvidia card helps.

I was able to get Windows 8.1 to recognize the nvidia card with the latest drivers by disabling and then renabling, but I can't get Windows to use the Nvidia card.  I also cannot get the Nvidia control panel to open.  I may just be stuck since the Optimus Nvidia card doesn't have anything to write out to.  If I use -vga none, a window opens but it is a qemu command prompt.

Grub:

linux/vmlinuz-linux-mainline root=UUID=662044e6-2035-46dc-8300-6e205fc39365 rw pci-stub.ids=10de:119f intel_iommu=on  vfio_iommu_type1.allow_unsafe_interrupts=1 i915.enable_hd_vgaarb=1 kvm.ignore_msrs=1 quiet

 
Qemu:

sudo qemu-system-x86_64 -enable-kvm -M q35 -m 8192 \
-cpu host,hv-time,kvm=off -smp 4,sockets=1,cores=4,threads=1 \
-bios /usr/share/qemu/bios.bin \
-device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
-device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on \
-drive file=/vm/windows.img,id=disk,format=raw -device ide-hd,bus=ide.0,drive=disk

Offline

#2206 2014-06-25 17:52:00

belliash
Member
Registered: 2014-04-25
Posts: 16

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

mdm wrote:
belliash wrote:
mdm wrote:

I have been working through getting this setup on my laptop.  I am at the point now where I just get a black screen when booting up my virtual machine.  Here are my laptop specs:

Sager np8250
CPU: i7-4800MQ w/ HD 4600
MB Chipset: HM87
GPU: GTX 780M using Optimus

Before I get into more troubleshooting, is it possible to even use the GTX 780M with the pass through since it is on a laptop with Optimus?

Install Windows (8 preferrably) using additional emulated VGA like currus or vmware. Then install nvidia drivers and check if it will be working, or if you get error 43.
If you got error 43, check if disabling and re-enablig nvidia card helps.

I was able to get Windows 8.1 to recognize the nvidia card with the latest drivers by disabling and then renabling, but I can't get Windows to use the Nvidia card.  I also cannot get the Nvidia control panel to open.  I may just be stuck since the Optimus Nvidia card doesn't have anything to write out to.  If I use -vga none, a window opens but it is a qemu command prompt.

Grub:

linux/vmlinuz-linux-mainline root=UUID=662044e6-2035-46dc-8300-6e205fc39365 rw pci-stub.ids=10de:119f intel_iommu=on  vfio_iommu_type1.allow_unsafe_interrupts=1 i915.enable_hd_vgaarb=1 kvm.ignore_msrs=1 quiet

 
Qemu:

sudo qemu-system-x86_64 -enable-kvm -M q35 -m 8192 \
-cpu host,hv-time,kvm=off -smp 4,sockets=1,cores=4,threads=1 \
-bios /usr/share/qemu/bios.bin \
-device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
-device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on \
-drive file=/vm/windows.img,id=disk,format=raw -device ide-hd,bus=ide.0,drive=disk

No, it opens console because it shows it when there is no emulated card enabled.
You can also disable that console. There is described the same, or nearly the same problem with desktop nvidia GTX 7X0, so i think its not related to notebook and/or optimus. Optimus is a software solution.
I think our cards can have EFI instead of BIOS or sth... I'm not sure about that. But this problem was albo observed on desktop version of nvidia cards. Thats why Im waiting 'till anyone will try to pass through mobile radeon...

Offline

#2207 2014-06-26 13:30:20

FruitieX
Member
Registered: 2008-07-03
Posts: 18

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

Hey, just wanted to post a short success story and thank anyone who is involved with making VGA passthrough possible.

I carefully picked my PC parts to support VGA passthrough, and since building the PC about 4 months ago I've yet to find a game that can't run well on maxed out settings inside a freaking virtual machine! I don't even have a bare metal Windows install to compare performance with because I never felt the need for that. This is a really amazing accomplishment and in my opinion one of the most amazing things I've been able to do on a computer! :-)

So again thank you and best of luck for anyone trying to set up VGA passthrough!

Fancy scripts for automatic USB passthrough once a Windows guest has finished booting if anyone is interested: https://github.com/FruitieX/vm-scripts/ … er/scripts

Offline

#2208 2014-06-26 14:56:03

_pheinrich_
Member
Registered: 2014-05-26
Posts: 53

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

Cool,

I hope I will get this working on my machine too sad

Some weeks ago I had an i5 2500K and was a little bit frustrated to hear that this CPU does not support IOMMU. After a little bit of searching around in ebay I got an i5 3470 which supports IOMMU but I have no luck getting it to work.

I set up the vfio-bind and pci-stub stuff but every time I want to launch I get the following:

qemu-system-x86_64 -enable-kvm -M q35 -m 1024 -cpu host \
-smp 6,sockets=1,cores=6,threads=1 \
-bios /usr/share/qemu/bios.bin -vga none \
-device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
-device vfio-pci,host=02:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on
qemu-system-x86_64: -device vfio-pci,host=02:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: vfio: error, group 1 is not viable, please ensure all devices within the iommu_group are bound to their vfio bus driver.
qemu-system-x86_64: -device vfio-pci,host=02:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: vfio: failed to get group 1
qemu-system-x86_64: -device vfio-pci,host=02:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: Device initialization failed.
qemu-system-x86_64: -device vfio-pci,host=02:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: Device 'vfio-pci' could not be initialized

the last line makes me wonder a little bit ... why enabling ?

[pheinrich@ARCH tmp]$ dmesg | grep pci-stub
[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=bd845dd5-0a31-4cd0-ae57-875c43f15c30 rw intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 pci-stub.ids=10de:0140 quiet                                                                                                                                                                    
[    0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=bd845dd5-0a31-4cd0-ae57-875c43f15c30 rw intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 pci-stub.ids=10de:0140 quiet                                                                                                                                                             
[    0.691337] pci-stub: add 10DE:0140 sub=FFFFFFFF:FFFFFFFF cls=00000000/00000000                                                                                                  
[    0.691352] pci-stub 0000:02:00.0: claimed by stub                                                                                                                               
[    1.872554] pci-stub 0000:02:00.0: enabling device (0000 -> 0002)
[pheinrich@ARCH tmp]$ dmesg | grep IOMMU                                                                                                                                            
[    0.000000] Intel-IOMMU: enabled                                                                                                                                                 
[    0.114583] dmar: IOMMU 0: reg_base_addr fed90000 ver 1:0 cap c9008020660262 ecap f0105a                                                                                         
[    0.114654] IOAPIC id 2 under DRHD base  0xfed90000 IOMMU 0                                                                                                                      
[    0.619324] IOMMU 0 0xfed90000: using Queued invalidation                                                                                                                        
[    0.619326] IOMMU: Setting RMRR:                                                                                                                                                 
[    0.619335] IOMMU: Setting identity map for device 0000:00:1a.0 [0xcf0d5000 - 0xcf0e3fff]                                                                                        
[    0.619354] IOMMU: Setting identity map for device 0000:00:1d.0 [0xcf0d5000 - 0xcf0e3fff]                                                                                        
[    0.619362] IOMMU: Prepare 0-16MiB unity mapping for LPC                                                                                                                         
[    0.619368] IOMMU: Setting identity map for device 0000:00:1f.0 [0x0 - 0xffffff] 
[pheinrich@ARCH tmp]$ ls /dev/vfio/                                                                                                                                                 
1  vfio            

I want to passthrough the geforce 6600GT

[pheinrich@ARCH tmp]$ lspci | grep VGA
01:00.0 VGA compatible controller: NVIDIA Corporation GT200 [GeForce GTX 260] (rev a1)                                                                                              
02:00.0 VGA compatible controller: NVIDIA Corporation NV43 [GeForce 6600 GT] (rev a2) 

Offline

#2209 2014-06-26 15:15:25

aldum
Member
Registered: 2012-03-14
Posts: 8

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

_pheinrich_ wrote:

I want to passthrough the geforce 6600GT

[pheinrich@ARCH tmp]$ lspci | grep VGA
01:00.0 VGA compatible controller: NVIDIA Corporation GT200 [GeForce GTX 260] (rev a1)                                                                                              
02:00.0 VGA compatible controller: NVIDIA Corporation NV43 [GeForce 6600 GT] (rev a2) 

Okay, you can't do that. The 6600 GT (or any pre 7xxx card AFAWK) is not capable.
(I should know, I too wasted a week trying to get it work)
Try exchanging them, the 260 will work better for passthrough.

Offline

#2210 2014-06-26 15:37:48

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

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

_pheinrich_ wrote:

Cool,

I hope I will get this working on my machine too sad

Some weeks ago I had an i5 2500K and was a little bit frustrated to hear that this CPU does not support IOMMU. After a little bit of searching around in ebay I got an i5 3470 which supports IOMMU but I have no luck getting it to work.

I set up the vfio-bind and pci-stub stuff but every time I want to launch I get the following:

qemu-system-x86_64 -enable-kvm -M q35 -m 1024 -cpu host \
-smp 6,sockets=1,cores=6,threads=1 \
-bios /usr/share/qemu/bios.bin -vga none \
-device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
-device vfio-pci,host=02:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on
qemu-system-x86_64: -device vfio-pci,host=02:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: vfio: error, group 1 is not viable, please ensure all devices within the iommu_group are bound to their vfio bus driver.
qemu-system-x86_64: -device vfio-pci,host=02:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: vfio: failed to get group 1
qemu-system-x86_64: -device vfio-pci,host=02:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: Device initialization failed.
qemu-system-x86_64: -device vfio-pci,host=02:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: Device 'vfio-pci' could not be initialized

You don't need vfio_iommu_type1.allow_unsafe_interrupts=1, but that's not the problem here.

Look at:

ls -l /sys/bus/pci/devices/0000\:02\:00.0/iommu_group/devices/

All of the endpoints listed there need to be attached to either vfio-pci or pci-stub.  If you can't make that happen, then you need to apply and enable the ACS override patch.  And then as aldum wrote, a 6600GT is pretty old, if it doesn't work already I don't think there's any point in adding code to trying to support it.  If you want a cheap Nvidia card, go grab a GT 635 off ebay.


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

#2211 2014-06-26 18:53:38

_pheinrich_
Member
Registered: 2014-05-26
Posts: 53

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

ok i found this:

[pheinrich@ARCH ~]$ ls -l /sys/bus/pci/devices/0000\:02\:00.0/iommu_group/devices/
total 0
lrwxrwxrwx 1 root root 0 Jun 26 20:48 0000:00:01.0 -> ../../../../devices/pci0000:00/0000:00:01.0
lrwxrwxrwx 1 root root 0 Jun 26 20:48 0000:00:01.1 -> ../../../../devices/pci0000:00/0000:00:01.1
lrwxrwxrwx 1 root root 0 Jun 26 20:48 0000:01:00.0 -> ../../../../devices/pci0000:00/0000:00:01.0/0000:01:00.0
lrwxrwxrwx 1 root root 0 Jun 26 20:48 0000:02:00.0 -> ../../../../devices/pci0000:00/0000:00:01.1/0000:02:00.0

but the third line is my GTX  0000:01:00.0 or am I wrong?

whould be an 7950GT better than my old 6600GT ?

Trying to passthrough the GTX 260 is a problem because the current nvidia driver does not support the GT 6600 anymore so I have to install the old nvidia driver to support the GT 6600 as host gpu

Offline

#2212 2014-06-26 19:03:44

belliash
Member
Registered: 2014-04-25
Posts: 16

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

you dont need any drivers on host. only on guest

Offline

#2213 2014-06-26 19:05:11

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

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

_pheinrich_ wrote:

ok i found this:

[pheinrich@ARCH ~]$ ls -l /sys/bus/pci/devices/0000\:02\:00.0/iommu_group/devices/
total 0
lrwxrwxrwx 1 root root 0 Jun 26 20:48 0000:00:01.0 -> ../../../../devices/pci0000:00/0000:00:01.0
lrwxrwxrwx 1 root root 0 Jun 26 20:48 0000:00:01.1 -> ../../../../devices/pci0000:00/0000:00:01.1
lrwxrwxrwx 1 root root 0 Jun 26 20:48 0000:01:00.0 -> ../../../../devices/pci0000:00/0000:00:01.0/0000:01:00.0
lrwxrwxrwx 1 root root 0 Jun 26 20:48 0000:02:00.0 -> ../../../../devices/pci0000:00/0000:00:01.1/0000:02:00.0

but the third line is my GTX  0000:01:00.0 or am I wrong?

That's correct, Intel consumer processors don't support ACS on the PEG root ports and Intel has not been able to confirm that isolation is provided between root ports.  You'll need the ACS override patch if you want the kernel to accept them as isolated.

whould be an 7950GT better than my old 6600GT ?

A slightly newer ancient card?  Probably not.  I've tested a 7300LE and it doesn't work very well.  My 8400GS works ok though, so 8-series might be the oldest I'd bother trying.


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

#2214 2014-06-26 20:06:24

_pheinrich_
Member
Registered: 2014-05-26
Posts: 53

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

ok thank you for your answer.

now I took the 6600GT as my primary host card and blocked the GTX 260 via pci-stub to use it with qemu.

qemu-system-x86_64: -device vfio-pci,host=02:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: vfio: error, group 1 is not viable, please ensure all devices within the iommu_group are bound to their vfio bus driver.
qemu-system-x86_64: -device vfio-pci,host=02:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: vfio: failed to get group 1
qemu-system-x86_64: -device vfio-pci,host=02:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: Device initialization failed.
qemu-system-x86_64: -device vfio-pci,host=02:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: Device 'vfio-pci' could not be initialized

same result as above ... so now I will try the ACS patch smile

maybe my ASUS P8P67 evo is the faulty part sad

Offline

#2215 2014-06-26 20:13:21

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

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

_pheinrich_ wrote:

ok thank you for your answer.

now I took the 6600GT as my primary host card and blocked the GTX 260 via pci-stub to use it with qemu.

qemu-system-x86_64: -device vfio-pci,host=02:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: vfio: error, group 1 is not viable, please ensure all devices within the iommu_group are bound to their vfio bus driver.
qemu-system-x86_64: -device vfio-pci,host=02:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: vfio: failed to get group 1
qemu-system-x86_64: -device vfio-pci,host=02:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: Device initialization failed.
qemu-system-x86_64: -device vfio-pci,host=02:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: Device 'vfio-pci' could not be initialized

same result as above ... so now I will try the ACS patch smile

maybe my ASUS P8P67 evo is the faulty part sad

Why would you expect it to be any different?  Swapping the two cards between the same two slots won't change the group.  Your motherboard has 3 x16 slots, installing one graphics card into the bottom black slot should put it into a separate IOMMU group if you're running a v3.15 kernel.


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

#2216 2014-06-26 20:17:59

_pheinrich_
Member
Registered: 2014-05-26
Posts: 53

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

yes but i wasn't able to get anything on my screen from my 6600GT plugged into the second slot.

Then I plugged it into the first slot and blocked the GTX 260 plugged into the second slot.
I thought it would work trying to passthrough the newer card smile

Now I am trying to patch a 3.15.1 kernel with the ACS patch provided in the first post.

Offline

#2217 2014-06-27 00:41:40

abdullah
Member
Registered: 2014-06-10
Posts: 34

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

Ok, I managed to passthrough the 8500GT Nvidia card, yet got error 43 or 42, can't remember, I will try to fix it later ( how to pass kvm off in virt-manager?)

Now, with the AMD HD 4760 card ( 4xxx HD series ), I managed to pass it through, but after installing the drivers and rebooting windows, it just would hang at the start screen (logo).
The HD 4 series card is very old, yet it got some power, so I'm asking, is the problem from the card or the driver? does this happen often with AMD cards ?
I got some other entry series AMD card (6 series) that I'm looking to test it just to see the results ( and share it with you ), and then, I would buy a newer card, I'm looking at Asus r9 280x OC, so what's your recommendation about it?

The other thing I'm looking to do, is to create 2 PC's back2back, each one with it's own passedthrough keyboard and mouse, the problem I'm facing is I could not manage to get any VGA output from the cards to the second screen ?.
Thanks.

Offline

#2218 2014-06-27 01:37:21

Slabity
Member
Registered: 2013-12-29
Posts: 40

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

Has anyone figured out how to get audio to work with libvirt? I've got everything except audio working right now. I'm thinking about using a different program to stream the audio from the guest to my host, but I wasn't sure how others were handling this.

Offline

#2219 2014-06-27 10:35:23

dwe11er
Member
Registered: 2014-03-18
Posts: 73

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

Slabity wrote:

Has anyone figured out how to get audio to work with libvirt? I've got everything except audio working right now. I'm thinking about using a different program to stream the audio from the guest to my host, but I wasn't sure how others were handling this.

Try global pulseaudio, cheap USB audio card or passthru host's HD audio.

Offline

#2220 2014-06-27 14:03:47

andy123
Member
Registered: 2011-11-04
Posts: 169
Website

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

dwe11er wrote:
Slabity wrote:

Has anyone figured out how to get audio to work with libvirt? I've got everything except audio working right now. I'm thinking about using a different program to stream the audio from the guest to my host, but I wasn't sure how others were handling this.

Try global pulseaudio, cheap USB audio card or passthru host's HD audio.

Or try pulseaudio over network (127.0.0.1). That's what I do.


i'm sorry for my poor english wirting skills…

Offline

#2221 2014-06-27 15:40:50

random_user9547
Member
Registered: 2014-06-27
Posts: 5

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

Hello,

I have tried VGA-Passthrough on my system but it fails.

My specifications are:
Motherboard: gigabyte ga 970 UD3
CPU: AMD FX 6300
VGA1: AMD HD 7790 on 01:00.0 01:00.01
VGA2: AMD HD 6450 on 06:00.0 06:00.01

The host OS uses HD 6450, I am trying to pass HD 7790 to a guest OS.

Qemu version:
qemu-x86_64 version 2.0.0, Copyright (c) 2003-2008 Fabrice Bellard

kernel version:
3.14.1-3-mainline #1 SMP PREEMPT (the one nbhs posted)

Added this to grub:
vfio_iommu_type1.allow_unsafe_interrupts=1 pci-stub.ids=1002:665c,1002:0002

binded the devices.

And got the Seabios output on the screen.

But after attachin something bootable to qemu, like this:
-drive file=/home/nbhs/windows.iso,id=isocd -device ide-cd,bus=ide.1,drive=isocd

I get:
qemu-system-x86_64: -device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: VFIO 0000:01:00.0 BAR 0 mmap unsupported. Performance may be slow
qemu-system-x86_64: vfio_bar_write(,0x0, 0x0, 4) failed: Device or resource busy
qemu-system-x86_64: vfio_bar_write(,0x4, 0x0, 4) failed: Device or resource busy
qemu-system-x86_64: vfio_bar_write(,0x8, 0x0, 4) failed: Device or resource busy
qemu-system-x86_64: vfio_bar_write(,0xc, 0x0, 4) failed: Device or resource busy
qemu-system-x86_64: vfio_bar_write(,0x10, 0x0, 4) failed: Device or resource busy
qemu-system-x86_64: vfio_bar_write(,0x14, 0x0, 4) failed: Device or resource busy
qemu-system-x86_64: vfio_bar_write(,0x18, 0x0, 4) failed: Device or resource busy
...

and a load of vfio_bar_write fails.

Any idea how to solve this one?

Offline

#2222 2014-06-27 16:48:16

Slabity
Member
Registered: 2013-12-29
Posts: 40

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

andy123 wrote:

Or try pulseaudio over network (127.0.0.1). That's what I do.

What's your method of doing this?

Last edited by Slabity (2014-06-27 20:27:21)

Offline

#2223 2014-06-27 17:59:45

sinny
Member
Registered: 2014-05-24
Posts: 75

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

random_user9547 wrote:

Hello,

I have tried VGA-Passthrough on my system but it fails.

My specifications are:
Motherboard: gigabyte ga 970 UD3
CPU: AMD FX 6300
VGA1: AMD HD 7790 on 01:00.0 01:00.01
VGA2: AMD HD 6450 on 06:00.0 06:00.01

The host OS uses HD 6450, I am trying to pass HD 7790 to a guest OS.

Qemu version:
qemu-x86_64 version 2.0.0, Copyright (c) 2003-2008 Fabrice Bellard

kernel version:
3.14.1-3-mainline #1 SMP PREEMPT (the one nbhs posted)

Added this to grub:
vfio_iommu_type1.allow_unsafe_interrupts=1 pci-stub.ids=1002:665c,1002:0002

binded the devices.

And got the Seabios output on the screen.

But after attachin something bootable to qemu, like this:
-drive file=/home/nbhs/windows.iso,id=isocd -device ide-cd,bus=ide.1,drive=isocd

I get:
qemu-system-x86_64: -device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: VFIO 0000:01:00.0 BAR 0 mmap unsupported. Performance may be slow
qemu-system-x86_64: vfio_bar_write(,0x0, 0x0, 4) failed: Device or resource busy
qemu-system-x86_64: vfio_bar_write(,0x4, 0x0, 4) failed: Device or resource busy
qemu-system-x86_64: vfio_bar_write(,0x8, 0x0, 4) failed: Device or resource busy
qemu-system-x86_64: vfio_bar_write(,0xc, 0x0, 4) failed: Device or resource busy
qemu-system-x86_64: vfio_bar_write(,0x10, 0x0, 4) failed: Device or resource busy
qemu-system-x86_64: vfio_bar_write(,0x14, 0x0, 4) failed: Device or resource busy
qemu-system-x86_64: vfio_bar_write(,0x18, 0x0, 4) failed: Device or resource busy
...

and a load of vfio_bar_write fails.

Any idea how to solve this one?

how about reading the topic first?..

installations are usually performed with qemu-emulated video, passthrough should be enabled on already installed os - this way it's easier to see what is wrong

Offline

#2224 2014-06-27 18:25:55

random_user9547
Member
Registered: 2014-06-27
Posts: 5

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

sinny wrote:

how about reading the topic first?..

installations are usually performed with qemu-emulated video, passthrough should be enabled on already installed os - this way it's easier to see what is wrong

It actually does not matter.
Even if I first install an OS(can be windows or linux) and later try to start it with a dedicated GPU i get the same error.

It seems to happen when qemu goes beyond seabios(starts anything graphical).

Offline

#2225 2014-06-27 18:57:33

Slabity
Member
Registered: 2013-12-29
Posts: 40

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

random_user9547 wrote:

It actually does not matter.
Even if I first install an OS(can be windows or linux) and later try to start it with a dedicated GPU i get the same error.

It seems to happen when qemu goes beyond seabios(starts anything graphical).

Could you post the result of `lspci -v`? The section related to your graphics card.

Last edited by Slabity (2014-06-27 18:58:20)

Offline

Board footer

Powered by FluxBB