From mboxrd@z Thu Jan 1 00:00:00 1970 From: Weald Wind Subject: pci passthrough error "unknown command"pci-ins" Date: Fri, 7 May 2010 20:21:39 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1230327514==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --===============1230327514== Content-Type: multipart/alternative; boundary=00c09f8fe3a8ced5d004860a2882 --00c09f8fe3a8ced5d004860a2882 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Hi All, Please help me. I am now installing the XEN on my PC and trying to config the pci pass through. My motherboard is intel DQ45CB which is vtd enabled. I downloaded the latest xen4.0 source from xen.org which is the latest release. I downloaded stable-2.6.32-x dom0 kernel source from jeremy's repository. After compiling the xen and dom0 kernel, I could play it. I could create hvm. And the VM was runing very well. But when I configured the pci pass through, it always failed with the following error: root@charles-dq45:/opt/virtualmachines# xm pci-attach 1 0000:02:00.0 Error: Failed to assign device to IOMMU (0000:02:00.0@100 ,msitranslate=3D1,power_mgmt=3D0) Usage: xm pci-attach [-o|--options=3D] [virtual slot] Insert a new pass-through pci device. root@charles-dq45:~# tail /var/log/xen/qemu-dm-win7.log I/O request not ready: 0, ptr: 0, port: 0, data: 0, count: 0, size: 0 Log-dirty: no command yet. xs_read(/local/domain/1/log-throttling): read error qemu: ignoring not-understood drive `/local/domain/1/log-throttling' medium change watch on `/local/domain/1/log-throttling' - unknown device, ignored cirrus vga map change while on lfb mode mapping vram to f0000000 - f0400000 platform_fixed_ioport: changed ro/rw state of ROM memory area. now is rw state. platform_fixed_ioport: changed ro/rw state of ROM memory area. now is ro state. dm-command: unknown command"pci-ins" when I compiled the xen-tools, it's said the pci pass has been enabled... root@charles-dq45:/opt/xen-4.0.0/tools# make .... qemu successfuly configured for Xen qemu-dm build make -C ioemu-dir all =3D=3D=3D PCI passthrough capability has been enabled =3D=3D=3D make[2]: Entering directory `/data/opt/xen-4.0.0/tools/ioemu-qemu-xen' CC audio/sdlaudio.o CC sdl.o AR libqemu_common.a =3D=3D=3D PCI passthrough capability has been enabled =3D=3D=3D =3D=3D=3D PCI passthrough capability has been enabled =3D=3D=3D make[3]: Entering directory `/data/opt/xen-4.0.0/tools/ioemu-qemu-xen/i386-dm' CC i386-dm/vl.o /opt/xen-4.0.0/tools/ioemu-dir/vl.c: In function =91main=92: .... root@charles-dq45:~# tail -f /var/log/xen/xend.log [2010-05-07 17:01:13 4154] DEBUG (XendDomainInfo:903) XendDomainInfo.pci_device_configure: ['pci', ['dev', ['slot', '0x00'], ['domain', '0x0000'], ['key', '0000:02:00.0'], ['bus', '0x02'], ['vdevfn', '0x100'], ['func', '0x0']], ['state', 'Initialising']] [2010-05-07 17:01:13 4154] DEBUG (XendDomainInfo:675) XendDomainInfo.hvm_pci_device_create: {'devs': [{'slot': '0x00', 'domain': '0x0000', 'key': '0000:02:00.0', 'bus': '0x02', 'vdevfn': '0x100', 'func': '0x0', 'uuid': '125fbeb8-fcca-80ea-41af-6565b6f028f8'}], 'states': ['Initialising']} [2010-05-07 17:01:13 4154] DEBUG (XendDomainInfo:801) XendDomainInfo.hvm_pci_device_insert_dev: {'slot': '0x00', 'domain': '0x0000', 'key': '0000:02:00.0', 'bus': '0x02', 'vdevfn': '0x100', 'func': '0x0', 'uuid': '125fbeb8-fcca-80ea-41af-6565b6f028f8'} [2010-05-07 17:01:13 4154] DEBUG (XendDomainInfo:822) XendDomainInfo.hvm_pci_device_insert_dev: 0000:02:00.0@100 ,msitranslate=3D1,power_mgmt=3D0 root@charles-dq45:~# xm dmesg (XEN) VMX: Supported advanced features: (XEN) - APIC MMIO access virtualisation (XEN) - APIC TPR shadow (XEN) - Virtual NMI (XEN) - MSR direct-access bitmap (XEN) HVM: ASIDs disabled. (XEN) HVM: VMX enabled (XEN) xsave_init: cpu0: cntxt_max_size: 0x240 and states: 00000000:00000003 (XEN) xsave_init: using cntxt_size: 0x240 and states: 00000000:00000003 (XEN) Intel VT-d Snoop Control not supported. (XEN) Intel VT-d DMA Passthrough not supported. (XEN) Intel VT-d Queued Invalidation not supported. (XEN) Intel VT-d Interrupt Remapping not supported. (XEN) I/O virtualisation enabled (XEN) I/O virtualisation for PV guests disabled root@charles-dq45:~# more menu.lst title Xen4 Linux Dom0 2.6.32-xen0 root (hd0,0) kernel /boot/xen-4.0.0.gz vtd=3D1 iommu=3D1 dom0_mem=3D2048M module /boot/vmlinuz-2.6.32-xen0 root=3D/dev/md0 ro xen_pciback.hide=3D(01:00.0)(02:00.0) module /boot/initrd.img-2.6.32-xen0 root@charles-dq45:~# ls -l /sys/bus/pci/drivers/pciback total 0 lrwxrwxrwx 1 root root 0 2010-05-07 16:35 0000:01:00.0 -> ../../../../devices/pci0000:00/0000:00:01.0/0000:01:00.0 lrwxrwxrwx 1 root root 0 2010-05-07 16:35 0000:02:00.0 -> ../../../../devices/pci0000:00/0000:00:1e.0/0000:02:00.0 --w------- 1 root root 4096 2010-05-07 16:35 bind lrwxrwxrwx 1 root root 0 2010-05-07 16:35 module -> ../../../../module/xen_pciback --w------- 1 root root 4096 2010-05-07 16:35 new_id --w------- 1 root root 4096 2010-05-07 16:35 new_slot -rw------- 1 root root 4096 2010-05-07 16:35 permissive -rw------- 1 root root 4096 2010-05-07 16:35 quirks --w------- 1 root root 4096 2010-05-07 16:35 remove_id --w------- 1 root root 4096 2010-05-07 16:35 remove_slot -r-------- 1 root root 4096 2010-05-07 16:35 slots --w------- 1 root root 4096 2010-05-07 16:35 uevent --w------- 1 root root 4096 2010-05-07 16:35 unbind root@charles-dq45:~# xm pci-list-assignable-devices 0000:02:00.0 0000:01:00.0 root@charles-dq45:~# dmesg |grep pciback [ 0.000000] Command line: root=3D/dev/md0 ro i915.modeset=3D0 xen_pciback.hide=3D(01:00.0)(02:00.0) [ 0.000000] Kernel command line: root=3D/dev/md0 ro i915.modeset=3D0 xen_pciback.hide=3D(01:00.0)(02:00.0) [ 0.143801] pciback: wants to seize 0000:01:00.0 [ 0.143804] pciback: wants to seize 0000:02:00.0 [ 0.143814] pciback 0000:00:00.0: probing... [ 0.143826] pciback 0000:00:01.0: probing... [ [ 0.144008] pciback 0000:01:00.0: probing... [ 0.144010] pciback 0000:01:00.0: seizing device [ 0.144052] pciback 0000:01:00.0: pcistub_device_alloc [ 0.144055] pciback 0000:01:00.0: deferring initialization [ 0.144063] pciback 0000:02:00.0: probing... [ 0.144066] pciback 0000:02:00.0: seizing device [ 0.144107] pciback 0000:02:00.0: pcistub_device_alloc [ 0.144109] pciback 0000:02:00.0: deferring initialization [ 4.448616] pciback: pcistub_init_devices_late [ 4.448621] pciback 0000:02:00.0: initializing... [ 4.448624] pciback 0000:02:00.0: initializing config [ 4.448626] pciback 0000:02:00.0: initializing virtual configuration space [ 4.448630] pciback 0000:02:00.0: added config field at offset 0x00 [ 4.448633] pciback 0000:02:00.0: added config field at offset 0x02 [ [ 4.448672] pciback 0000:02:00.0: added config field at offset 0x30 [ 4.448695] pciback 0000:02:00.0: Found capability 0x1 at 0x44 [ 4.448698] pciback 0000:02:00.0: added config field at offset 0x44 [ [ 4.448713] pciback 0000:02:00.0: added config field at offset 0x4b [ 4.448719] pciback 0000:02:00.0: enabling device [ 4.448826] pciback 0000:02:00.0: PCI INT A -> GSI 21 (level, low) -> IR= Q 21 [ 4.448872] pciback 0000:02:00.0: reset device [ 4.448880] pciback 0000:02:00.0: PCI INT A disabled [ 4.448924] pciback 0000:01:00.0: initializing... [ 4.448927] pciback 0000:01:00.0: initializing config [ 4.448930] pciback 0000:01:00.0: initializing virtual configuration space [ 4.448932] pciback 0000:01:00.0: added config field at offset 0x00 [ 4.448935] pciback 0000:01:00.0: added config field at offset 0x02 [ [ 4.448996] pciback 0000:01:00.0: Found capability 0x1 at 0x60 [ 4.448999] pciback 0000:01:00.0: added config field at offset 0x60 [ 4.449002] pciback 0000:01:00.0: added config field at offset 0x62 [ [ 4.449013] pciback 0000:01:00.0: added config field at offset 0x67 [ 4.449015] pciback 0000:01:00.0: enabling device [ 4.449024] pciback 0000:01:00.0: enabling device (0000 -> 0003) [ 4.449185] pciback 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IR= Q 16 [ 4.449774] pciback 0000:01:00.0: reset device [ 4.449779] pciback 0000:01:00.0: PCI INT A disabled root@charles-dq45:~# dmesg |grep acpiphp [ 4.440713] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5 --00c09f8fe3a8ced5d004860a2882 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable

