[Xen-users] Re: PCI passthrough of cciss HBA
Matthias Reif wrote:
I would like to run the following issue past the list to confirm that my
problem analysis makes sense or whether I missed something:
We have a HP ML370G6 server with VT-x and VT-d enabled in the BIOS. It
is equipped with two Smart Array HBAs - one connected to the HDD array
(SmartArray P800) and one connected to an LTO tape drive (SmartArray
P212). Both controllers use the same driver on the dom0 (cciss).
dom0 OS = CentOS 5.3 Linux 2.6.18-164.el5xen x86_64
Xen = 3.4.1
My plan was to use PCI passthrough to give a domU unrestricted access to
the tape drive. However, I have been unable to get pciback to seize the
P212 controller at boot time.
Firstly, I modified the initrd to preload the pciback module:
# mkinitrd -f --preload=pciback /boot/initrd-$(uname -r).img $(uname -r)
Then I added the following lines to modprobe.conf:
options pciback hide=(0000:10:00.0)
install cciss /sbin/modprobe pciback ; /sbin/modprobe --first-time
title CentOS (2.6.18-164.el5xen)
kernel /boot/xen.gz-3.4.1 iommu=1
module /boot/vmlinuz-2.6.18-164.el5xen ro root=LABEL=/
NB: Passing pciback.hide=(0000:10:00.0) as a kernel parameter does not
kernel: Unknown boot option `pciback.hide=(10:00.0)': ignoring
I believe this is because the pciback driver is compiled as a module in
the CentOS stock kernel.
After booting with the above config the cciss driver has taken control
of PCI device 000:10:00.0 instead of the pciback module.
It seems the pciback module is loaded after the HBA driver (cciss) and
therefore does not get a chance to seize the Smart Array P212
controller. This is most likely because the pciback driver is compiled
as a module instead of into the kernel. The cciss driver is loaded first
to gain access to the hard drive array (via the P800 controller) and to
load the pciback module and its configuration. At that point it is too
late for pciback to gain control of the Smart Array Controller as the
cciss driver has already bound to it.
I belive to fix this I would have to recompile the CentOS kernel with
the pciback compiled in statically. Is that correct or is there any
Using the pciback kernel or module option is not the only way to have
pciback seize a device. You could use calls to the sysfs structure to
unbind the device from the cciss driver and then assign it to pciback.
Something along those lines might work after loading pciback:
echo -n '0000:10:00.0' > /sys/bus/pci/drivers/cciss/unbind
echo -n '0000:10:00.0' > /sys/bus/pci/drivers/pciback/new_slot
echo -n '0000:10:00.0' > /sys/bus/pci/drivers/pciback/bind
Make sure you are not using any of the resources (i.e. exclude this is
vgscan or automounts) to avoid unexpected results...
Xen-users mailing list