xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Jeremy Fitzhardinge <jeremy@goop.org>, xen-devel@lists.xensource.com
Subject: [GIT PULL] pv/pciback-2.6.32
Date: Tue, 9 Mar 2010 10:42:00 -0500	[thread overview]
Message-ID: <20100309154200.GA22018@phenom.dumpdata.com> (raw)

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@intel.com>
          Weidong Han  <weidong.han@intel.com>
          Yuji Shimada <shimada-yxb@necst.nec.co.jp>
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 ]

                 reply	other threads:[~2010-03-09 15:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100309154200.GA22018@phenom.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=jeremy@goop.org \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).