Hi All,

Please help me.

I am now installing the XEN on my PC and trying to = config the pci pass through.

My motherboard is int= el DQ45CB which is vtd enabled.
I downloaded the latest xen4.0 source from xen.org which is the latest release.
I down= loaded stable-2.6.32-x dom0 kernel source from jeremy's repository.

After compiling the xen and dom0 kernel, I could play it. I could crea= te hvm. And the VM was runing very well.

But when = I configured the pci pass through, it always failed with =A0the following e= rror:

root@charles-dq45:/opt/virtualmachines# xm pci-att= ach 1 0000:02:00.0

Error: Failed to assign device = to IOMMU (0000:02:00.0@100,msitranslate=3D1,power_mgmt=3D0)
Usage: xm pci-attach [-o|--options=3D<opt>] <Domain> <d= omain:bus:slot.func> [virtual slot]
Insert a new pass-through = pci device.



root@charles-dq45:~# tail =A0/var/log/xen/qemu-dm-win7.log

I/O request not ready: 0, ptr: 0, port: 0, data: 0, count: 0, size= : 0
Log-dirty: no command yet.
xs_read(/local/domain/1/= log-throttling): read error
qemu: ignoring not-understood drive `/local/domain/1/log-throttling= 9;
medium change watch on `/local/domain/1/log-throttling' - = unknown device, ignored
cirrus vga map change while on lfb mode
mapping vram to f0000000 - f0400000
platform_fixed_ioport: c= hanged ro/rw state of ROM memory area. now is rw state.
platform_= fixed_ioport: changed ro/rw state of ROM memory area. now is ro state.
dm-command: unknown command"pci-ins"


