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

Re: [Xen-users] pci passthrough how to that works?

To: Brian Krusic <brian@xxxxxxxxxx>
Subject: Re: [Xen-users] pci passthrough how to that works?
From: Matthias Reif <mattreif@xxxxxxxxxxxxx>
Date: Thu, 7 Jan 2010 09:57:01 +1100
Cc: Xen Users <xen-users@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 06 Jan 2010 14:58:11 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <6F8BDFDF-B8CB-4145-B291-959B8DBF170E@xxxxxxxxxx>
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>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx


xen-users-bounces@xxxxxxxxxxxxxxxxxxx wrote on 07/01/2010 09:32:23 AM:

> Hi,
>
> I'm running Centos 5.3 for dom0 and domUs and using Xen 3.4.1 (AMD V  
> enabled Sun box).
>
> Using lspci, I see that my device I wished ignored by dom0 so that I  
> can use it for 1 of my domUs is;
>
> 07:00.0
>
> In grub.conf, I added this to my module line;
>
> pciback.permissive pciback.hide (07:00.0)
>
> Upon reboot, lspci on dom0 still shows that pci device.
>
> I've also modded my modprob.conf;
>
> options pciback hide=(07:00.0)
>
> Any ideas how I can get pci passthrough to work?
>
> - Brian
>

The pciback module needs to be loaded into initrd, so it can seize the device at boot time.
Your boot log should confirm this if it says something like "unknwon kernel option pciback.hide
ignoring."

Try something like this:

mkinitrd -f --preload=pciback /boot/initrd-$(uname -r).img $(uname -r)

Also, pciback has to be loaded before the driver for your device. This is not always the case.
I tried to seize a SCSI controller to pass a tape drive to a domU, but its driver had to be loaded
first to get access to the disks where the initrd etc is stored (I presume). When pciback was loaded
the driver had already taken control of the device.
If that's the case, late binding may be an option for you, where you unbind the driver from the
device after the system has booted and then bind it to pciback prior to starting your domU.

Eg.
# echo -n 0000:07:00.0 > /sys/bus/pci/drivers/<your_driver_name>/unbind
# echo -n 0000:07:00.0 > /sys/bus/pci/drivers/pciback/new_slot
# echo -n 0000:07:00.0 > /sys/bus/pci/drivers/pciback/bind


Matthias




SOUTH PACIFIC SEEDS
PO Box 934, GRIFFITH N.S.W. 2680. AUSTRALIA
Phone:
02 6962 7333      Fax: 02 6964 1311

CAUTION: The information contained in this e-mail is privileged and confidential. If you are reading this message and you are not the intended recipient, you are hereby notified that any use, dissemination, distribution or reproduction of all or part of the contents is prohibited. If you receive this message in error, please notify the sender immediately. Any opinions or views expressed in this message are those of the individual sender and may not represent those of their employer.

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