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] PCI passthrough using xl instead of xm commands

To: xen-users <Xen-users@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-users] PCI passthrough using xl instead of xm commands
From: Andy Burns <xen.lists@xxxxxxxxxxx>
Date: Thu, 13 Oct 2011 10:26:20 +0100
Cc:
Delivery-date: Thu, 13 Oct 2011 02:27:48 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=uTr773347hTHwvzZVFf/bhbQCkhvmaLdyWvJPtL0Ugo=; b=nN56WZHNfODPz8P8f12I+d91jNudhqKc8iohaiKpEir6EGF0bc+Xr9FYzEz8qLsyHi LerlJbYK4TJNFgDjPR9gm/XvTvWYqwf8yKOfPYmYr03Wu0dhD9koxwRA8sCE4P+aO+Rf Tg6A3j+vKaVxD/fyy1nE9556uYcm82fYJ2kIk=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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
Seeing the recomendation to migrate from xm to xl, I thought i'd give
it a go, I'm not concerned here with the functioning of the PCI
devices within the domU (which is giving me other problems) but just
with assigning the PCI devices to the domU.

My config file includes multiple PCI devices for passthrough, the
relevant section being

pci = [ '09:00.0', '09:01.0', '09:03.0', '02:00.0', '02:00.1',
'02:00.2', '02:00.3', '02:00.4', '02:00.5', '02:00.6', '02:00.7' ]

Fedora 16 provides xen-pciback as a module, so I unbind/bind the PCI
devices (09:*.0) and USB root devices (02:00.*) from their relevant
busses with a bash script

SLOTS=(0000:02:00.0 0000:02:00.2 0000:02:00.4 0000:02:00.6)
for i in ${SLOTS[@]}; do
  echo -n $i > /sys/bus/pci/drivers/ohci_hcd/unbind
done

SLOTS=(0000:02:00.1 0000:02:00.3 0000:02:00.5 0000:02:00.7)
for i in ${SLOTS[@]}; do
  echo -n $i > /sys/bus/pci/drivers/ehci_hcd/unbind
done

SLOTS=(0000:02:00.0 0000:02:00.1 0000:02:00.2 0000:02:00.3
0000:02:00.4 0000:02:00.5 0000:02:00.6 0000:02:00.7 0000:09:00.
0 0000:09:01.0 0000:09:03.0)
for i in ${SLOTS[@]}; do
  echo -n $i > /sys/bus/pci/drivers/pciback/new_slot
  echo -n $i > /sys/bus/pci/drivers/pciback/bind
done

Both "xm pci-list-assignable-devices" and "xl
pci-list-assignable-devices" show all eleven devices as available,
though the numerical ordering is different for them.

0000:09:00.0
0000:09:01.0
0000:09:03.0
0000:02:00.0
0000:02:00.1
0000:02:00.2
0000:02:00.3
0000:02:00.4
0000:02:00.5
0000:02:00.6
0000:02:00.7

Using "xm create" the domU is assigned all PCI devices, and "lspci"
within the domain sees them, after shutting down the domU, "xm list"
shows it gone cleanly

Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0   512     4     r-----     73.1

But using "xl create" I receive

Parsing config file mythbe16.cfg
libxl: error: libxl_pci.c:754:libxl_device_pci_reset The kernel
doesn't support reset from sysfs for PCI device 0000:02:00.0
libxl: error: libxl_pci.c:754:libxl_device_pci_reset The kernel
doesn't support reset from sysfs for PCI device 0000:02:00.1
libxl: error: libxl_pci.c:754:libxl_device_pci_reset The kernel
doesn't support reset from sysfs for PCI device 0000:02:00.2
libxl: error: libxl_pci.c:754:libxl_device_pci_reset The kernel
doesn't support reset from sysfs for PCI device 0000:02:00.3
libxl: error: libxl_pci.c:754:libxl_device_pci_reset The kernel
doesn't support reset from sysfs for PCI device 0000:02:00.4
libxl: error: libxl_pci.c:754:libxl_device_pci_reset The kernel
doesn't support reset from sysfs for PCI device 0000:02:00.5
libxl: error: libxl_pci.c:754:libxl_device_pci_reset The kernel
doesn't support reset from sysfs for PCI device 0000:02:00.6
libxl: error: libxl_pci.c:754:libxl_device_pci_reset The kernel
doesn't support reset from sysfs for PCI device 0000:02:00.7

Running "lspci" in the domU shows only a single PCI device (09:00.00),
after shutting down the domain "xl list" shows it as some sort of
zombie domain

Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0   512     4     r-----      72.8
(null)                                       2     0     1     --ps-d       7.0

Are there any new rules for PCI devices using xl?

Should I avoid mixing and matching xm and xl commands on the dom0?

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-users] PCI passthrough using xl instead of xm commands, Andy Burns <=