From: "Cinco, Dante" Subject: RE: Problem with pv-ops dom0 and pci-stub to hide devices: improper device assignment specified Date: Tue, 13 Oct 2009 16:56:18 -0600 Message-ID: <2B044E14371DA244B71F8BF2514563F503ECDB76@cosmail03.lsi.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1407974735==" Return-path: Content-Language: en-US List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Han, Weidong" Cc: "'xen-devel@lists.xensource.com'" List-Id: xen-devel@lists.xenproject.org --===============1407974735== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_2B044E14371DA244B71F8BF2514563F503ECDB76cosmail03lsicom_" --_000_2B044E14371DA244B71F8BF2514563F503ECDB76cosmail03lsicom_ Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable Weidong, You were right. I was not using the latest Xen. The changeset in my previou= s 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 devi= ces: improper device assignment specified Weidong, Is the pci-stub hiding different for PCIe devices? How do I tell which late= st 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:00000= 000: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=3D0xffff800000000000 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 devi= ces: 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 pc= iback. pls make -C tools, and make install it. Because it doesn't support FLR, I g= uess 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=1B$BG/=1B(B10=1B$B7n=1B(B13=1B$BF|=1B(B 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 devi= ces: improper device assignment specified Here's the output from lspci -vvv (I work with Dante) -Bruce 2009/10/12 Han, Weidong > 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 b= oth of them by pci-stub, then you can assign both of them to a guest, or ju= st 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=1B$BG/=1B(B10=1B$B7n=1B(B13=1B$BF|=1B(B 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 pc= iback. 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 -> ../../../../device= s/pci0000:00/0000:00:09.0/0000:07:00.0 xm pci-list-assignable-devices (Nothing) xm create -c /root/cfg (vcpus=3D1) (device_model =3D 'qemu-dm') (pci=3D['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 pc= iback. (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 --_000_2B044E14371DA244B71F8BF2514563F503ECDB76cosmail03lsicom_ Content-Type: text/html; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable
Weidong,
 
You were right. I was not using the latest Xen. = The=20 changeset in my previous email show 20296 and the one I'm using now is 2030= 3.=20 I'm able to hide my device now using pci-stub, it shows up in "xm=20 pci-list-assignable-devices" and I'm able to assign/pass it through to the = domU.=20 It shows up in "lspci" from domU.
 
Thanks.
 
Dante


From: Cinco, Dante
Sent: Tue= sday,=20 October 13, 2009 10:16 AM
To: 'Han, Weidong'
Cc:=20 'xen-devel@lists.xensource.com'
Subject: RE: [Xen-devel] Problem = with=20 pv-ops dom0 and pci-stub to hide devices: improper device assignment=20 specified

Weidong,
 
Is the pci-stub hiding different for PCIe device= s? How=20 do I tell which latest version of xend I should be using? Does "xm info"=20 help?
 
Dante
 
xm=20 info
host          &nb= sp;       =20 :=20 kaan-12
release         &nb= sp;     =20 :=20 2.6.31.1
version         &n= bsp;     =20 : #13 SMP Mon Oct 12 09:21:06 PDT=20 2009
machine          =      =20 :=20 x86_64
nr_cpus         &nbs= p;     =20 :=20 16
nr_nodes          &= nbsp;   =20 : 1
cores_per_socket       :=20 4
threads_per_core       :=20 2
cpu_mhz          &nb= sp;    =20 :=20 2533
hw_caps          =      =20 :=20 bfebfbff:28100800:00000000:00001b40:009ce3bd:00000000:00000001:00000000
= virt_caps           =   =20 : hvm=20 hvm_directio
total_memory        = ;  =20 :=20 12134
free_memory         &= nbsp; =20 :=20 131
node_to_cpu         &nb= sp; =20 : node0:0-15
node_to_memory       &nb= sp; :=20 node0:131
xen_major         = ;    =20 :=20 3
xen_minor          &= nbsp;  =20 :=20 5
xen_extra          &= nbsp;  =20 :=20 -unstable
xen_caps         =      =20 : 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=20
xen_scheduler          :=20 credit
xen_pagesize         = ; =20 : 4096
platform_params        :=20 virt_start=3D0xffff800000000000
xen_changeset    &nb= sp;    =20 : Thu Oct 08 09:24:32 2009 +0100=20 20296:1d7221667204
cc_compiler       =     =20 : gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4)=20
cc_compile_date        : Fri Oct&nbs= p; 9=20 16:02:02 PDT 2009
xend_config_format     :=20 4


