Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
XenPciPassthrough
Edit
PageHistory
Diff
Info
LikePages
Xen has a feature which lets you pass a [PCI] device through to an unprivileged domain. Only the unprivileged domain has access to this specific [PCI] device – the privileged domain binds to the [PCI] device with a dummy drive that stops the dom0 from accessing it as well. This could be used for passing a [SCSI] controller or [NIC] through to one domain, eg. for a file server or FireWall domU. !! What you'll need You'll have to compile in the right [PCI] backend driver for [Xen]. <verbatim> CONFIG_XEN_PCIDEV_FRONTEND=y (for DomU kernels) CONFIG_XEN_PCIDEV_BACKEND=y (for Dom0 kernels) </verbatim> You'll also need the [PCI] ID of the device in question, in the <tt>xx:xx:x</tt> notation displayed by lspci(8). Note that the formatting is important – don't drop or add leading 0's! For most recent version of Xen (http://wiki.xensource.com/xenwiki/XenParavirtOps), the [PCI] backend command line parameters have changed. Earlier to Linux 2.6.31, it was in some cases required to set the <tt>pciback.permissive</tt> option – this is for drivers which need to write to registers on the [PCI] device itself. Apparently some [NIC]s will fail to operate without this, and from what I've read it doesn't hurt to have it enabled regardless. In 2.6.31 and further the option is now <tt> pci=resource_alignment=xx:xx:x</tt>. !! Kernel options In <tt>grub.conf</tt>, add something like the following to your <tt>module</tt> line corresponding to the dom0 kernel (this is for kernels prior to 2.6.31): <verbatim> pciback.permissive pciback.hide=(03:00.0) </verbatim> Linux kernel 2.6.31 and further: <verbatim> pci=resource_alignment=03:00.0 xen-pciback.hide=(03:00.0) </verbatim> This assumes the device we are passing through has a [PCI] ID of <tt>03:00.0</tt>. !! [Xen] config file In your [Xen] config file for the domain, add a line that looks like the following, again assuming a [PCI] ID of <tt>03:00.0</tt>: <verbatim> pci = ['03:00.0'] </verbatim> Note that if this is a network interface, it will come up in addition to any you specify with your <tt>vif</tt> config option. ---- Part of CategoryXen
One page links to
XenPciPassthrough
:
Xen