免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5535 | 回复: 2
打印 上一主题 下一主题

有谁知道虚拟机显卡的问题? [复制链接]

论坛徽章:
0
1 [报告]
发表于 2006-09-05 18:03 |显示全部楼层
xen是不是可以直接利用主机的单独显卡?

论坛徽章:
0
2 [报告]
发表于 2006-09-05 23:22 |显示全部楼层
在xen user's manual中有如下叙述:

5.3 Driver Domain Configuration (Domain 驱动配置)


5.3.1 PCI

Individual PCI devices can be assigned to a given domain to allow that domain direct access to the PCI hardware. To use this functionality, ensure that the PCI Backend is compiled in to a privileged domain (e.g. domain 0) and that the domains which will be assigned PCI devices have the PCI Frontend compiled in. In XenLinux, the PCI Backend is available under the Xen configuration section while the PCI Frontend is under the architecture-specific "Bus Options" section. You may compile both the backend and the frontend into the same kernel; they will not affect each other.

The PCI devices you wish to assign to unprivileged domains must be "hidden" from your backend domain (usually domain 0) so that it does not load a driver for them. Use the pciback.hide kernel parameter which is specified on the kernel command-line and is configurable through GRUB (see Section 2.5). Note that devices are not really hidden from the backend domain. The PCI Backend ensures that no other device driver loads for those devices. PCI devices are identified by hexadecimal slot/funciton numbers (on Linux, use lspci to determine slot/funciton numbers of your devices) and can be specified with or without the PCI domain:
(bus:slot.func) example (02:1d.3)

(domain:bus:slot.func) example (0000:02:1d.3)

An example kernel command-line which hides two PCI devices might be:
root=/dev/sda4 ro console=tty0 pciback.hide=(02:01.f)(0000:04:1d.0)

To configure a domU to receive a PCI device:

Command-line:
    Use the pci command-line flag. For multiple devices, use the option multiple times.
    xm create netcard-dd pci=01:00.0 pci=02:03.0

Flat Format configuration file:
    Specify all of your PCI devices in a python list named pci.
    pci=['01:00.0','02:03.0']

SXP Format configuration file:
    Use a single PCI device section for all of your devices (specify the numbers in hexadecimal with the preceding '0x'). Note that domain here refers to the PCI domain, not a virtual machine within Xen.

    (device (pci
     (dev (domain 0x0)(bus 0x3)(slot 0x1a)(func 0x1)
     (dev (domain 0x0)(bus 0x1)(slot 0x5)(func 0x0)
    )

There are a number of security concerns associated with PCI Driver Domains that you can read about in Section 9.2

也就是说dom0中的一个pci可以被domu使用.  而显卡也是一个pci设备.
没有用过这么高级的特性

论坛徽章:
0
3 [报告]
发表于 2006-09-09 00:16 |显示全部楼层
Utilizing IOMMUs for Virtualization in Linux and Xen是linux symposium 2006上的一篇论文
linux symposium的论文集可以去
http://www.linuxsymposium.org/2006/
下载
另请参考
http://blog.chinaunix.net/u/7667/showart.php?id=145599
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP