WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [GIT PULL] pv/pciback-2.6.32

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [GIT PULL] pv/pciback-2.6.32
From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Date: Tue, 9 Mar 2010 10:42:00 -0500
Cc:
Delivery-date: Tue, 09 Mar 2010 07:58:35 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.19 (2009-01-05)
Hey Jeremy

Please pull the pv/pciback-2.6.32 branch which has the back-port of the
PCI backend drivers to complement the PCI front-end driver.

git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen.git
pv/pciback-2.6.32

As in the past, I've also done a merge with xen/next, which is in the
pv/merge.xen.next, since the merge is bit hairy (again!?)


I've tested this with MSI and IRQ devices where the PCI frontend and PCI
backend are both xen/next. 

Bugs:
 - There are three different PCI backend choices: Passthrough, Slot and
   Virtual PCI. There is not need for all of them on X86. Will remove
   two soon.

How to use it:

[copy-n-paste from xen/docs/misc/vtd.txt of the appropiate section]


Title   : How to do PCI Passthrough with VT-d
Authors : Allen Kay    <allen.m.kay@xxxxxxxxx>
          Weidong Han  <weidong.han@xxxxxxxxx>
          Yuji Shimada <shimada-yxb@xxxxxxxxxxxxxxx>
Created : October-24-2007
Updated : July-07-2009

How to turn on VT-d in Xen
--------------------------

Xen with 2.6.32 dom0:
1 ) git clone git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen.git 
pv/merge.xen.next
3 ) cd xen.git; make menuconfig
4 ) change XEN->"PCI-device backend driver" from "M" to "*".
5 ) make all
6 ) make install && make modules_install
10) lspci - select the PCI BDF you want to assign to guest OS
11) If you see device which BAR's is not aligned you can use the
'pci=resource_alignmnet=<BDF"' command line to make it page aligned.
11) "hide" pci device from dom0 as following sample grub entry:

title Xen-Fedora Core (2.6.32-xen)
        root (hd0,0)
        kernel /boot/xen.gz com1=115200,8n1 console=com1 iommu=1
        module /boot/vmlinuz-2.6.32 root=LABEL=/ ro console=hvc0 
xen-pciback.hide=(07:00.0)(08:05.0)(08:07.0)(08:07.2) 
pci=resource_alignment=08:05.0
        module /boot/initrd-2.6.32.img

    or use dynamic hiding via PCI backend sysfs interface:
        a) check if the driver has binded to the device
            ls -l /sys/bus/pci/devices/0000:01:00.0/driver
            ... /sys/bus/pci/devices/0000:01:00.0/driver -> 
../../../../bus/pci/drivers/igb
        b) if yes, then unload the driver first
            echo -n 0000:01:00.0 >/sys/bus/pci/drivers/igb/unbind
        c) add the device to the PCI backend
            echo -n 0000:01:00.0 >/sys/bus/pci/drivers/pciback/new_slot
        d) let the PCI backend bind to the device
            echo -n 0000:01:00.0 >/sys/bus/pci/drivers/pciback/bind

12) reboot system (not requires if you use the dynamic hiding method)
13) add "pci" line in /etc/xen/pv.conf for to assigned devices
        pci = [ '01:00.0', '03:00.0' ]
15) start PV guest and use "lspci" to see the passthru device and
    "ifconfig" to see if IP address has been assigned to NIC devices.

[ rest is cut off since it talks about HVM/VT-D which is not the point
of this patch ]

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [GIT PULL] pv/pciback-2.6.32, Konrad Rzeszutek Wilk <=