From: Han, Weidong=20 [mailto:weidong.han@intel.com]
Sent: Monday, October 12, 2009 11= :22=20 PM
To: 'Bruce Edge'
Cc: Cinco, Dante;=20 'xen-devel@lists.xensource.com'
Subject: RE: [Xen-devel] Problem = with=20 pv-ops dom0 and pci-stub to hide devices: improper device assignment=20 specified

There are PCIe devices. Per following message, I'm sure you didn't= use=20 the latest xend code (did you make tools and install it?).
 
Error: pci: improper device assignment specified: pci: 0000:07:00.0 mu= st be=20 co-assigned to the same guest with 0000:07:00.0, but it is not owned by=20 pciback.
 
 
pls ma= ke -C=20 tools, and make install it. Because it doesn't support FLR, I guess you sti= ll=20 need to hide all functions (07:00.0,07:00.1, 07:00.2, 07:00.3) although you= just=20 assign one.
 
Regards,
Weidong


From: Bruce Edge [mailto:bruce.edge@gma= il.com]=20
Sent: 2009=1B$BG/=1B(B10=1B$B7n=1B(B13=1B$BF|=1B(B 13:44
T= o: Han, Weidong
Cc:=20 Cinco, Dante; xen-devel@lists.xensource.com
Subject: Re: [Xen-dev= el]=20 Problem with pv-ops dom0 and pci-stub to hide devices: improper device=20 assignment specified

Here's the output from lspci -vvv (I work with=20 Dante)

-Bruce


2009/10/12 Han, Weidong <weidong.han@intel.com><= BR>
Dante,
 
I=20 guess 07:00.0 and 07:00.1 are two PCI (non-PCIe) devices in you= r=20 system. PCI devices under the same bridge must be assigned to one guest. = Pls=20 hide both of them by pci-stub, then you can assign both of them to a gues= t, or=20 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 O= f=20 Cinco, Dante
Sent: 2009=1B$BG/=1B(B10=1B$B7n=1B(B13=1B$BF|= =1B(B 8:48
To: xen-devel@lists.xensource.com
Subject: [Xen= -devel]=20 Problem with pv-ops dom0 and pci-stub to hide devices: improper device=20 assignment specified

I followed the procedure for "binding devices to pci-stub" but when = I ran=20 "xm pci-list-assignable-devices," no device showed up. I can see the devi= ce=20 though in /sys/bus/pci/drivers/pci-stub/ and "lspci -v -s 0:07:0.1" repor= ts=20 the driver in use as pci-stub. When I tried to bringup the domU (Linux=20 2.6.30.1), I get an error message:
 
Error: pci: improper device assignment specified: pci: 0000:07:00.0 = must=20 be co-assigned to the same guest with 0000:07:00.0, but it is not owned b= y=20 pciback.
 
I'm only bringing up one domU so I don't quite understand the error= =20 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" >=20 /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:=20 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=20 -> ../../../../devices/pci0000:00/0000:00:09.0/0000:07:00.0
 
xm pci-list-assignable-devices
(Nothing)
 
xm create -c /root/cfg
(vcpus=3D1)
(device_model =3D 'qemu-dm')
(pci=3D['07:00.0'])
Error: pci: improper device assignment specified: pci: 0000:07:00.0 = must=20 be co-assigned to the same guest with 0000:07:00.0, but it is not owned b= y=20 pciback.
 
(XEN) Latest ChangeSet: Thu Oct 08 09:24:32 2009 +0100=20 20296:1d7221667204
 
dom0 kernel: 2.6.31.1
 
Thanks in advance.
 
Dante
 

___________________________= ____________________
Xen-devel=20 mailing list
Xen-devel@lists.xensource.c= om
http://lists.xensource.com/xen-devel


--_000_2B044E14371DA244B71F8BF2514563F503ECDB76cosmail03lsicom_-- --===============1407974735== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============1407974735==--