WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

[Xen-users] Re: PCI passthrough of cciss HBA

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-users] Re: PCI passthrough of cciss HBA
From: Christian Tramnitz <chris.ace@xxxxxxx>
Date: Wed, 30 Sep 2009 11:05:39 +0200
Delivery-date: Wed, 30 Sep 2009 02:07:20 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <OF9477312A.C45D0945-ONCA257641.0000496F-CA257641.00084015@xxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <OF9477312A.C45D0945-ONCA257641.0000496F-CA257641.00084015@xxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)
Matthias Reif wrote:

All,

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 --ignore-install cciss

grub.conf:

title CentOS (2.6.18-164.el5xen)
       root (hd0,0)
       kernel /boot/xen.gz-3.4.1 iommu=1
       module /boot/vmlinuz-2.6.18-164.el5xen ro root=LABEL=/
       module /boot/initrd-2.6.18-164.el5xen.img


NB: Passing pciback.hide=(0000:10:00.0) as a kernel parameter does not work:

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 other way?

Thanks
Matthias


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...


Best regards,
  Christian


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

<Prev in Thread] Current Thread [Next in Thread>