打印

[軟件] KVM with VT-d passthrough for gaming? (Benchmarked)

KVM for normal home using?

How to? I'm interesting

TOP

引用:
原帖由 XT 於 2016-2-17 15:50 發表
KVM for normal home using?

How to? I'm interesting
It's actually very simple,
you first need hardware supporting VT-d, that is your mainboard and CPU.
This can be checked, for Intel, http://ark.intel.com/, see if you can find VT-d in your CPU/mainboard chipset.
You also need 2 GPUs, 1 of them can be Intel Graphics, another is any discrete card.
At the end you need 2 video cables, connecting from both the Intel IGP and your discrete graphics card to the same monitor, or you can do a dual monitor setup like what I showed.

Then, follow this tutorial closely:
http://vfio.blogspot.ca/2015/05/ ... es-part-3-host.html
http://vfio.blogspot.ca/2015/05/ ... es-part-4-host.html

A shorter tutorial (which can be used without referring to the above two), is easier to follow but not using the best method (imho):
http://www.andrewklau.com/my-fed ... without-compromise/

And there is a good video showing the whole process from bare metal, he basically followed the first 2 links I gave:
https://www.youtube.com/watch?v=GtV_pYIgxOA

In short, here is what I did (just a general description, excluding detailed scripting, please refer to the above tutorials and their explanation are excellent)
1. Enable VT-d in BIOS/UEFI interface (suppose you have the mainboard+CPU, graphics card shouldn't matter except it's too old, I am using AMD HD7950)
2. In your Linux host, install the virtualization tools. I am using qemu-kvm and virt-manager, plus OVMF (installed separated from the normal qemu-kvm packages)
3. Then enable IOMMU and set to prevent the graphics card from being loaded by Linux host (meaning that the pass-through GPU cannot be used by Linux).
For step 3 I suggest you follow the first 2 links, Alex's blog. It outlined a more advanced method with a direct vfio-bind, without first passing the graphics to pci-stub.
4.You can then move on to set up the virtual machine, and add the PCI devices in virt-manager.
-When creating the virtual machine, don't start it right away, check the box to configure it first. Over there,
in Overview set the Firmware to UEFI instead of BIOS.
-(very important, spent me 3 days to figure out) In CPUs configuration, in Model, type host-passthrough.
Without this, the virtual machine will always boot into BSoD.
-You have to add both the graphics card's graphic processor and HD audio, so there will be 2 PCI devices to be added.
If after adding, the machine doesn't boot, try to uncheck the box in the PCI devices "ROM_BAR". My machine works only without them. It seems they are useful when you want to give it a specific ROM file.
5. If everything works, you should be able to enter Windows and see the cards there. Go ahead and install the driver, on installation completed successfully, the graphics card will start to generate signal output.

It will be better if you start by following the tutorial, and I can then help with specific issues that you might find (I have 3 days of experience LOL)

TOP

引用:
原帖由 Sandbo 於 2016/2/17 15:33 發表

Exactly like on bare metal
竟然玩到?!!!
Performance hit 差幾多
天然系長髮眼鏡娘 最高
Lucky Star 聯盟 - 美幸
Kancolle - 大淀, 翔鶴 (太太), 烏海 , 瑞鶴

TOP

Damn ... B85 not support VT-D
要最高級既  x99 ...

[ 本帖最後由 dom 於 2016-2-17 17:13 編輯 ]
天然系長髮眼鏡娘 最高
Lucky Star 聯盟 - 美幸
Kancolle - 大淀, 翔鶴 (太太), 烏海 , 瑞鶴

TOP

引用:
原帖由 dom 於 2016-2-17 17:10 發表


竟然玩到?!!!
Performance hit 差幾多
GTA V做到60fps,但就有時一疾,要睇下點tune,
今晚行轉3DMark再對比下bare metal performance

TOP

引用:
原帖由 dom 於 2016-2-17 17:11 發表
Damn ... B85 not support VT-D
要最高級既  x99 ...
即係點?
想玩vt-d只可以砌機?

TOP

引用:
原帖由 dom 於 2016-2-17 17:11 發表
Damn ... B85 not support VT-D
要最高級既  x99 ...
Q87同Q77都得
印象中夾到Skylake果隻底板就H系chipset都得

TOP

引用:
原帖由 Sandbo 於 2016-2-16 05:36 發表

I can't tell, it seems in terms of IOMMU group, the PCI bridge is linked to whatever connected to PCI-E x16 slot 1 (it reports three devices in the IOMMU group), this is also the case for z97 so I do ...
我太耐無玩都唔醒起
我以前都試過呢個問題

TOP

引用:
原帖由 YCST 於 2016-2-17 23:30 發表

Q87同Q77都得
印象中夾到Skylake果隻底板就H系chipset都得
z77 係咪唔得 ...

TOP

引用:
原帖由 XT 於 2016-2-18 00:14 發表

z77 係咪唔得 ...
應該唔得

TOP

引用:
原帖由 XT 於 2016-2-18 00:14 發表

z77 係咪唔得 ...
https://www-ssl.intel.com/conten ... ards/000005758.html

要check板

TOP

引用:
原帖由 tamalemon 於 2016/2/17 22:11 發表


即係點?
想玩vt-d只可以砌機?
我粒 U 行到 VT-d (Core i7-4790) , 係chipset (B85) 無話support VT-d
但係 ASUS 係 BIOS 係有 VT-d support , 我又開左

[ 本帖最後由 dom 於 2016-2-18 01:22 編輯 ]
天然系長髮眼鏡娘 最高
Lucky Star 聯盟 - 美幸
Kancolle - 大淀, 翔鶴 (太太), 烏海 , 瑞鶴

TOP

引用:
原帖由 XT 於 2016-2-18 00:16 發表

https://www-ssl.intel.com/conten ... ards/000005758.html

要check板
I think most boards after Haswell should just work, it's also the time the people started doing this.

TOP

引用:
原帖由 YCST 於 2016-2-17 23:34 發表

我太耐無玩都唔醒起
我以前都試過呢個問題
At the end it was my fault, I didn't follow strictly the tutorial to set the CPU model to "host-passthrough",
this is not in the drop down menu nor anywhere, I have to type it manually.

This is the only choice that allows a true passthrough of CPU configuration to the guest, any other options will have a mismatch and bring down the graphics once it's accessed.

TOP

引用:
原帖由 Sandbo 於 2016-2-18 01:19 發表

I think most boards after Haswell should just work, it's also the time the people started doing this.
using e3 1245 v2

TOP