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] Yet Another PCI passthrough question

To: James Pifer <jep@xxxxxxxxxxxxxxxx>, "xen-users@xxxxxxxxxxxxxxxxxxx" <xen-users@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-users] Yet Another PCI passthrough question
From: "Beasley, Julien" <Julien.Beasley@xxxxxxx>
Date: Wed, 31 Aug 2011 16:29:38 -0500
Accept-language: en-US
Acceptlanguage: en-US
Cc:
Delivery-date: Wed, 31 Aug 2011 14:30:50 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1314823434.9190.3.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
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: <1FD06C1B2A7E4842A38834B8AB5B3CFE0326599B91@xxxxxxxxxxxxxxxxxxx>, <1314823434.9190.3.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcxoHtjWZouyiO+eRKCHXmU40ZR+0wABWe9o
Thread-topic: [Xen-users] Yet Another PCI passthrough question
Thank you for the reply James,

I tried following your script, but even then something seems to be missing.

# lspci
03:00.0 VGA compatible controller: ATI Technologies Inc Device 671d
03:00.1 Audio device: ATI Technologies Inc Device aa80
04:00.0 Display controller: ATI Technologies Inc Device 671d
04:00.1 Audio device: ATI Technologies Inc Device aa80


I'm assuming at this point that <PCI-ID> is 04:00.0 and 03.00.0

# find /sys/bus/pci/drivers -name 0000:04:00.0

then returns no results. 

Also, regarding modprobe pciback, I did a grep in the modules directory for the 
term "pciback" and no results are shown

# grep pciback /lib/modules/2.6.37.6-0.7-xen
# 

Is this indicative of something missing? I appreciate your help! I'm not trying 
a scsi device, simply getting my video card to pass through.

Julien

________________________________________
Julien,

I'm using xen 4.0.2 in sles11. Below is a little "doc" I use for passing
through devices. It seems there are always different ways to do these
things, but this one does seem to work.

Btw, my experience has been that xm pci-list-assignable-devices
sometimes doesn't list anything, but we're still able to pass through.

HTH,
James



lspci to find <PCI-ID>

find /sys/bus/pci/drivers -name 0000:<PCI-ID>

echo -n "<PCI-ID>" > "/sys/bus/pci/drivers/<driver dir>/unbind"
*****(where <driver dir> is from the previous command.)
echo -n "<PCI-ID>" > "/sys/bus/pci/drivers/pciback/new_slot"
echo -n "<PCI-ID>" > "/sys/bus/pci/drivers/pciback/bind"


#Start Example:

find /sys/bus/pci/drivers -name 0000:0e:04.0

modprobe pciback
echo -n "0000:0e:04.0" > "/sys/bus/pci/drivers/mptspi/unbind"
echo -n "0000:0e:04.0" > "/sys/bus/pci/drivers/pciback/new_slot"
echo -n "0000:0e:04.0" > "/sys/bus/pci/drivers/pciback/bind"

#End Example


Edit or create /etc/init.d/after.local and add:

modprobe pciback
echo -n "0000:0e:04.0" > "/sys/bus/pci/drivers/mptspi/unbind"
echo -n "0000:0e:04.0" > "/sys/bus/pci/drivers/pciback/new_slot"
echo -n "0000:0e:04.0" > "/sys/bus/pci/drivers/pciback/bind"


Now try provisioning new VM using the hardware device or add hardware
device to existing VM.


Note:for some scsi devices such as tape drives, you may have to update
kernel boot parameters to hide the scsi card from the host OS. For
example, add the following to the modules line in /boot/grub/menu.lst
for the xen boot process:

pciback.permissive pciback.hide=(0e:04.0)(0e:04.1)
pci=resource_alignment=0e:04.0;0e:04.1


For example:
module /boot/vmlinuz-2.6.32.12-0.7-xen 
root=/dev/disk/by-id/cciss-3600508b1001030364643393433300000-part2 
resume=/dev/disk/by-id/cciss-3600508b1001030364643393433300000-part1 
splash=silent showopts pciback.permissive pciback.hide=(0e:04.0)(0e:04.1) 
pci=resource_alignment=0e:04.0;0e:04.1




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



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

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