when I compiled the xen-tools, it's said the pci = pass has been enabled...

root@charles-dq45:/opt/xen-4.0.0/tools# make
....
= qemu successfuly configured for Xen qemu-dm build
make -C ioemu-d= ir all
=3D=3D=3D PCI passthrough capability has been enabled =3D= =3D=3D
make[2]: Entering directory `/data/opt/xen-4.0.0/tools/ioemu-qemu-xen&= #39;
=A0=A0CC =A0 =A0audio/sdlaudio.o
=A0=A0CC =A0 =A0s= dl.o
=A0=A0AR =A0 =A0libqemu_common.a
=3D=3D=3D PCI pas= sthrough capability has been enabled =3D=3D=3D
=3D=3D=3D PCI passthrough capability has been enabled =3D=3D=3D
<= div>make[3]: Entering directory `/data/opt/xen-4.0.0/tools/ioemu-qemu-xen/i= 386-dm'
=A0=A0CC =A0 =A0i386-dm/vl.o
/opt/xen-4.0.0= /tools/ioemu-dir/vl.c: In function =91main=92:

....


root@charles-dq45:~# tail -f /var/log/xen/xend.log

[2010-05-07 17:01:13 4154] DEBUG (XendDomainInfo:903) XendDomainInf= o.pci_device_configure: ['pci', ['dev', ['slot', &#= 39;0x00'], ['domain', '0x0000'], ['key', '0= 000:02:00.0'], ['bus', '0x02'], ['vdevfn', '= ;0x100'], ['func', '0x0']], ['state', 'Init= ialising']]
[2010-05-07 17:01:13 4154] DEBUG (XendDomainInfo:675) XendDomainInfo.h= vm_pci_device_create: {'devs': [{'slot': '0x00', &#= 39;domain': '0x0000', 'key': '0000:02:00.0', &#= 39;bus': '0x02', 'vdevfn': '0x100', 'func&#= 39;: '0x0', 'uuid': '125fbeb8-fcca-80ea-41af-6565b6f028= f8'}], 'states': ['Initialising']}
[2010-05-07 17:01:13 4154] DEBUG (XendDomainInfo:801) XendDomainInfo.h= vm_pci_device_insert_dev: {'slot': '0x00', 'domain'= : '0x0000', 'key': '0000:02:00.0', 'bus': &= #39;0x02', 'vdevfn': '0x100', 'func': '0x0&= #39;, 'uuid': '125fbeb8-fcca-80ea-41af-6565b6f028f8'}
[2010-05-07 17:01:13 4154] DEBUG (XendDomainInfo:822) XendDomainInfo.h= vm_pci_device_insert_dev: 0000:02:00.0@100,msitranslate=3D1,power_mgmt=3D0<= /div>


root@charles-dq45:~# xm dmesg=

(XEN) VMX: Supported advanced features:
= (XEN) =A0- APIC MMIO access virtualisation
(XEN) =A0- APIC TPR sh= adow
(XEN) =A0- Virtual NMI
(XEN) =A0- MSR direct-acces= s bitmap
(XEN) HVM: ASIDs disabled.
(XEN) HVM: VMX enabled
= (XEN) xsave_init: cpu0: cntxt_max_size: 0x240 and states: 00000000:00000003=
(XEN) xsave_init: using cntxt_size: 0x240 and states: 00000000:0= 0000003
(XEN) Intel VT-d Snoop Control not supported.
(XEN) Intel VT= -d DMA Passthrough not supported.
(XEN) Intel VT-d Queued Invalid= ation not supported.
(XEN) Intel VT-d Interrupt Remapping not sup= ported.
(XEN) I/O virtualisation enabled
(XEN) I/O virtualisation fo= r PV guests disabled

root@charles-dq45:~# mo= re menu.lst

title Xen4 Linux Dom0 2.6.32-xen0
root (hd0,0)
kernel<= span style=3D"white-space:pre"> /boot/xen-4.0.0.gz vtd=3D1 iommu=3D= 1 dom0_mem=3D2048M
module /boot/vmlinuz-2.6.32-xen0 root=3D/dev/md0 ro =A0xen_pciback.hide=3D(01:00.= 0)(02:00.0)
module /boot/initrd.img-2.6.32= -xen0

root@charles-dq45:~# ls -l /sys/b= us/pci/drivers/pciback
total 0
lrwxrwxrwx 1 root root =A0 =A00 2010-05-07 16:35 0000:01:00.0 -> ../../.= ./../devices/pci0000:00/0000:00:01.0/0000:01:00.0
lrwxrwxrwx 1 ro= ot root =A0 =A00 2010-05-07 16:35 0000:02:00.0 -> ../../../../devices/pc= i0000:00/0000:00:1e.0/0000:02:00.0
--w------- 1 root root 4096 2010-05-07 16:35 bind
lrwxrwxrwx= 1 root root =A0 =A00 2010-05-07 16:35 module -> ../../../../module/xen_= pciback
--w------- 1 root root 4096 2010-05-07 16:35 new_id
--w------- 1 root root 4096 2010-05-07 16:35 new_slot
-rw---= ---- 1 root root 4096 2010-05-07 16:35 permissive
-rw------- 1 ro= ot root 4096 2010-05-07 16:35 quirks
--w------- 1 root root 4096 = 2010-05-07 16:35 remove_id
--w------- 1 root root 4096 2010-05-07 16:35 remove_slot
-r-= ------- 1 root root 4096 2010-05-07 16:35 slots
--w------- 1 root= root 4096 2010-05-07 16:35 uevent
--w------- 1 root root 4096 20= 10-05-07 16:35 unbind

root@charles-dq45:~# xm pci-list-assignable-= devices
0000:02:00.0
0000:01:00.0

<= /div>
root@charles-dq45:~# dmesg |grep pciback
[ =A0 =A0= 0.000000] Command line: root=3D/dev/md0 ro i915.modeset=3D0 xen_pciback.hid= e=3D(01:00.0)(02:00.0)
[ =A0 =A00.000000] Kernel command line: root=3D/dev/md0 ro i915.modese= t=3D0 xen_pciback.hide=3D(01:00.0)(02:00.0)
[ =A0 =A00.143801] pc= iback: wants to seize 0000:01:00.0
[ =A0 =A00.143804] pciback: wa= nts to seize 0000:02:00.0
[ =A0 =A00.143814] pciback 0000:00:00.0: probing...
[ =A0 = =A00.143826] pciback 0000:00:01.0: probing...
[=A0
[ = =A0 =A00.144008] pciback 0000:01:00.0: probing...
[ =A0 =A00.1440= 10] pciback 0000:01:00.0: seizing device
[ =A0 =A00.144052] pciback 0000:01:00.0: pcistub_device_alloc
[ =A0 =A00.144055] pciback 0000:01:00.0: deferring initialization
[ =A0 =A00.144063] pciback 0000:02:00.0: probing...
[ =A0 =A00= .144066] pciback 0000:02:00.0: seizing device
[ =A0 =A00.144107] pciback 0000:02:00.0: pcistub_device_alloc
[ =A0 =A00.144109] pciback 0000:02:00.0: deferring initialization
[ =A0 =A04.448616] pciback: pcistub_init_devices_late
[ =A0 = =A04.448621] pciback 0000:02:00.0: initializing...
[ =A0 =A04.448624] pciback 0000:02:00.0: initializing config
[ =A0 =A04.448626] pciback 0000:02:00.0: initializing virtual configuratio= n space
[ =A0 =A04.448630] pciback 0000:02:00.0: added config fie= ld at offset 0x00
[ =A0 =A04.448633] pciback 0000:02:00.0: added config field at offset = 0x02
[
[ =A0 =A04.448672] pciback 0000:02:00.0: added c= onfig field at offset 0x30
[ =A0 =A04.448695] pciback 0000:02:00.= 0: Found capability 0x1 at 0x44
[ =A0 =A04.448698] pciback 0000:02:00.0: added config field at offset = 0x44
[ =A0 =A0
[ =A0 =A04.448713] pciback 0000:02:00.0:= added config field at offset 0x4b
[ =A0 =A04.448719] pciback 000= 0:02:00.0: enabling device
[ =A0 =A04.448826] pciback 0000:02:00.0: PCI INT A -> GSI 21 (level= , low) -> IRQ 21
[ =A0 =A04.448872] pciback 0000:02:00.0: rese= t device
[ =A0 =A04.448880] pciback 0000:02:00.0: PCI INT A disab= led
[ =A0 =A04.448924] pciback 0000:01:00.0: initializing...
[ = =A0 =A04.448927] pciback 0000:01:00.0: initializing config
[ =A0 = =A04.448930] pciback 0000:01:00.0: initializing virtual configuration space=
[ =A0 =A04.448932] pciback 0000:01:00.0: added config field at offset 0x00<= /div>
[ =A0 =A04.448935] pciback 0000:01:00.0: added config field at of= fset 0x02
[
[ =A0 =A04.448996] pciback 0000:01:00.0: Fo= und capability 0x1 at 0x60
[ =A0 =A04.448999] pciback 0000:01:00.0: added config field at offset = 0x60
[ =A0 =A04.449002] pciback 0000:01:00.0: added config field = at offset 0x62
[=A0
[ =A0 =A04.449013] pciback 0000:01:= 00.0: added config field at offset 0x67
[ =A0 =A04.449015] pciback 0000:01:00.0: enabling device
[ = =A0 =A04.449024] pciback 0000:01:00.0: enabling device (0000 -> 0003)
[ =A0 =A04.449185] pciback 0000:01:00.0: PCI INT A -> GSI 16 (le= vel, low) -> IRQ 16
[ =A0 =A04.449774] pciback 0000:01:00.0: reset device
[ =A0 = =A04.449779] pciback 0000:01:00.0: PCI INT A disabled

<= /div>
root@charles-dq45:~# dmesg |grep acpiphp
[ =A0 =A0= 4.440713] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5




--00c09f8fe3a8ced5d004860a2882-- --===============1230327514== 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 --===============1230327514==--