All of lore.kernel.org
 help / color / mirror / Atom feed
From: "dev001" <pgngw+dev001+xen-users@f-m.fm>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: how to PCI-passthrough 1 card to a DomU when another @ Dom0 uses the same driver?
Date: Thu, 03 Feb 2011 09:12:50 -0800	[thread overview]
Message-ID: <1296753170.32147.1418788499@webmail.messagingengine.com> (raw)
In-Reply-To: <20110203162652.GA3712@dumpdata.com>

hi,

> readlink //sys/bus/pci/devices/0000:04:00.0/driver
> ../../../../bus/pci/drivers/pciback
> 
> I want you to do for 02:00.0 and see if it points to pciback before you
> launch any guests. 

thanks for clarifying that.

not exhaustive, but hopefully sufficiently informative,

grep PCI /boot/config-2.6.34.8-8-xen | grep BACK
	CONFIG_XEN_PCIDEV_BACKEND=m
	CONFIG_XEN_PCIDEV_BACKEND_VPCI=y
	# CONFIG_XEN_PCIDEV_BACKEND_PASS is not set
	# CONFIG_XEN_PCIDEV_BACKEND_SLOT is not set
	# CONFIG_XEN_PCIDEV_BACKEND_CONTROLLER is not set

lspci | grep -i eth
	02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd.
	RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)
	03:00.0 Ethernet controller: Marvell Technology Group Ltd.
	88E8053 PCI-E Gigabit Ethernet Controller (rev 20)
	04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd.
	RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02)

######################
case 1)

grep pci /boot/grub/menu.lst
    module /vmlinuz-xen ...
    pci=resource_aligment=0000:02:00.0;0000:03:0.0

cat /etc/init.d/boot.local
	(empty)

cat /etc/modprobe.d/99-local.conf
	options pciback hide=(0000:02:00.0)(0000:03:00.0)
	install sky2       /sbin/modprobe pciback ; /sbin/modprobe
	--first-time --ignore-install sky2
	install r8169      /sbin/modprobe pciback ; /sbin/modprobe
	--first-time --ignore-install r8169

reboot
dmesg | grep -i seiz
	(empty)

readlink //sys/bus/pci/devices/0000:02:00.0/driver
	../../../../bus/pci/drivers/r8169
readlink //sys/bus/pci/devices/0000:03:00.0/driver
	../../../../bus/pci/drivers/sky2
readlink //sys/bus/pci/devices/0000:04:00.0/driver
	../../../../bus/pci/drivers/r8169

######################
case 2)

grep pci /boot/grub/menu.lst
    module /vmlinuz-xen ...
    pci=resource_aligment=0000:02:00.0;0000:03:0.0
    pciback.hide=(0000:02:00.0)(0000:03:00.0)

cat /etc/init.d/boot.local
	(empty)

cat /etc/modprobe.d/99-local.conf
	options pciback hide=(0000:02:00.0)(0000:03:00.0)
	install sky2       /sbin/modprobe pciback ; /sbin/modprobe
	--first-time --ignore-install sky2
	install r8169      /sbin/modprobe pciback ; /sbin/modprobe
	--first-time --ignore-install r8169

reboot
dmesg | grep -i seiz
	[    2.083424] pciback 0000:03:00.0: seizing device

readlink //sys/bus/pci/devices/0000:02:00.0/driver
	../../../../bus/pci/drivers/r8169
readlink //sys/bus/pci/devices/0000:03:00.0/driver
	../../../../bus/pci/drivers/pciback
readlink //sys/bus/pci/devices/0000:04:00.0/driver
	../../../../bus/pci/drivers/r8169

######################
case 3)

grep pci /boot/grub/menu.lst
    module /vmlinuz-xen ...
    pci=resource_aligment=0000:02:00.0;0000:03:0.0
    pciback.hide=(0000:02:00.0)(0000:03:00.0)

cat /etc/init.d/boot.local
	(empty)

cat /etc/modprobe.d/99-local.conf
	(empty)

reboot
dmesg | grep -i seiz
	[    2.077673] pciback 0000:03:00.0: seizing device

readlink //sys/bus/pci/devices/0000:02:00.0/driver
	../../../../bus/pci/drivers/r8169
readlink //sys/bus/pci/devices/0000:03:00.0/driver
	../../../../bus/pci/drivers/pciback
readlink //sys/bus/pci/devices/0000:04:00.0/driver
	../../../../bus/pci/drivers/r8169

######################
case 3)

grep pci /boot/grub/menu.lst
    module /vmlinuz-xen ...
    pci=resource_aligment=0000:02:00.0;0000:03:0.0

cat /etc/init.d/boot.local
	DEV="0000:02:00.0 0000:03:00.0"
	for BDF in $DEV 
	do 
	    [ ! -e /sys/bus/pci/devices/$BDF/driver/unbind ] || \
	            echo -n $BDF >
	            /sys/bus/pci/devices/$BDF/driver/unbind
	    echo -n $BDF > /sys/bus/pci/drivers/pciback/new_slot
	    echo -n $BDF > /sys/bus/pci/drivers/pciback/bind
	    echo -n $BDF > sys/bus/pci/drivers/pciback/permissive
	done 

cat /etc/modprobe.d/99-local.conf
	(empty)

reboot
dmesg | grep -i seiz
	[   32.664674] pciback 0000:02:00.0: seizing device
	[   32.688310] pciback 0000:03:00.0: seizing device

readlink //sys/bus/pci/devices/0000:02:00.0/driver
	../../../../bus/pci/drivers/pciback
readlink //sys/bus/pci/devices/0000:03:00.0/driver
	../../../../bus/pci/drivers/pciback
readlink //sys/bus/pci/devices/0000:04:00.0/driver
	../../../../bus/pci/drivers/r8169








> >  CONFIG_XEN_PCIDEV_BACKEND=m      <--------------------
> 
> Pfff.. sucks.

curious, why?  and if it legitimately does, any clue why @opensuse does
it that way?

> > > What happens if you 'rmmod sky2' or blacklist the sky2 driver?

i assume a still relevant question ... so, try this for which of the
above (or other?) cases?

thanks.

  reply	other threads:[~2011-02-03 17:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-02  5:03 how to PCI-passthrough 1 card to a DomU when another @ Dom0 uses the same driver? dev001
2011-02-02 20:27 ` Konrad Rzeszutek Wilk
2011-02-02 21:43   ` dev001
2011-02-02 22:26     ` dev001
2011-02-03 16:26     ` Konrad Rzeszutek Wilk
2011-02-03 17:12       ` dev001 [this message]
2011-02-03 17:42         ` Konrad Rzeszutek Wilk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1296753170.32147.1418788499@webmail.messagingengine.com \
    --to=pgngw+dev001+xen-users@f-m.fm \
    --cc=konrad.wilk@oracle.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.