ia64/xen-unstable

view docs/misc/vtd.txt @ 17601:6df8dcf48d9d

[IA64] cleanup: VTLB_PTE_IO_BIT is not used

VTLB_PTE_IO_BIT is not used any more.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
author Isaku Yamahata <yamahata@valinux.co.jp>
date Mon May 12 11:24:47 2008 +0900 (2008-05-12)
parents 2e6d2eac74d9
children 384f819f3ac0
line source
1 Title : How to do PCI Passthrough with VT-d
2 Authors : Allen Kay <allen.m.kay@intel.com>
3 Weidong Han <weidong.han@intel.com>
4 Created : October-24-2007
5 Updated : May-07-2008
7 How to turn on VT-d in Xen
8 --------------------------
10 1 ) cd xen-unstable.hg
11 2 ) make install
12 3 ) make linux-2.6-xen-config CONFIGMODE=menuconfig
13 4 ) change XEN->"PCI-device backend driver" from "M" to "*".
14 5 ) make linux-2.6-xen-build
15 6 ) make linux-2.6-xen-install
16 7 ) depmod 2.6.18.8-xen
17 8 ) mkinitrd -v -f --with=ahci --with=aacraid --with=sd_mod --with=scsi_mod initrd-2.6.18-xen.img 2.6.18.8-xen
18 9 ) cp initrd-2.6.18-xen.img /boot
19 10) lspci - select the PCI BDF you want to assign to guest OS
20 11) "hide" pci device from dom0 as following sample grub entry:
22 title Xen-Fedora Core (2.6.18-xen)
23 root (hd0,0)
24 kernel /boot/xen.gz com1=115200,8n1 console=com1
25 module /boot/vmlinuz-2.6.18.8-xen root=LABEL=/ ro xencons=ttyS console=tty0 console=ttyS0, pciback.hide=(01:00.0)(03:00.0)
26 module /boot/initrd-2.6.18-xen.img
28 12) reboot system
29 13) add "pci" line in /etc/xen/hvm.conf for to assigned devices
30 pci = [ '01:00.0', '03:00.0' ]
31 15) start hvm guest and use "lspci" to see the passthru device and
32 "ifconfig" to see if IP address has been assigned to NIC devices.
35 Caveat on Conventional PCI Device Passthrough
36 ---------------------------------------------
38 VT-d spec specifies that all conventional PCI devices behind a
39 PCIe-to-PCI bridge have to be assigned to the same domain.
41 PCIe devices do not have this restriction.
44 VT-d Works on OS:
45 -----------------
47 1) Host OS: PAE, 64-bit
48 2) Guest OS: 32-bit, PAE, 64-bit
51 Combinations Tested:
52 --------------------
54 1) 64-bit host: 32/PAE/64 Linux/XP/Win2003/Vista guests
55 2) PAE host: 32/PAE Linux/XP/Win2003/Vista guests
58 VTd device hotplug:
59 -------------------
61 2 virtual PCI slots (6~7) are reserved in HVM guest to support VTd hotplug. If you have more VTd devices, only 2 of them can support hotplug. Usage is simple:
63 1. List the VTd device by dom. You can see a VTd device 0:2:0.0 is inserted in the HVM domain's PCI slot 6. '''lspci''' inside the guest should see the same.
65 [root@vt-vtd ~]# xm pci-list HVMDomainVtd
66 VSlt domain bus slot func
67 0x6 0x0 0x02 0x00 0x0
69 2. Detach the device from the guest by the physical BDF. Then HVM guest will receive a virtual PCI hot removal event to detach the physical device
71 [root@vt-vtd ~]# xm pci-detach HVMDomainVtd 0:2:0.0
73 3. Attach a PCI device to the guest by the physical BDF and desired virtual slot(optional). Following command would insert the physical device into guest's virtual slot 7
75 [root@vt-vtd ~]# xm pci-attach HVMDomainVtd 0:2:0.0 7
77 VTd hotplug usage model:
78 ------------------------
80 * For live migration: As you know, VTd device would break the live migration as physical device can't be save/restored like virtual device. With hotplug, live migration is back again. Just hot remove all the VTd devices before live migration and hot add new VTd devices on target machine after live migration.
82 * VTd hotplug for device switch: VTd hotplug can be used to dynamically switch physical device between different HVM guest without shutdown.
85 VT-d Enabled Systems
86 --------------------
88 1) For VT-d enabling work on Xen, we have been using development
89 systems using following Intel motherboards:
90 - DQ35MP
91 - DQ35JO
93 2) As far as we know, following OEM systems also has vt-d enabled.
94 Feel free to add others as they become available.
96 - Dell: Optiplex 755
97 http://www.dell.com/content/products/category.aspx/optix?c=us&cs=555&l=en&s=biz
99 - HP Compaq: DC7800
100 http://h10010.www1.hp.com/wwpc/us/en/en/WF04a/12454-12454-64287-321860-3328898.html
102 For more information, pls refer to http://wiki.xensource.com/xenwiki/VTdHowTo.