Phoronix: QEMU: Support For Passing GPUs To Virtual Machines
There's ongoing work so that graphics cards can be assigned for use by virtual machines with QEMU...
http://www.phoronix.com/vr.php?view=MTI2OTk
Phoronix: QEMU: Support For Passing GPUs To Virtual Machines
There's ongoing work so that graphics cards can be assigned for use by virtual machines with QEMU...
http://www.phoronix.com/vr.php?view=MTI2OTk
Wow.... these are such exotic argurments!! I love such things. Pass GPU directly to the VM is surely the final move to use Linux and run a windows vm for gaming!!
I'm just dreaming, but it really seems someone is actually "working" on it! Thanks
To be honest, since Xen is able to do it for some time now and I have heard of nobody really using it, I have little hope this getting usable soon. Or is Xen that much more difficult to use then kvm?
Well, first you do need an IOMMU, that means support for vt-d or amd-vi in the CPU and in the mainboard.
Would it be possible for an ugly hack in the kernel to emulate an IOMMU? I mean it has direct PCI access, doesn't it? How much performance would it cost?
have you looked up how to set up xen? It's not easy. Have you looked up how to do GPU passthrough? That's also a challenge. People don't do it because its such a pain to work on. I've looked into it myself since it would also allow multiplayer gaming on 1 PC but the effort wasn't worth it.
VMware and Parallels also offers a gpu passthrough solution but you have to pay for them and IIRC they're somewhat limiting.
I totally disagree with Xen being more difficult than kvm. It's perhaps not the easiest of hypervisors, but at least it offers a wealth of documentation. KVM on the other hand is a disaster! Perhaps the hype about KVM is because it's the new kid on the block?
When I started out on my quest for VGA passthrough I was set on KVM and almost dismissed Xen. One reason for dismissing Xen was the wealth of documentation which at that time I misinterpreted for Xen being complex. Yes, Xen offers multiple options and tools to reach the same goal (see below), but the fact that there is a lot of documentation is a real asset. The other reason for almost dismissing it was some reports here on Phoronix about poor performance. Boy, am I glad I dug a little deeper into that. It turned out there was some bug (which is long fixed now), but for most of these tests here I don't really see a point other than proofing that KVM is getting closer to Xen in some areas. As to real-life performance: you need to see it to believe it.
Some of the tests here are a bit questionable, for example comparing KVM and Xen with Linux HVM guests. The only reason I use Linux HVM guests from time to time is to check out a distro, but I don't expect performance miracles. Most times a Linux PV guest will perform better since it has access to the hardware drivers of the hypervisor and doesn't need an emulation layer. Linux HVM guest performance can be improved by using PVHVM drivers and I believe (or hope) they have been used by Phoronix. With Xen offering several options, it's really necessary to be precise about a test setup. Newcomers would certainly be helped with an explanation of why one option was chosen over another.
Recently Xen developers have rolled out a lot of improvements with kernel 3.x and Xen 4.x. Now that Xen 4.2 stable is out (but not yet included in the major distros) things should become even easier, with better support for more hardware. Xen 4.2 also does away with a lot of accumulated code and layers that are not really helping it. The new xl toolstack replaces xm and xend (among others), and is more efficient.
It is true there are probably not many KVM users who have accomplished VGA passthrough, though it's been done. But there are quite many people already doing Xen VGA passthrough.
From a practical perspective, I am using Xen and Windows with VGA/PCI passthrough for semi-professional photography work. When I compare my Xen system with native Windows 7 installs on similar hardware owned by friends, I find even less reasons to look back. If you have the right hardware, I would go for it any second.
I'm using Xen for some time now with VGA passthrough to a Windows 7 VM. It works incredibly well!
Yes, it has been a pain to set up, mainly because of my stubborness to use unconfirmed hardware (a Nvidia Quadro 600 for the Windows guest system didn't work, my Quadro 2000 now works perfect) and because of making it work on a distro that hasn't yet seen a how-to on that.
The most important step before embarking on it is to check that the hardware meets the requirements. If it does, it's quite simple.
Here some links to start with:
http://www.overclock.net/t/1205216/g...irtual-machine - good tutorial with a long thread and a wealth of information.
http://forums.linuxmint.com/viewtopic.php?f=42&t=112013 - can't judge my own tutorial, but I hope it helps. It should work likewise (or very similar) under Ubuntu. There is some more info in posts following the tutorial, to tweak stuff.
You've been able to do gpu pass through for awhile now on KVM/qemu. Yes, you need iommu support for it to work.
There's at least one YouTube video of it (the guy plays Lost Planet).
Search for fedora kvm gpu passthrough
This is great because graphics rendering under QEMU is really slow!
Also if you do Android development it uses QEMU to run the Android virtual machine image, and the graphics is shit slow.
Nice to have that, but don't you have a remote session to the VM in qemu? How does it help to have a dedicated GPU then?
I use e.g. spice to connect to a vm on my system, loopback would be fast enough but still it would downscale any graphic effects.