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

Показать описание
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.
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
- 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.
Benchmarks:
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.
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
- 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.
Benchmarks:
Комментарии