Cinco, Dante
2009-Oct-13 00:48 UTC
[Xen-devel] Problem with pv-ops dom0 and pci-stub to hide devices: improper device assignment specified
I followed the procedure for "binding devices to pci-stub" but when I ran "xm pci-list-assignable-devices," no device showed up. I can see the device though in /sys/bus/pci/drivers/pci-stub/ and "lspci -v -s 0:07:0.1" reports the driver in use as pci-stub. When I tried to bringup the domU (Linux 2.6.30.1), I get an error message: Error: pci: improper device assignment specified: pci: 0000:07:00.0 must be co-assigned to the same guest with 0000:07:00.0, but it is not owned by pciback. I''m only bringing up one domU so I don''t quite understand the error message. Here''s a breakdown of my steps: ls -ltr /sys/bus/pci/drivers/pci-stub/ total 0 --w------- 1 root root 4096 Oct 9 05:29 unbind --w------- 1 root root 4096 Oct 9 05:29 uevent --w------- 1 root root 4096 Oct 9 05:29 remove_id --w------- 1 root root 4096 Oct 9 05:29 new_id --w------- 1 root root 4096 Oct 9 05:29 bind lspci -n|grep 8032 07:00.0 0c04: 11f8:8032 (rev 05) echo "11f8 8032" > /sys/bus/pci/drivers/pci-stub/new_id echo "0000:07:00.0" > /sys/bus/pci/devices/0000:07:00.0/driver/unbind echo "0000:07:00.0" > /sys/bus/pci/drivers/pci-stub/bind lspci -v -s 0:07:0.0 | grep driver Kernel driver in use: pci-stub ls -ltr /sys/bus/pci/drivers/pci-stub/ total 0 --w------- 1 root root 4096 Oct 9 05:29 uevent --w------- 1 root root 4096 Oct 9 05:29 remove_id --w------- 1 root root 4096 Oct 9 05:30 unbind --w------- 1 root root 4096 Oct 9 05:30 new_id --w------- 1 root root 4096 Oct 9 05:30 bind lrwxrwxrwx 1 root root 0 Oct 9 05:30 0000:07:00.0 -> ../../../../devices/pci0000:00/0000:00:09.0/0000:07:00.0 xm pci-list-assignable-devices (Nothing) xm create -c /root/cfg (vcpus=1) (device_model = ''qemu-dm'') (pci=[''07:00.0'']) Error: pci: improper device assignment specified: pci: 0000:07:00.0 must be co-assigned to the same guest with 0000:07:00.0, but it is not owned by pciback. (XEN) Latest ChangeSet: Thu Oct 08 09:24:32 2009 +0100 20296:1d7221667204 dom0 kernel: 2.6.31.1 Thanks in advance. Dante _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Han, Weidong
2009-Oct-13 02:50 UTC
RE: [Xen-devel] Problem with pv-ops dom0 and pci-stub to hide devices: improper device assignment specified
Dante, I guess 07:00.0 and 07:00.1 are two PCI (non-PCIe) devices in your system. PCI devices under the same bridge must be assigned to one guest. Pls hide both of them by pci-stub, then you can assign both of them to a guest, or just assign one. Pls attach the output of 'lspci -vvv'. Regards, Weidong ________________________________ From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Cinco, Dante Sent: 2009年10月13日 8:48 To: xen-devel@lists.xensource.com Subject: [Xen-devel] Problem with pv-ops dom0 and pci-stub to hide devices: improper device assignment specified I followed the procedure for "binding devices to pci-stub" but when I ran "xm pci-list-assignable-devices," no device showed up. I can see the device though in /sys/bus/pci/drivers/pci-stub/ and "lspci -v -s 0:07:0.1" reports the driver in use as pci-stub. When I tried to bringup the domU (Linux 2.6.30.1), I get an error message: Error: pci: improper device assignment specified: pci: 0000:07:00.0 must be co-assigned to the same guest with 0000:07:00.0, but it is not owned by pciback. I'm only bringing up one domU so I don't quite understand the error message. Here's a breakdown of my steps: ls -ltr /sys/bus/pci/drivers/pci-stub/ total 0 --w------- 1 root root 4096 Oct 9 05:29 unbind --w------- 1 root root 4096 Oct 9 05:29 uevent --w------- 1 root root 4096 Oct 9 05:29 remove_id --w------- 1 root root 4096 Oct 9 05:29 new_id --w------- 1 root root 4096 Oct 9 05:29 bind lspci -n|grep 8032 07:00.0 0c04: 11f8:8032 (rev 05) echo "11f8 8032" > /sys/bus/pci/drivers/pci-stub/new_id echo "0000:07:00.0" > /sys/bus/pci/devices/0000:07:00.0/driver/unbind echo "0000:07:00.0" > /sys/bus/pci/drivers/pci-stub/bind lspci -v -s 0:07:0.0 | grep driver Kernel driver in use: pci-stub ls -ltr /sys/bus/pci/drivers/pci-stub/ total 0 --w------- 1 root root 4096 Oct 9 05:29 uevent --w------- 1 root root 4096 Oct 9 05:29 remove_id --w------- 1 root root 4096 Oct 9 05:30 unbind --w------- 1 root root 4096 Oct 9 05:30 new_id --w------- 1 root root 4096 Oct 9 05:30 bind lrwxrwxrwx 1 root root 0 Oct 9 05:30 0000:07:00.0 -> ../../../../devices/pci0000:00/0000:00:09.0/0000:07:00.0 xm pci-list-assignable-devices (Nothing) xm create -c /root/cfg (vcpus=1) (device_model = 'qemu-dm') (pci=['07:00.0']) Error: pci: improper device assignment specified: pci: 0000:07:00.0 must be co-assigned to the same guest with 0000:07:00.0, but it is not owned by pciback. (XEN) Latest ChangeSet: Thu Oct 08 09:24:32 2009 +0100 20296:1d7221667204 dom0 kernel: 2.6.31.1 Thanks in advance. Dante _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Bruce Edge
2009-Oct-13 05:44 UTC
Re: [Xen-devel] Problem with pv-ops dom0 and pci-stub to hide devices: improper device assignment specified
Here''s the output from lspci -vvv (I work with Dante) -Bruce 2009/10/12 Han, Weidong <weidong.han@intel.com>> Dante, > > I guess 07:00.0 and 07:00.1 are two PCI (non-PCIe) devices in your system. > PCI devices under the same bridge must be assigned to one guest. Pls hide > both of them by pci-stub, then you can assign both of them to a guest, or > just assign one. Pls attach the output of ''lspci -vvv''. > > Regards, > Weidong > > ------------------------------ > *From:* xen-devel-bounces@lists.xensource.com [mailto: > xen-devel-bounces@lists.xensource.com] *On Behalf Of *Cinco, Dante > *Sent:* 2009年10月13日 8:48 > *To:* xen-devel@lists.xensource.com > *Subject:* [Xen-devel] Problem with pv-ops dom0 and pci-stub to hide > devices: improper device assignment specified > > I followed the procedure for "binding devices to pci-stub" but when I ran > "xm pci-list-assignable-devices," no device showed up. I can see the device > though in /sys/bus/pci/drivers/pci-stub/ and "lspci -v -s 0:07:0.1" reports > the driver in use as pci-stub. When I tried to bringup the domU (Linux > 2.6.30.1), I get an error message: > > Error: pci: improper device assignment specified: pci: 0000:07:00.0 must be > co-assigned to the same guest with 0000:07:00.0, but it is not owned by > pciback. > > I''m only bringing up one domU so I don''t quite understand the error > message. > > Here''s a breakdown of my steps: > > ls -ltr /sys/bus/pci/drivers/pci-stub/ > total 0 > --w------- 1 root root 4096 Oct 9 05:29 unbind > --w------- 1 root root 4096 Oct 9 05:29 uevent > --w------- 1 root root 4096 Oct 9 05:29 remove_id > --w------- 1 root root 4096 Oct 9 05:29 new_id > --w------- 1 root root 4096 Oct 9 05:29 bind > > lspci -n|grep 8032 > 07:00.0 0c04: 11f8:8032 (rev 05) > > echo "11f8 8032" > /sys/bus/pci/drivers/pci-stub/new_id > echo "0000:07:00.0" > /sys/bus/pci/devices/0000:07:00.0/driver/unbind > echo "0000:07:00.0" > /sys/bus/pci/drivers/pci-stub/bind > > lspci -v -s 0:07:0.0 | grep driver > Kernel driver in use: pci-stub > > ls -ltr /sys/bus/pci/drivers/pci-stub/ > total 0 > --w------- 1 root root 4096 Oct 9 05:29 uevent > --w------- 1 root root 4096 Oct 9 05:29 remove_id > --w------- 1 root root 4096 Oct 9 05:30 unbind > --w------- 1 root root 4096 Oct 9 05:30 new_id > --w------- 1 root root 4096 Oct 9 05:30 bind > lrwxrwxrwx 1 root root 0 Oct 9 05:30 0000:07:00.0 -> > ../../../../devices/pci0000:00/0000:00:09.0/0000:07:00.0 > > xm pci-list-assignable-devices > (Nothing) > > xm create -c /root/cfg > (vcpus=1) > (device_model = ''qemu-dm'') > (pci=[''07:00.0'']) > Error: pci: improper device assignment specified: pci: 0000:07:00.0 must be > co-assigned to the same guest with 0000:07:00.0, but it is not owned by > pciback. > > (XEN) Latest ChangeSet: Thu Oct 08 09:24:32 2009 +0100 20296:1d7221667204 > > dom0 kernel: 2.6.31.1 > > Thanks in advance. > > Dante > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Han, Weidong
2009-Oct-13 06:21 UTC
RE: [Xen-devel] Problem with pv-ops dom0 and pci-stub to hide devices: improper device assignment specified
There are PCIe devices. Per following message, I'm sure you didn't use the latest xend code (did you make tools and install it?). Error: pci: improper device assignment specified: pci: 0000:07:00.0 must be co-assigned to the same guest with 0000:07:00.0, but it is not owned by pciback. pls make -C tools, and make install it. Because it doesn't support FLR, I guess you still need to hide all functions (07:00.0,07:00.1, 07:00.2, 07:00.3) although you just assign one. Regards, Weidong ________________________________ From: Bruce Edge [mailto:bruce.edge@gmail.com] Sent: 2009年10月13日 13:44 To: Han, Weidong Cc: Cinco, Dante; xen-devel@lists.xensource.com Subject: Re: [Xen-devel] Problem with pv-ops dom0 and pci-stub to hide devices: improper device assignment specified Here's the output from lspci -vvv (I work with Dante) -Bruce 2009/10/12 Han, Weidong <weidong.han@intel.com<mailto:weidong.han@intel.com>> Dante, I guess 07:00.0 and 07:00.1 are two PCI (non-PCIe) devices in your system. PCI devices under the same bridge must be assigned to one guest. Pls hide both of them by pci-stub, then you can assign both of them to a guest, or just assign one. Pls attach the output of 'lspci -vvv'. Regards, Weidong ________________________________ From: xen-devel-bounces@lists.xensource.com<mailto:xen-devel-bounces@lists.xensource.com> [mailto:xen-devel-bounces@lists.xensource.com<mailto:xen-devel-bounces@lists.xensource.com>] On Behalf Of Cinco, Dante Sent: 2009年10月13日 8:48 To: xen-devel@lists.xensource.com<mailto:xen-devel@lists.xensource.com> Subject: [Xen-devel] Problem with pv-ops dom0 and pci-stub to hide devices: improper device assignment specified I followed the procedure for "binding devices to pci-stub" but when I ran "xm pci-list-assignable-devices," no device showed up. I can see the device though in /sys/bus/pci/drivers/pci-stub/ and "lspci -v -s 0:07:0.1" reports the driver in use as pci-stub. When I tried to bringup the domU (Linux 2.6.30.1), I get an error message: Error: pci: improper device assignment specified: pci: 0000:07:00.0 must be co-assigned to the same guest with 0000:07:00.0, but it is not owned by pciback. I'm only bringing up one domU so I don't quite understand the error message. Here's a breakdown of my steps: ls -ltr /sys/bus/pci/drivers/pci-stub/ total 0 --w------- 1 root root 4096 Oct 9 05:29 unbind --w------- 1 root root 4096 Oct 9 05:29 uevent --w------- 1 root root 4096 Oct 9 05:29 remove_id --w------- 1 root root 4096 Oct 9 05:29 new_id --w------- 1 root root 4096 Oct 9 05:29 bind lspci -n|grep 8032 07:00.0 0c04: 11f8:8032 (rev 05) echo "11f8 8032" > /sys/bus/pci/drivers/pci-stub/new_id echo "0000:07:00.0" > /sys/bus/pci/devices/0000:07:00.0/driver/unbind echo "0000:07:00.0" > /sys/bus/pci/drivers/pci-stub/bind lspci -v -s 0:07:0.0 | grep driver Kernel driver in use: pci-stub ls -ltr /sys/bus/pci/drivers/pci-stub/ total 0 --w------- 1 root root 4096 Oct 9 05:29 uevent --w------- 1 root root 4096 Oct 9 05:29 remove_id --w------- 1 root root 4096 Oct 9 05:30 unbind --w------- 1 root root 4096 Oct 9 05:30 new_id --w------- 1 root root 4096 Oct 9 05:30 bind lrwxrwxrwx 1 root root 0 Oct 9 05:30 0000:07:00.0 -> ../../../../devices/pci0000:00/0000:00:09.0/0000:07:00.0 xm pci-list-assignable-devices (Nothing) xm create -c /root/cfg (vcpus=1) (device_model = 'qemu-dm') (pci=['07:00.0']) Error: pci: improper device assignment specified: pci: 0000:07:00.0 must be co-assigned to the same guest with 0000:07:00.0, but it is not owned by pciback. (XEN) Latest ChangeSet: Thu Oct 08 09:24:32 2009 +0100 20296:1d7221667204 dom0 kernel: 2.6.31.1 Thanks in advance. Dante _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com<mailto:Xen-devel@lists.xensource.com> http://lists.xensource.com/xen-devel _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Konrad Rzeszutek Wilk
2009-Oct-13 14:20 UTC
Re: [Xen-devel] Problem with pv-ops dom0 and pci-stub to hide devices: improper device assignment specified
On Mon, Oct 12, 2009 at 06:48:11PM -0600, Cinco, Dante wrote:> I followed the procedure for "binding devices to pci-stub" but when I ran "xm pci-list-assignable-devices," no device showed up. I can see the device though in /sys/bus/pci/drivers/pci-stub/ and "lspci -v -s 0:07:0.1" reports the driver in use as pci-stub. When I tried to bringup the domU (Linux 2.6.30.1), I get an error message:What is the Dom0 you are using? There is no support yet in 2.6.30.1 for the pciback (I am working on this right now, testing it to be exact). Nor is there a pci-front in the 2.6.31.1. Why use pci-stub? It just hides devices, but does not do anything else?> > Error: pci: improper device assignment specified: pci: 0000:07:00.0 must be co-assigned to the same guest with 0000:07:00.0, but it is not owned by pciback. > > I''m only bringing up one domU so I don''t quite understand the error message. > > Here''s a breakdown of my steps: > > ls -ltr /sys/bus/pci/drivers/pci-stub/ > total 0 > --w------- 1 root root 4096 Oct 9 05:29 unbind > --w------- 1 root root 4096 Oct 9 05:29 uevent > --w------- 1 root root 4096 Oct 9 05:29 remove_id > --w------- 1 root root 4096 Oct 9 05:29 new_id > --w------- 1 root root 4096 Oct 9 05:29 bind > > lspci -n|grep 8032 > 07:00.0 0c04: 11f8:8032 (rev 05) > > echo "11f8 8032" > /sys/bus/pci/drivers/pci-stub/new_id > echo "0000:07:00.0" > /sys/bus/pci/devices/0000:07:00.0/driver/unbind > echo "0000:07:00.0" > /sys/bus/pci/drivers/pci-stub/bind > > lspci -v -s 0:07:0.0 | grep driver > Kernel driver in use: pci-stub > > ls -ltr /sys/bus/pci/drivers/pci-stub/ > total 0 > --w------- 1 root root 4096 Oct 9 05:29 uevent > --w------- 1 root root 4096 Oct 9 05:29 remove_id > --w------- 1 root root 4096 Oct 9 05:30 unbind > --w------- 1 root root 4096 Oct 9 05:30 new_id > --w------- 1 root root 4096 Oct 9 05:30 bind > lrwxrwxrwx 1 root root 0 Oct 9 05:30 0000:07:00.0 -> ../../../../devices/pci0000:00/0000:00:09.0/0000:07:00.0 > > xm pci-list-assignable-devices > (Nothing) > > xm create -c /root/cfg > (vcpus=1) > (device_model = ''qemu-dm'') > (pci=[''07:00.0'']) > Error: pci: improper device assignment specified: pci: 0000:07:00.0 must be co-assigned to the same guest with 0000:07:00.0, but it is not owned by pciback. > > (XEN) Latest ChangeSet: Thu Oct 08 09:24:32 2009 +0100 20296:1d7221667204 > > dom0 kernel: 2.6.31.1 > > Thanks in advance. > > Dante >> _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Bruce Edge
2009-Oct-13 16:12 UTC
Re: [Xen-devel] Problem with pv-ops dom0 and pci-stub to hide devices: improper device assignment specified
On Tue, Oct 13, 2009 at 7:20 AM, Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> wrote:> On Mon, Oct 12, 2009 at 06:48:11PM -0600, Cinco, Dante wrote: >> I followed the procedure for "binding devices to pci-stub" but when I ran "xm pci-list-assignable-devices," no device showed up. I can see the device though in /sys/bus/pci/drivers/pci-stub/ and "lspci -v -s 0:07:0.1" reports the driver in use as pci-stub. When I tried to bringup the domU (Linux 2.6.30.1), I get an error message: > > What is the Dom0 you are using?xen/master, 2.6.31.1> There is no support yet in 2.6.30.1 for the pciback (I am working on this > right now, testing it to be exact).Do you mean 30.1 or 31.1?> > Nor is there a pci-front in the 2.6.31.1.What is the right mechanism to pass PCI devices to a domU when running the pv-ops dom0 kernel?> > Why use pci-stub? It just hides devices, but does not do anything else? >I admit some confusion here. What is the difference between these? - pciback/pcifront - pci passthorugh - pci-stub I''ll gladly RTFM if somone could refer me to the appropriate link. We''re running 2.6.31.1 pv-ops dom0, and hvm 2.6.30.1 for the domU. Thanks -Bruce - Hide quoted text ->> >> Error: pci: improper device assignment specified: pci: 0000:07:00.0 must be co-assigned to the same guest with 0000:07:00.0, but it is not owned by pciback. >> >> I''m only bringing up one domU so I don''t quite understand the error message. >> >> Here''s a breakdown of my steps: >> >> ls -ltr /sys/bus/pci/drivers/pci-stub/ >> total 0 >> --w------- 1 root root 4096 Oct 9 05:29 unbind >> --w------- 1 root root 4096 Oct 9 05:29 uevent >> --w------- 1 root root 4096 Oct 9 05:29 remove_id >> --w------- 1 root root 4096 Oct 9 05:29 new_id >> --w------- 1 root root 4096 Oct 9 05:29 bind >> >> lspci -n|grep 8032 >> 07:00.0 0c04: 11f8:8032 (rev 05) >> >> echo "11f8 8032" > /sys/bus/pci/drivers/pci-stub/new_id >> echo "0000:07:00.0" > /sys/bus/pci/devices/0000:07:00.0/driver/unbind >> echo "0000:07:00.0" > /sys/bus/pci/drivers/pci-stub/bind >> >> lspci -v -s 0:07:0.0 | grep driver >> Kernel driver in use: pci-stub >> >> ls -ltr /sys/bus/pci/drivers/pci-stub/ >> total 0 >> --w------- 1 root root 4096 Oct 9 05:29 uevent >> --w------- 1 root root 4096 Oct 9 05:29 remove_id >> --w------- 1 root root 4096 Oct 9 05:30 unbind >> --w------- 1 root root 4096 Oct 9 05:30 new_id >> --w------- 1 root root 4096 Oct 9 05:30 bind >> lrwxrwxrwx 1 root root 0 Oct 9 05:30 0000:07:00.0 -> ../../../../devices/pci0000:00/0000:00:09.0/0000:07:00.0 >> >> xm pci-list-assignable-devices >> (Nothing) >> >> xm create -c /root/cfg >> (vcpus=1) >> (device_model = ''qemu-dm'') >> (pci=[''07:00.0'']) >> Error: pci: improper device assignment specified: pci: 0000:07:00.0 must be co-assigned to the same guest with 0000:07:00.0, but it is not owned by pciback. >> >> (XEN) Latest ChangeSet: Thu Oct 08 09:24:32 2009 +0100 20296:1d7221667204 >> >> dom0 kernel: 2.6.31.1 >> >> Thanks in advance. >> >> Dante >> > >> _______________________________________________ >> Xen-devel mailing list >> Xen-devel@lists.xensource.com >> http://lists.xensource.com/xen-devel > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2009-Oct-13 16:36 UTC
Re: [Xen-devel] Problem with pv-ops dom0 and pci-stub to hide devices: improper device assignment specified
On 13/10/2009 17:12, "Bruce Edge" <bruce.edge@gmail.com> wrote:>> Why use pci-stub? It just hides devices, but does not do anything else? >> > > I admit some confusion here. What is the difference between these? > - pciback/pcifront > - pci passthorugh > - pci-stub > > I''ll gladly RTFM if somone could refer me to the appropriate link. > > We''re running 2.6.31.1 pv-ops dom0, and hvm 2.6.30.1 for the domU.In this case pci passthrough is done without assistance from dom0 kernel, except that the pci-stub driver is used to ''steal'' the device from dom0 (it''s just a dummy driver that binds to the device and prevents it being taken by any other real driver in dom0). Xen-unstable''s xend should know how to drive pci-stub in recent pv_ops Linux kernels. Pciback has this function in older kernels, and xend knows how to drive that too. Pcifront doesn''t come into it for you -- that''s the domU pci driver for PV guests, but in HVM guests the PCI access method is as native and emulated in qemu. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Konrad Rzeszutek Wilk
2009-Oct-13 17:01 UTC
Re: [Xen-devel] Problem with pv-ops dom0 and pci-stub to hide devices: improper device assignment specified
On Tue, Oct 13, 2009 at 10:20:38AM -0400, Konrad Rzeszutek Wilk wrote:> On Mon, Oct 12, 2009 at 06:48:11PM -0600, Cinco, Dante wrote: > > I followed the procedure for "binding devices to pci-stub" but when I ran "xm pci-list-assignable-devices," no device showed up. I can see the device though in /sys/bus/pci/drivers/pci-stub/ and "lspci -v -s 0:07:0.1" reports the driver in use as pci-stub. When I tried to bringup the domU (Linux 2.6.30.1), I get an error message: > > What is the Dom0 you are using? There is no support yet in 2.6.30.1 for the pciback (I am working on this > right now, testing it to be exact). > > Nor is there a pci-front in the 2.6.31.1. > > Why use pci-stub? It just hides devices, but does not do anything else?Ahh, n/m. QEMU uses those devices to do the PCI emulation along with pass-through for the devices. Obviously it only works for HVM guests. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Konrad Rzeszutek Wilk
2009-Oct-13 17:07 UTC
Re: [Xen-devel] Problem with pv-ops dom0 and pci-stub to hide devices: improper device assignment specified
On Tue, Oct 13, 2009 at 09:12:57AM -0700, Bruce Edge wrote:> On Tue, Oct 13, 2009 at 7:20 AM, Konrad Rzeszutek Wilk > <konrad.wilk@oracle.com> wrote: > > On Mon, Oct 12, 2009 at 06:48:11PM -0600, Cinco, Dante wrote: > >> I followed the procedure for "binding devices to pci-stub" but when I ran "xm pci-list-assignable-devices," no device showed up. I can see the device though in /sys/bus/pci/drivers/pci-stub/ and "lspci -v -s 0:07:0.1" reports the driver in use as pci-stub. When I tried to bringup the domU (Linux 2.6.30.1), I get an error message: > > > > What is the Dom0 you are using? > > xen/master, 2.6.31.1 > > > There is no support yet in 2.6.30.1 for the pciback (I am working on this > > right now, testing it to be exact). > > Do you mean 30.1 or 31.1?31.1. Thanks.> > > > > Nor is there a pci-front in the 2.6.31.1. > > What is the right mechanism to pass PCI devices to a domU when running > the pv-ops dom0 kernel?Right now, none. When I am done, it will be the same exact as for pci-stub, except that you will replace all of the echo''s to the pci-back. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Cinco, Dante
2009-Oct-13 17:15 UTC
RE: [Xen-devel] Problem with pv-ops dom0 and pci-stub to hide devices: improper device assignment specified
Weidong, Is the pci-stub hiding different for PCIe devices? How do I tell which latest version of xend I should be using? Does "xm info" help? Dante xm info host : kaan-12 release : 2.6.31.1 version : #13 SMP Mon Oct 12 09:21:06 PDT 2009 machine : x86_64 nr_cpus : 16 nr_nodes : 1 cores_per_socket : 4 threads_per_core : 2 cpu_mhz : 2533 hw_caps : bfebfbff:28100800:00000000:00001b40:009ce3bd:00000000:00000001:00000000 virt_caps : hvm hvm_directio total_memory : 12134 free_memory : 131 node_to_cpu : node0:0-15 node_to_memory : node0:131 xen_major : 3 xen_minor : 5 xen_extra : -unstable xen_caps : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64 xen_scheduler : credit xen_pagesize : 4096 platform_params : virt_start=0xffff800000000000 xen_changeset : Thu Oct 08 09:24:32 2009 +0100 20296:1d7221667204 cc_compiler : gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) cc_compile_date : Fri Oct 9 16:02:02 PDT 2009 xend_config_format : 4 ________________________________ From: Han, Weidong [mailto:weidong.han@intel.com] Sent: Monday, October 12, 2009 11:22 PM To: ''Bruce Edge'' Cc: Cinco, Dante; ''xen-devel@lists.xensource.com'' Subject: RE: [Xen-devel] Problem with pv-ops dom0 and pci-stub to hide devices: improper device assignment specified There are PCIe devices. Per following message, I''m sure you didn''t use the latest xend code (did you make tools and install it?). Error: pci: improper device assignment specified: pci: 0000:07:00.0 must be co-assigned to the same guest with 0000:07:00.0, but it is not owned by pciback. pls make -C tools, and make install it. Because it doesn''t support FLR, I guess you still need to hide all functions (07:00.0,07:00.1, 07:00.2, 07:00.3) although you just assign one. Regards, Weidong ________________________________ From: Bruce Edge [mailto:bruce.edge@gmail.com] Sent: 2009年10月13日 13:44 To: Han, Weidong Cc: Cinco, Dante; xen-devel@lists.xensource.com Subject: Re: [Xen-devel] Problem with pv-ops dom0 and pci-stub to hide devices: improper device assignment specified Here''s the output from lspci -vvv (I work with Dante) -Bruce 2009/10/12 Han, Weidong <weidong.han@intel.com<mailto:weidong.han@intel.com>> Dante, I guess 07:00.0 and 07:00.1 are two PCI (non-PCIe) devices in your system. PCI devices under the same bridge must be assigned to one guest. Pls hide both of them by pci-stub, then you can assign both of them to a guest, or just assign one. Pls attach the output of ''lspci -vvv''. Regards, Weidong ________________________________ From: xen-devel-bounces@lists.xensource.com<mailto:xen-devel-bounces@lists.xensource.com> [mailto:xen-devel-bounces@lists.xensource.com<mailto:xen-devel-bounces@lists.xensource.com>] On Behalf Of Cinco, Dante Sent: 2009年10月13日 8:48 To: xen-devel@lists.xensource.com<mailto:xen-devel@lists.xensource.com> Subject: [Xen-devel] Problem with pv-ops dom0 and pci-stub to hide devices: improper device assignment specified I followed the procedure for "binding devices to pci-stub" but when I ran "xm pci-list-assignable-devices," no device showed up. I can see the device though in /sys/bus/pci/drivers/pci-stub/ and "lspci -v -s 0:07:0.1" reports the driver in use as pci-stub. When I tried to bringup the domU (Linux 2.6.30.1), I get an error message: Error: pci: improper device assignment specified: pci: 0000:07:00.0 must be co-assigned to the same guest with 0000:07:00.0, but it is not owned by pciback. I''m only bringing up one domU so I don''t quite understand the error message. Here''s a breakdown of my steps: ls -ltr /sys/bus/pci/drivers/pci-stub/ total 0 --w------- 1 root root 4096 Oct 9 05:29 unbind --w------- 1 root root 4096 Oct 9 05:29 uevent --w------- 1 root root 4096 Oct 9 05:29 remove_id --w------- 1 root root 4096 Oct 9 05:29 new_id --w------- 1 root root 4096 Oct 9 05:29 bind lspci -n|grep 8032 07:00.0 0c04: 11f8:8032 (rev 05) echo "11f8 8032" > /sys/bus/pci/drivers/pci-stub/new_id echo "0000:07:00.0" > /sys/bus/pci/devices/0000:07:00.0/driver/unbind echo "0000:07:00.0" > /sys/bus/pci/drivers/pci-stub/bind lspci -v -s 0:07:0.0 | grep driver Kernel driver in use: pci-stub ls -ltr /sys/bus/pci/drivers/pci-stub/ total 0 --w------- 1 root root 4096 Oct 9 05:29 uevent --w------- 1 root root 4096 Oct 9 05:29 remove_id --w------- 1 root root 4096 Oct 9 05:30 unbind --w------- 1 root root 4096 Oct 9 05:30 new_id --w------- 1 root root 4096 Oct 9 05:30 bind lrwxrwxrwx 1 root root 0 Oct 9 05:30 0000:07:00.0 -> ../../../../devices/pci0000:00/0000:00:09.0/0000:07:00.0 xm pci-list-assignable-devices (Nothing) xm create -c /root/cfg (vcpus=1) (device_model = ''qemu-dm'') (pci=[''07:00.0'']) Error: pci: improper device assignment specified: pci: 0000:07:00.0 must be co-assigned to the same guest with 0000:07:00.0, but it is not owned by pciback. (XEN) Latest ChangeSet: Thu Oct 08 09:24:32 2009 +0100 20296:1d7221667204 dom0 kernel: 2.6.31.1 Thanks in advance. Dante _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com<mailto:Xen-devel@lists.xensource.com> http://lists.xensource.com/xen-devel _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Cinco, Dante
2009-Oct-13 22:56 UTC
RE: [Xen-devel] Problem with pv-ops dom0 and pci-stub to hide devices: improper device assignment specified
Weidong, You were right. I was not using the latest Xen. The changeset in my previous email show 20296 and the one I''m using now is 20303. I''m able to hide my device now using pci-stub, it shows up in "xm pci-list-assignable-devices" and I''m able to assign/pass it through to the domU. It shows up in "lspci" from domU. Thanks. Dante ________________________________ From: Cinco, Dante Sent: Tuesday, October 13, 2009 10:16 AM To: ''Han, Weidong'' Cc: ''xen-devel@lists.xensource.com'' Subject: RE: [Xen-devel] Problem with pv-ops dom0 and pci-stub to hide devices: improper device assignment specified Weidong, Is the pci-stub hiding different for PCIe devices? How do I tell which latest version of xend I should be using? Does "xm info" help? Dante xm info host : kaan-12 release : 2.6.31.1 version : #13 SMP Mon Oct 12 09:21:06 PDT 2009 machine : x86_64 nr_cpus : 16 nr_nodes : 1 cores_per_socket : 4 threads_per_core : 2 cpu_mhz : 2533 hw_caps : bfebfbff:28100800:00000000:00001b40:009ce3bd:00000000:00000001:00000000 virt_caps : hvm hvm_directio total_memory : 12134 free_memory : 131 node_to_cpu : node0:0-15 node_to_memory : node0:131 xen_major : 3 xen_minor : 5 xen_extra : -unstable xen_caps : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64 xen_scheduler : credit xen_pagesize : 4096 platform_params : virt_start=0xffff800000000000 xen_changeset : Thu Oct 08 09:24:32 2009 +0100 20296:1d7221667204 cc_compiler : gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) cc_compile_date : Fri Oct 9 16:02:02 PDT 2009 xend_config_format : 4 ________________________________ From: Han, Weidong [mailto:weidong.han@intel.com] Sent: Monday, October 12, 2009 11:22 PM To: ''Bruce Edge'' Cc: Cinco, Dante; ''xen-devel@lists.xensource.com'' Subject: RE: [Xen-devel] Problem with pv-ops dom0 and pci-stub to hide devices: improper device assignment specified There are PCIe devices. Per following message, I''m sure you didn''t use the latest xend code (did you make tools and install it?). Error: pci: improper device assignment specified: pci: 0000:07:00.0 must be co-assigned to the same guest with 0000:07:00.0, but it is not owned by pciback. pls make -C tools, and make install it. Because it doesn''t support FLR, I guess you still need to hide all functions (07:00.0,07:00.1, 07:00.2, 07:00.3) although you just assign one. Regards, Weidong ________________________________ From: Bruce Edge [mailto:bruce.edge@gmail.com] Sent: 2009年10月13日 13:44 To: Han, Weidong Cc: Cinco, Dante; xen-devel@lists.xensource.com Subject: Re: [Xen-devel] Problem with pv-ops dom0 and pci-stub to hide devices: improper device assignment specified Here''s the output from lspci -vvv (I work with Dante) -Bruce 2009/10/12 Han, Weidong <weidong.han@intel.com<mailto:weidong.han@intel.com>> Dante, I guess 07:00.0 and 07:00.1 are two PCI (non-PCIe) devices in your system. PCI devices under the same bridge must be assigned to one guest. Pls hide both of them by pci-stub, then you can assign both of them to a guest, or just assign one. Pls attach the output of ''lspci -vvv''. Regards, Weidong ________________________________ From: xen-devel-bounces@lists.xensource.com<mailto:xen-devel-bounces@lists.xensource.com> [mailto:xen-devel-bounces@lists.xensource.com<mailto:xen-devel-bounces@lists.xensource.com>] On Behalf Of Cinco, Dante Sent: 2009年10月13日 8:48 To: xen-devel@lists.xensource.com<mailto:xen-devel@lists.xensource.com> Subject: [Xen-devel] Problem with pv-ops dom0 and pci-stub to hide devices: improper device assignment specified I followed the procedure for "binding devices to pci-stub" but when I ran "xm pci-list-assignable-devices," no device showed up. I can see the device though in /sys/bus/pci/drivers/pci-stub/ and "lspci -v -s 0:07:0.1" reports the driver in use as pci-stub. When I tried to bringup the domU (Linux 2.6.30.1), I get an error message: Error: pci: improper device assignment specified: pci: 0000:07:00.0 must be co-assigned to the same guest with 0000:07:00.0, but it is not owned by pciback. I''m only bringing up one domU so I don''t quite understand the error message. Here''s a breakdown of my steps: ls -ltr /sys/bus/pci/drivers/pci-stub/ total 0 --w------- 1 root root 4096 Oct 9 05:29 unbind --w------- 1 root root 4096 Oct 9 05:29 uevent --w------- 1 root root 4096 Oct 9 05:29 remove_id --w------- 1 root root 4096 Oct 9 05:29 new_id --w------- 1 root root 4096 Oct 9 05:29 bind lspci -n|grep 8032 07:00.0 0c04: 11f8:8032 (rev 05) echo "11f8 8032" > /sys/bus/pci/drivers/pci-stub/new_id echo "0000:07:00.0" > /sys/bus/pci/devices/0000:07:00.0/driver/unbind echo "0000:07:00.0" > /sys/bus/pci/drivers/pci-stub/bind lspci -v -s 0:07:0.0 | grep driver Kernel driver in use: pci-stub ls -ltr /sys/bus/pci/drivers/pci-stub/ total 0 --w------- 1 root root 4096 Oct 9 05:29 uevent --w------- 1 root root 4096 Oct 9 05:29 remove_id --w------- 1 root root 4096 Oct 9 05:30 unbind --w------- 1 root root 4096 Oct 9 05:30 new_id --w------- 1 root root 4096 Oct 9 05:30 bind lrwxrwxrwx 1 root root 0 Oct 9 05:30 0000:07:00.0 -> ../../../../devices/pci0000:00/0000:00:09.0/0000:07:00.0 xm pci-list-assignable-devices (Nothing) xm create -c /root/cfg (vcpus=1) (device_model = ''qemu-dm'') (pci=[''07:00.0'']) Error: pci: improper device assignment specified: pci: 0000:07:00.0 must be co-assigned to the same guest with 0000:07:00.0, but it is not owned by pciback. (XEN) Latest ChangeSet: Thu Oct 08 09:24:32 2009 +0100 20296:1d7221667204 dom0 kernel: 2.6.31.1 Thanks in advance. Dante _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com<mailto:Xen-devel@lists.xensource.com> http://lists.xensource.com/xen-devel _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel