From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51537) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNOfZ-0002QW-IT for qemu-devel@nongnu.org; Wed, 03 Apr 2013 10:28:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNOfU-0005qk-OR for qemu-devel@nongnu.org; Wed, 03 Apr 2013 10:28:08 -0400 Received: from smtp6-g21.free.fr ([2a01:e0c:1:1599::15]:49037) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNOfT-0005q3-Ue for qemu-devel@nongnu.org; Wed, 03 Apr 2013 10:28:04 -0400 Received: from [192.168.3.38] (ip-101.net-82-216-124.rev.numericable.fr [82.216.124.101]) (Authenticated sender: jean.parpaillon) by smtp6-g21.free.fr (Postfix) with ESMTPA id 85B718227B for ; Wed, 3 Apr 2013 16:27:58 +0200 (CEST) Message-ID: <515C3C07.3090201@free.fr> Date: Wed, 03 Apr 2013 16:26:15 +0200 From: Jean Parpaillon MIME-Version: 1.0 References: <515C007F.2040402@free.fr> In-Reply-To: <515C007F.2040402@free.fr> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2AUHTVQJPLSCLGKDTAQFS" Subject: [Qemu-devel] Fwd: [Qemu-discuss] pci-assign error List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2AUHTVQJPLSCLGKDTAQFS Content-Type: multipart/mixed; boundary="------------020802010506020007060907" This is a multi-part message in MIME format. --------------020802010506020007060907 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable -------- Message original -------- Sujet: [Qemu-discuss] pci-assign error Date : Wed, 03 Apr 2013 12:12:15 +0200 De : Jean Parpaillon Pour : qemu-discuss@nongnu.org Dear all, I'm trying to assign a PCI graphic card to a qemu guest. When I start the guest with libvirt, I have the following error in /var/log/libvirt/qemu/sofa.log: LC_ALL=3DC PATH=3D/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin HOME=3D/root USER=3Droot LOGNAME=3Droot QEMU_AUDIO_DRV=3Dspice /usr/bin/k= vm -name sofa -S -M pc-1.1 -m 1500 -smp 2,sockets=3D2,cores=3D1,threads=3D1 = -uuid 1234beef -no-user-config -nodefaults -chardev socket,id=3Dcharmonitor,path=3D/var/lib/libvirt/qemu/sofa.monitor,server,= nowait -mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol -rtc base=3Dutc -no-shutdown -device piix3-usb-uhci,id=3Dusb,bus=3Dpci.0,addr=3D0x1.0x2 -device virtio-serial-pci,id=3Dvirtio-serial0,bus=3Dpci.0,addr=3D0x5 -dri= ve file=3D/dev/vgsurcouf/sofa,if=3Dnone,id=3Ddrive-virtio-disk0,format=3Draw= -device virtio-blk-pci,scsi=3Doff,bus=3Dpci.0,addr=3D0x6,drive=3Ddrive-virtio-dis= k0,id=3Dvirtio-disk0,bootindex=3D1 -drive file=3D/var/lib/libvirt/images/iso/debian-testing-amd64-netinst.iso,if=3D= none,id=3Ddrive-ide0-1-0,readonly=3Don,format=3Draw -device ide-cd,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-0 = -netdev tap,fd=3D23,id=3Dhostnet0,vhost=3Don,vhostfd=3D24 -device virtio-net-pci,netdev=3Dhostnet0,id=3Dnet0,mac=3D...,bus=3Dpci.0,addr=3D0= x3 -chardev pty,id=3Dcharserial0 -device isa-serial,chardev=3Dcharserial0,id=3Dserial0 -chardev spicevmc,id=3Dcharchannel0,name=3Dvdagent -device virtserialport,bus=3Dvirtio-serial0.0,nr=3D1,chardev=3Dcharchannel0,id=3D= channel0,name=3Dcom.redhat.spice.0 -device usb-tablet,id=3Dinput0 -spice port=3D5900,addr=3D127.0.0.1,disable-ticketing,seamless-migration=3Don -v= ga qxl -global qxl-vga.ram_size=3D67108864 -global qxl-vga.vram_size=3D67108= 864 -device intel-hda,id=3Dsound0,bus=3Dpci.0,addr=3D0x4 -device hda-duplex,id=3Dsound0-codec0,bus=3Dsound0.0,cad=3D0 -device pci-assign,host=3D02:00.0,id=3Dhostdev0,configfd=3D25,bus=3Dpci.0,multifu= nction=3Don,addr=3D0x8 -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x7 W: kvm binary is deprecated, please use qemu-system-x86_64 instead char device redirected to /dev/pts/2 (label charserial0) qemu-system-x86_64: -device pci-assign,host=3D02:00.0,id=3Dhostdev0,configfd=3D25,bus=3Dpci.0,multifu= nction=3Don,addr=3D0x8: Failed to assign device "hostdev0" : Operation not permitted qemu-system-x86_64: -device pci-assign,host=3D02:00.0,id=3Dhostdev0,configfd=3D25,bus=3Dpci.0,multifu= nction=3Don,addr=3D0x8: Device 'kvm-pci-assign' could not be initialized 2013-04-03 09:44:35.398+0000: shutting down My host setup: Debian Wheezy + qemu 1.4.0, libvirt 1.0.4, kernel 3.8.5 My host gfx: $ lspci|grep VGA 02:00.0 VGA compatible controller: NVIDIA Corporation GT218 [Quadro NVS 300] (rev a2) I run the following to enable handle device with PCI stub, includind second function: echo "10de 10d8" > /sys/bus/pci/drivers/pci-stub/new_id echo "10de 0be3" > /sys/bus/pci/drivers/pci-stub/new_id echo 0000:02:00.0 > /sys/bus/pci/devices/0000:02:00.0/driver/unbind echo 0000:02:00.1 > /sys/bus/pci/devices/0000:02:00.1/driver/unbind sleep 3 echo 0000:02:00.0 > /sys/bus/pci/drivers/pci-stub/bind echo 0000:02:00.1 > /sys/bus/pci/drivers/pci-stub/bind Intel VT-d is enabled: $ dmesg |grep Directed [ 1.167179] PCI-DMA: Intel(R) Virtualization Technology for Directed I= /O $ dmesg |grep IOMMU [ 0.000000] Intel-IOMMU: enabled [ 0.171520] dmar: IOMMU 0: reg_base_addr ebffe000 ver 1:0 cap c90780106f0462 ecap f020f6 [ 0.171529] dmar: IOMMU 1: reg_base_addr fedc0000 ver 1:0 cap c90780106f0462 ecap f020f6 [ 1.166855] IOMMU 0 0xebffe000: using Queued invalidation [ 1.166861] IOMMU 1 0xfedc0000: using Queued invalidation [ 1.166889] IOMMU: hardware identity mapping for device 0000:00:00.0 [ 1.166891] IOMMU: hardware identity mapping for device 0000:00:03.0 [ 1.166893] IOMMU: hardware identity mapping for device 0000:00:07.0 [ 1.166895] IOMMU: hardware identity mapping for device 0000:00:14.0 [ 1.166897] IOMMU: hardware identity mapping for device 0000:00:14.1 [ 1.166898] IOMMU: hardware identity mapping for device 0000:00:14.2 [ 1.166900] IOMMU: hardware identity mapping for device 0000:00:1a.0 [ 1.166902] IOMMU: hardware identity mapping for device 0000:00:1a.1 [ 1.166904] IOMMU: hardware identity mapping for device 0000:00:1a.7 [ 1.166906] IOMMU: hardware identity mapping for device 0000:00:1b.0 [ 1.166907] IOMMU: hardware identity mapping for device 0000:00:1c.0 [ 1.166909] IOMMU: hardware identity mapping for device 0000:00:1c.5 [ 1.166911] IOMMU: hardware identity mapping for device 0000:00:1d.0 [ 1.166913] IOMMU: hardware identity mapping for device 0000:00:1d.1 [ 1.166915] IOMMU: hardware identity mapping for device 0000:00:1d.2 [ 1.166916] IOMMU: hardware identity mapping for device 0000:00:1d.7 [ 1.166919] IOMMU: hardware identity mapping for device 0000:00:1f.0 [ 1.166920] IOMMU: hardware identity mapping for device 0000:00:1f.2 [ 1.166922] IOMMU: hardware identity mapping for device 0000:00:1f.3 [ 1.166930] IOMMU: hardware identity mapping for device 0000:02:00.0 [ 1.166932] IOMMU: hardware identity mapping for device 0000:02:00.1 [ 1.166940] IOMMU: hardware identity mapping for device 0000:03:00.0 [ 1.166948] IOMMU: hardware identity mapping for device 0000:04:00.0 [ 1.166957] IOMMU: hardware identity mapping for device 0000:20:01.0 [ 1.166958] IOMMU: hardware identity mapping for device 0000:20:03.0 [ 1.166960] IOMMU: hardware identity mapping for device 0000:20:05.0 [ 1.166962] IOMMU: hardware identity mapping for device 0000:20:07.0 [ 1.166970] IOMMU: hardware identity mapping for device 0000:20:14.0 [ 1.166972] IOMMU: hardware identity mapping for device 0000:20:14.1 [ 1.166974] IOMMU: hardware identity mapping for device 0000:20:14.2 [ 1.166982] IOMMU: hardware identity mapping for device 0000:23:00.0 [ 1.166991] IOMMU: hardware identity mapping for device 0000:3e:00.0 [ 1.166993] IOMMU: hardware identity mapping for device 0000:3e:00.1 [ 1.166995] IOMMU: hardware identity mapping for device 0000:3e:02.0 [ 1.166996] IOMMU: hardware identity mapping for device 0000:3e:02.1 [ 1.166998] IOMMU: hardware identity mapping for device 0000:3e:02.2 [ 1.167000] IOMMU: hardware identity mapping for device 0000:3e:02.3 [ 1.167002] IOMMU: hardware identity mapping for device 0000:3e:02.4 [ 1.167003] IOMMU: hardware identity mapping for device 0000:3e:02.5 [ 1.167005] IOMMU: hardware identity mapping for device 0000:3e:03.0 [ 1.167007] IOMMU: hardware identity mapping for device 0000:3e:03.1 [ 1.167009] IOMMU: hardware identity mapping for device 0000:3e:03.2 [ 1.167011] IOMMU: hardware identity mapping for device 0000:3e:03.4 [ 1.167012] IOMMU: hardware identity mapping for device 0000:3e:04.0 [ 1.167014] IOMMU: hardware identity mapping for device 0000:3e:04.1 [ 1.167016] IOMMU: hardware identity mapping for device 0000:3e:04.2 [ 1.167018] IOMMU: hardware identity mapping for device 0000:3e:04.3 [ 1.167020] IOMMU: hardware identity mapping for device 0000:3e:05.0 [ 1.167021] IOMMU: hardware identity mapping for device 0000:3e:05.1 [ 1.167023] IOMMU: hardware identity mapping for device 0000:3e:05.2 [ 1.167025] IOMMU: hardware identity mapping for device 0000:3e:05.3 [ 1.167027] IOMMU: hardware identity mapping for device 0000:3e:06.0 [ 1.167029] IOMMU: hardware identity mapping for device 0000:3e:06.1 [ 1.167031] IOMMU: hardware identity mapping for device 0000:3e:06.2 [ 1.167032] IOMMU: hardware identity mapping for device 0000:3e:06.3 [ 1.167041] IOMMU: hardware identity mapping for device 0000:3f:00.0 [ 1.167043] IOMMU: hardware identity mapping for device 0000:3f:00.1 [ 1.167044] IOMMU: hardware identity mapping for device 0000:3f:02.0 [ 1.167046] IOMMU: hardware identity mapping for device 0000:3f:02.1 [ 1.167049] IOMMU: hardware identity mapping for device 0000:3f:02.2 [ 1.167051] IOMMU: hardware identity mapping for device 0000:3f:02.3 [ 1.167053] IOMMU: hardware identity mapping for device 0000:3f:02.4 [ 1.167055] IOMMU: hardware identity mapping for device 0000:3f:02.5 [ 1.167057] IOMMU: hardware identity mapping for device 0000:3f:03.0 [ 1.167059] IOMMU: hardware identity mapping for device 0000:3f:03.1 [ 1.167061] IOMMU: hardware identity mapping for device 0000:3f:03.2 [ 1.167062] IOMMU: hardware identity mapping for device 0000:3f:03.4 [ 1.167064] IOMMU: hardware identity mapping for device 0000:3f:04.0 [ 1.167066] IOMMU: hardware identity mapping for device 0000:3f:04.1 [ 1.167068] IOMMU: hardware identity mapping for device 0000:3f:04.2 [ 1.167070] IOMMU: hardware identity mapping for device 0000:3f:04.3 [ 1.167071] IOMMU: hardware identity mapping for device 0000:3f:05.0 [ 1.167073] IOMMU: hardware identity mapping for device 0000:3f:05.1 [ 1.167075] IOMMU: hardware identity mapping for device 0000:3f:05.2 [ 1.167077] IOMMU: hardware identity mapping for device 0000:3f:05.3 [ 1.167079] IOMMU: hardware identity mapping for device 0000:3f:06.0 [ 1.167080] IOMMU: hardware identity mapping for device 0000:3f:06.1 [ 1.167082] IOMMU: hardware identity mapping for device 0000:3f:06.2 [ 1.167084] IOMMU: hardware identity mapping for device 0000:3f:06.3 [ 1.167085] IOMMU: Setting RMRR: [ 1.167096] IOMMU: Prepare 0-16MiB unity mapping for LPC I boot the kernel with intel_iommu=3Don iommu=3Dpt Any idea ? Should I report to libvirt ? Best regards, --=20 Jean Parpaillon Open Source Consultant Phone: +33 6 30 10 92 86 im: jean.parpaillon@gmail.com skype: jean.parpaillon linkedin: http://www.linkedin.com/in/jeanparpaillon/en --------------020802010506020007060907 Content-Type: text/x-vcard; charset=utf-8; name="jean_parpaillon.vcf" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="jean_parpaillon.vcf" YmVnaW46dmNhcmQNCmZuOkplYW4gUGFycGFpbGxvbg0KbjpQYXJwYWlsbG9uO0plYW4NCm9y ZzpPcGVuIFNvdXJjZSBjb25zdWx0YW50DQplbWFpbDtpbnRlcm5ldDpqZWFuLnBhcnBhaWxs b25AZnJlZS5mcg0KdGVsO2NlbGw6KzMzNjMwMTA5Mjg2DQp4LW1vemlsbGEtaHRtbDpGQUxT RQ0KdXJsOmh0dHA6Ly93d3cubGlua2VkaW4uY29tL2luL2plYW5wYXJwYWlsbG9uL2VuDQp2 ZXJzaW9uOjIuMQ0KZW5kOnZjYXJkDQoNCg== --------------020802010506020007060907-- ------enig2AUHTVQJPLSCLGKDTAQFS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlFcPAcACgkQ8P+pSEjr0u5iVgCfXznOWIP8AaVKYEifsukFJLu9 szoAnj5qTwp1Pjm26HkYbECnhuWREzDz =mJ4c -----END PGP SIGNATURE----- ------enig2AUHTVQJPLSCLGKDTAQFS--