I had tried to passthrough my LSI SAS1068E to a virtual machine in XenServer 6.0 or 6.1, I forget, but I couldn’t get it working for some reason. I didn’t troubleshoot it very much though, a few Google searches seemed to point to my whitebox setup and driver/support issues. Recently, XenServer 6.2 was released so I thought I would try this again on my whitebox server. To my surprise I was able to get PCI passthrough working pretty easily on 6.2. For this setup I’m using a XenServer 6.2 host with a LSI SAS1068E card set to IT mode, so RAID is disabled and the card is JBOD, with Ubuntu Server 12.04 as the guest OS using the LSI card and being able to access the drives attached to it.

On your XenServer host run lspci and get the device ID of the device you want to passthrough. Mine was 02:00.0.

Next edit /boot/extlinux.conf and add pciback.hide=(deviceID) to the options and run extlinux -i /boot then reboot the XenServer host.

Now we need to grab the uuid of the VM that you want to passthrough the device to. We need to shut it down to modify the params of the VM. Then we set the paramater to passthrough the device using its device ID.

Start the VM. After that we can make the required changes to the VM so it can access the device. SSH to the VM and we need to add iommu=soft swiotlb=force to GRUB_CMDLINE_LINUX_DEFAULT, save the changes then run update-grub and reboot.

SSH back into the VM and a fdisk -l should list the drives connected to the LSI card. You can also run lspci on the VM and it should list the LSI card with device ID 00:00.0. This was really easy to get working and it opens a few more possibilities with your infrastructure. Credit to this blog post for most of the commands and Google for how to edit Grub2 in Ubuntu Server.