* [Qemu-devel] Fwd: [Qemu-discuss] pci-assign error [not found] <515C007F.2040402@free.fr> @ 2013-04-03 14:26 ` Jean Parpaillon 2013-04-03 18:16 ` Alex Williamson 0 siblings, 1 reply; 3+ messages in thread From: Jean Parpaillon @ 2013-04-03 14:26 UTC (permalink / raw) To: qemu-devel [-- Attachment #1.1: Type: text/plain, Size: 9924 bytes --] -------- Message original -------- Sujet: [Qemu-discuss] pci-assign error Date : Wed, 03 Apr 2013 12:12:15 +0200 De : Jean Parpaillon <jean.parpaillon@free.fr> 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=C PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin HOME=/root USER=root LOGNAME=root QEMU_AUDIO_DRV=spice /usr/bin/kvm -name sofa -S -M pc-1.1 -m 1500 -smp 2,sockets=2,cores=1,threads=1 -uuid 1234beef -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/sofa.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x5 -drive file=/dev/vgsurcouf/sofa,if=none,id=drive-virtio-disk0,format=raw -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -drive file=/var/lib/libvirt/images/iso/debian-testing-amd64-netinst.iso,if=none,id=drive-ide0-1-0,readonly=on,format=raw -device ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev tap,fd=23,id=hostnet0,vhost=on,vhostfd=24 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=...,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev spicevmc,id=charchannel0,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 -device usb-tablet,id=input0 -spice port=5900,addr=127.0.0.1,disable-ticketing,seamless-migration=on -vga qxl -global qxl-vga.ram_size=67108864 -global qxl-vga.vram_size=67108864 -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device pci-assign,host=02:00.0,id=hostdev0,configfd=25,bus=pci.0,multifunction=on,addr=0x8 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7 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=02:00.0,id=hostdev0,configfd=25,bus=pci.0,multifunction=on,addr=0x8: Failed to assign device "hostdev0" : Operation not permitted qemu-system-x86_64: -device pci-assign,host=02:00.0,id=hostdev0,configfd=25,bus=pci.0,multifunction=on,addr=0x8: 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=on iommu=pt Any idea ? Should I report to libvirt ? Best regards, -- 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 [-- Attachment #1.2: jean_parpaillon.vcf --] [-- Type: text/x-vcard, Size: 241 bytes --] begin:vcard fn:Jean Parpaillon n:Parpaillon;Jean org:Open Source consultant email;internet:jean.parpaillon@free.fr tel;cell:+33630109286 x-mozilla-html:FALSE url:http://www.linkedin.com/in/jeanparpaillon/en version:2.1 end:vcard [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 263 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] Fwd: [Qemu-discuss] pci-assign error 2013-04-03 14:26 ` [Qemu-devel] Fwd: [Qemu-discuss] pci-assign error Jean Parpaillon @ 2013-04-03 18:16 ` Alex Williamson 2013-05-30 8:04 ` Jean Parpaillon 0 siblings, 1 reply; 3+ messages in thread From: Alex Williamson @ 2013-04-03 18:16 UTC (permalink / raw) To: Jean Parpaillon; +Cc: qemu-devel On Wed, 2013-04-03 at 16:26 +0200, Jean Parpaillon wrote: > > > -------- Message original -------- > Sujet: [Qemu-discuss] pci-assign error > Date : Wed, 03 Apr 2013 12:12:15 +0200 > De : Jean Parpaillon <jean.parpaillon@free.fr> > Pour : qemu-discuss@nongnu.org > > Dear all, > I'm trying to assign a PCI graphic card to a qemu guest. Hi, A) Graphics assignment isn't supported and this likely won't be the only problem you find, but if you want to experiment with VFIO-based VGA support please try: kernel: git://github.com/awilliam/linux-vfio.git (branch next) qemu: git://github.com/awilliam/qemu-vfio.git (tag vfio-pci-for-qemu-20130401.0) I sent a qemu pull request for the latter and the kernel updates should be in 3.10. B) Does assignment of anything work on your system or do you perhaps see an error in dmesg like: No interrupt remapping support, disallowing device assignment. Re-enble with "allow_unsafe_assigned_interrupts=1" module option. If so, try that. Thanks, Alex > When I start the guest with libvirt, I have the following error in > /var/log/libvirt/qemu/sofa.log: > LC_ALL=C > PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin > HOME=/root USER=root LOGNAME=root QEMU_AUDIO_DRV=spice /usr/bin/kvm > -name sofa -S -M pc-1.1 -m 1500 -smp 2,sockets=2,cores=1,threads=1 -uuid > 1234beef -no-user-config -nodefaults -chardev > socket,id=charmonitor,path=/var/lib/libvirt/qemu/sofa.monitor,server,nowait > -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc > -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 > -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x5 -drive > file=/dev/vgsurcouf/sofa,if=none,id=drive-virtio-disk0,format=raw > -device > virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 > -drive > file=/var/lib/libvirt/images/iso/debian-testing-amd64-netinst.iso,if=none,id=drive-ide0-1-0,readonly=on,format=raw > -device ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev > tap,fd=23,id=hostnet0,vhost=on,vhostfd=24 -device > virtio-net-pci,netdev=hostnet0,id=net0,mac=...,bus=pci.0,addr=0x3 > -chardev pty,id=charserial0 -device > isa-serial,chardev=charserial0,id=serial0 -chardev > spicevmc,id=charchannel0,name=vdagent -device > virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 > -device usb-tablet,id=input0 -spice > port=5900,addr=127.0.0.1,disable-ticketing,seamless-migration=on -vga > qxl -global qxl-vga.ram_size=67108864 -global qxl-vga.vram_size=67108864 > -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device > hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device > pci-assign,host=02:00.0,id=hostdev0,configfd=25,bus=pci.0,multifunction=on,addr=0x8 > -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7 > 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=02:00.0,id=hostdev0,configfd=25,bus=pci.0,multifunction=on,addr=0x8: > Failed to assign device "hostdev0" : Operation not permitted > qemu-system-x86_64: -device > pci-assign,host=02:00.0,id=hostdev0,configfd=25,bus=pci.0,multifunction=on,addr=0x8: > 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=on iommu=pt > > > Any idea ? Should I report to libvirt ? > > Best regards, ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] Fwd: [Qemu-discuss] pci-assign error 2013-04-03 18:16 ` Alex Williamson @ 2013-05-30 8:04 ` Jean Parpaillon 0 siblings, 0 replies; 3+ messages in thread From: Jean Parpaillon @ 2013-05-30 8:04 UTC (permalink / raw) To: Alex Williamson; +Cc: qemu-devel [-- Attachment #1.1: Type: text/plain, Size: 11519 bytes --] Dear Alex, Thank you for your answer. Unfortunately, I had not yet the opportunity to test it as I don't have a Kepler arch (I suppose it depends on it ?). I will keep you informed of the results. Regards, Jean Le 03/04/2013 20:16, Alex Williamson a écrit : > On Wed, 2013-04-03 at 16:26 +0200, Jean Parpaillon wrote: >> >> >> -------- Message original -------- >> Sujet: [Qemu-discuss] pci-assign error >> Date : Wed, 03 Apr 2013 12:12:15 +0200 >> De : Jean Parpaillon <jean.parpaillon@free.fr> >> Pour : qemu-discuss@nongnu.org >> >> Dear all, >> I'm trying to assign a PCI graphic card to a qemu guest. > > Hi, > > A) Graphics assignment isn't supported and this likely won't be the only > problem you find, but if you want to experiment with VFIO-based VGA > support please try: > > kernel: > git://github.com/awilliam/linux-vfio.git (branch next) > qemu: > git://github.com/awilliam/qemu-vfio.git (tag vfio-pci-for-qemu-20130401.0) > > I sent a qemu pull request for the latter and the kernel updates should > be in 3.10. > > B) Does assignment of anything work on your system or do you perhaps see > an error in dmesg like: > > No interrupt remapping support, disallowing device assignment. > Re-enble with "allow_unsafe_assigned_interrupts=1" module > option. > > If so, try that. Thanks, > > Alex > >> When I start the guest with libvirt, I have the following error in >> /var/log/libvirt/qemu/sofa.log: >> LC_ALL=C >> PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin >> HOME=/root USER=root LOGNAME=root QEMU_AUDIO_DRV=spice /usr/bin/kvm >> -name sofa -S -M pc-1.1 -m 1500 -smp 2,sockets=2,cores=1,threads=1 -uuid >> 1234beef -no-user-config -nodefaults -chardev >> socket,id=charmonitor,path=/var/lib/libvirt/qemu/sofa.monitor,server,nowait >> -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc >> -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 >> -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x5 -drive >> file=/dev/vgsurcouf/sofa,if=none,id=drive-virtio-disk0,format=raw >> -device >> virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 >> -drive >> file=/var/lib/libvirt/images/iso/debian-testing-amd64-netinst.iso,if=none,id=drive-ide0-1-0,readonly=on,format=raw >> -device ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev >> tap,fd=23,id=hostnet0,vhost=on,vhostfd=24 -device >> virtio-net-pci,netdev=hostnet0,id=net0,mac=...,bus=pci.0,addr=0x3 >> -chardev pty,id=charserial0 -device >> isa-serial,chardev=charserial0,id=serial0 -chardev >> spicevmc,id=charchannel0,name=vdagent -device >> virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 >> -device usb-tablet,id=input0 -spice >> port=5900,addr=127.0.0.1,disable-ticketing,seamless-migration=on -vga >> qxl -global qxl-vga.ram_size=67108864 -global qxl-vga.vram_size=67108864 >> -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device >> hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device >> pci-assign,host=02:00.0,id=hostdev0,configfd=25,bus=pci.0,multifunction=on,addr=0x8 >> -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7 >> 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=02:00.0,id=hostdev0,configfd=25,bus=pci.0,multifunction=on,addr=0x8: >> Failed to assign device "hostdev0" : Operation not permitted >> qemu-system-x86_64: -device >> pci-assign,host=02:00.0,id=hostdev0,configfd=25,bus=pci.0,multifunction=on,addr=0x8: >> 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=on iommu=pt >> >> >> Any idea ? Should I report to libvirt ? >> >> Best regards, > > > -- 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 [-- Attachment #1.2: jean_parpaillon.vcf --] [-- Type: text/x-vcard, Size: 241 bytes --] begin:vcard fn:Jean Parpaillon n:Parpaillon;Jean org:Open Source consultant email;internet:jean.parpaillon@free.fr tel;cell:+33630109286 x-mozilla-html:FALSE url:http://www.linkedin.com/in/jeanparpaillon/en version:2.1 end:vcard [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 263 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-05-30 8:05 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <515C007F.2040402@free.fr> 2013-04-03 14:26 ` [Qemu-devel] Fwd: [Qemu-discuss] pci-assign error Jean Parpaillon 2013-04-03 18:16 ` Alex Williamson 2013-05-30 8:04 ` Jean Parpaillon
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).