Upload

Loading...

Qemu/KVM + vfio = Virtual machine for gaming with 95% of native performance = no more dual booting

129,280

Loading...

Loading...

Loading...

Rating is available when the video has been rented.
This feature is not available right now. Please try again later.
Published on Feb 2, 2014

Hi guys,

here's a demo of how I'm using Qemu/KVM + vfio to play Windows games in a VM running on Linux.

If you are dual-booting and hate loosing access to all you'r Linux apps while playing read on! If you're hardware support's it(2 gpus, VT-d) you might be able to do the same thing.


I start Linux and X.org using the onboard gpu and display a simple xfce on both monitors(xinerama).
Whenever I feel like playing Windows games I disable the left monitor using xrandr and start qemu which uses the passed-through pcie gpu as vga.

Now I have Windows on the left and Linux on the right. Keyboard and mouse are shared using synergy.

After finishing playing I simply shutdown Windows and extend the Linux desktop back to both screen(xrandr).

As you can tell by looking at the benchmarks(linked below) I get about 95% performance in the VM compared to native playing.
I still haven't maxed out the Linux configuration, so I might be able to get even more out of it, something close to 98% should be possible.

If you're looking for information on how to set up Qemu+VFIO: https://bbs.archlinux.org/viewtopic.p...
Also make sure you check out Alex Williamson's blog, he hast some very useful tips there: http://vfio.blogspot.com/

Please note that you'll need both a VT-d capable CPU and mainboard(or the AMD equivalent). And of course, 2 gpus, for example 1 dedicated PCIe card the onboard gpu of a core i* processor.

Hardware used:
- CPU: Core i7 4771
- Mainboard: ASRock Fatal1ty Z87 Killer
- GPU 1: Onboard Intel HD Graphics 4600 (i915), HDMI connected to left monitor, DVI-D connected to right monitor
- GPU 2: Gigabyte Windforce GTX 770, DVI-I connected to left monitor

Software used:
- Base: Gentoo Linux ~amd64
- Kernel: 3.13.1 with i915 VGA arbiter patches (http://lists.freedesktop.org/archives...)
- Qemu: Git version of 2014-02-02 (1.7.50). 1.7.0 is too old and won't work, at least not with nvidia cards.
- Synergy: 1.4.15 (Share Keyboard/Mouse between multiple PCs, http://synergy-foss.org/)

Benchmarks:
- Native: http://www.3dmark.com/3dm/2306367
- Emulated: http://www.3dmark.com/3dm/2329558

Loading...

When autoplay is enabled, a suggested video will automatically play next.

Up next


to add this to Watch Later

Add to

Loading playlists...