有没有人愿意写一篇 PCI Passthrough 的教程?
Tofloor
poster avatar
la******ng@outlook.com
deepin
2017-02-15 18:38
Author
PCI Passthrough 貌似能够让虚拟机获取原生硬体效能,让在 Linux 下全开玩 3A 大作不再是梦想。
请问有人愿意写一篇浅显易懂的教程吗?

Reply Favorite View the author
All Replies
avatar
呆了个呆
deepin
2017-02-15 18:54
#1
IBM上这个是不是,我看不懂。。。http://www.ibm.com/developerworks/cn/linux/l-pci-passthrough/
Reply View the author
avatar
kingskill
deepin
2017-02-15 18:58
#2
这是平台+IO的虚拟化技术吧?

看了下ibm的介绍,似乎每台终端可以独占一部分云资源,但这似乎是玩无盘站的方向。。。单机可能不是这个概念。。。
Reply View the author
avatar
moli3
deepin
2017-02-15 19:05
#3
本帖最后由 moli3 于 2017-2-15 11:12 编辑

我之前看过pci passthrough,好像对cpu的vt-d技术有要求。
   It is very common that the BIOS or the host OS disables the IOMMU by default. So before any attempt to use it please make sure that
  • Your motherboard has an IOMMU unit. 主板IOMMU单元
  • Your CPU supports the IOMMU. cpu支持IOMUU
  • The IOMMU is enabled in the BIOS. bios开启IOMMU
  • The VM must run with VT-x/AMD-V and nested paging enabled. 虚拟机使用VT-x/AMD-v
  • Your Linux kernel was compiled with IOMMU support (including DMA remapping, see CONFIG_DMAR kernel compilation option). The PCI stub driver (CONFIG_PCI_STUB) is required as well. 内核支持IOMMU
  • Your Linux kernel recognizes and uses the IOMMU unit (intel_iommu=on boot option could be needed). Search for DMAR and PCI-DMA in kernel boot log. 内核开启iommu开关


https://www.virtualbox.org/manual/ch09.html#pcipassthrough
Reply View the author
Comments
nanpuyue
2017-02-15 21:14
1
avatar
kingskill
deepin
2017-02-15 19:14
#4
https://bbs.deepin.org/post/134944
我之前看过pci passthrough,好像对cpu的vt-d技术有要求。
   It is very common that the BIOS or the hos ...

我的板子华硕H110M AM2,貌似bios里有vt-d选项。。。就是不知道怎么玩罢了。

貌似单机不能玩的吧?
Reply View the author
avatar
moli3
deepin
2017-02-15 19:17
#5
https://bbs.deepin.org/post/134944
我的板子华硕H110M AM2,貌似bios里有vt-d选项。。。就是不知道怎么玩罢了。

貌似单机不能玩的吧? ...

单机可以,virtualbox vmware kvm都支持,你可以参考下我给的链接,并且vt-d也要cpu支持才行。我的cpu不支持
Reply View the author
avatar
kingskill
deepin
2017-02-15 19:23
#6
https://bbs.deepin.org/post/134944
单机可以,virtualbox vmware kvm都支持,你可以参考下我给的链接,并且vt-d也要cpu支持才行。我的cpu不支 ...

我的是i3 6100,3.7g的那个。貌似支持。回去试试。
Reply View the author
avatar
zhangs
deepin
2017-02-15 23:03
#7
笔记本是完全不支持(独立显卡放到虚拟机里面)的,别想了

台式机应该没人会傻到只装linux的吧。。。
Reply View the author
avatar
la******ng@outlook.com
deepin
2017-02-16 05:31
#8
https://bbs.deepin.org/post/134944
笔记本是完全不支持(独立显卡放到虚拟机里面)的,别想了

台式机应该没人会傻到只装linux的吧。。。[tail ...

為了玩游戏还要切换系统很麻烦捏!
Reply View the author
avatar
zhangs
deepin
2017-02-16 05:34
#9
本帖最后由 langyxxl 于 2017-2-15 21:36 编辑
https://bbs.deepin.org/post/134944
為了玩游戏还要切换系统很麻烦捏!

其实,你用pci passthrough更麻烦,你会遇到一堆bug和限制,就算运行起来了,还有可能遇到性能问题。。。

教程倒是很简单,跟着做就行
https://wiki.debian.org/VGAPassthrough
https://bufferoverflow.io/gpu-passthrough/
之类的,网上很多,最好有相关驱动知识,或者qemu知识,不然出问题都描述不清楚
Reply View the author
avatar
齿轮
deepin
2017-02-17 04:57
#10
https://bbs.deepin.org/post/134944
為了玩游戏还要切换系统很麻烦捏!

放弃了lol,逐渐学习dota中
Reply View the author
avatar
189******23
deepin
2017-02-18 08:54
#11
千万别开PCI passthrough,如果你只有一张网卡的话。。因为这个一开就等于把PCI硬件直接独享给了虚拟机。你的电脑会马上黑屏的。。
Reply View the author