Penguin
Note: You are viewing an old revision of this page. View the current version.

Xen has a feature which lets you pass a PCI device through to an unpriviledged domain. Only the unpriviledged domain has access to this specific PCI device - the priviledged 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 network interface through to one domain, eg for a fileserver or firewall domU.

What you'll need

You'll have to compile in the right PCI backend driver for Xen. I can't remember which this is at this point, I'll update this page next time I look at it.

You'll also need the PCI id of the device in question, in the xx:xx:x notation displayed by lspci. Note that the formatting is important - don't drop or add leading 0's!

In some cases it is required to set the pciback.permissive option - this is for drivers which need to write to registers on the pci device itself. Apparently some network cards will fail to operate without this, and from what I've read it doesn't hurt to have it enabled regardless.

Kernel options

In grub.conf, add something like the following to your kernel line. This assumes the device we are passing through has a PCI id of 03:00.0

pciback.permissive pciback.hide=(03:00.0)

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 03:00.0

pci = ['03:00.0']

Note that if this is a network interface, it will come up in addition to any you specify with you vif config option


Part of CategoryXen