Re: [Qemu-devel] Fwd: [Qemu-discuss] pci-assign error

2013-05-30 Thread Jean Parpaillon
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.parpail...@free.fr
 Pour : qemu-disc...@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+: 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 :02:00.0  /sys/bus/pci/devices/:02:00.0/driver/unbind
 echo :02:00.1  /sys/bus/pci/devices/:02:00.1/driver/unbind
 sleep 3
 echo :02:00.0  /sys/bus/pci/drivers/pci-stub/bind
 echo :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.00] 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 fedc ver 1:0 cap
 c90780106f0462 ecap f020f6
 [1.166855] IOMMU 0 0xebffe000: using Queued invalidation
 [1.166861] IOMMU 1 0xfedc: using Queued invalidation
 [1.166889] IOMMU: hardware identity mapping for device :00:00.0
 [1.166891] IOMMU: hardware identity mapping for device :00:03.0
 [1.166893] IOMMU: hardware identity mapping for device :00:07.0
 [1.166895] 

[Qemu-devel] Fwd: [Qemu-discuss] pci-assign error

2013-04-03 Thread Jean Parpaillon



 Message original 
Sujet: [Qemu-discuss] pci-assign error
Date : Wed, 03 Apr 2013 12:12:15 +0200
De : Jean Parpaillon jean.parpail...@free.fr
Pour : qemu-disc...@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+: 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 :02:00.0  /sys/bus/pci/devices/:02:00.0/driver/unbind
echo :02:00.1  /sys/bus/pci/devices/:02:00.1/driver/unbind
sleep 3
echo :02:00.0  /sys/bus/pci/drivers/pci-stub/bind
echo :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.00] 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 fedc ver 1:0 cap
c90780106f0462 ecap f020f6
[1.166855] IOMMU 0 0xebffe000: using Queued invalidation
[1.166861] IOMMU 1 0xfedc: using Queued invalidation
[1.166889] IOMMU: hardware identity mapping for device :00:00.0
[1.166891] IOMMU: hardware identity mapping for device :00:03.0
[1.166893] IOMMU: hardware identity mapping for device :00:07.0
[1.166895] IOMMU: hardware identity mapping for device :00:14.0
[1.166897] IOMMU: hardware identity mapping for device :00:14.1
[1.166898] IOMMU: hardware identity mapping for device :00:14.2
[1.166900] IOMMU: hardware identity mapping for device :00:1a.0
[1.166902] IOMMU: hardware identity mapping for device :00:1a.1
[1.166904] IOMMU: hardware identity mapping for device :00:1a.7
[1.166906] IOMMU: hardware identity mapping for device :00:1b.0
[1.166907] IOMMU: hardware identity mapping for device :00:1c.0
[1.166909] IOMMU: hardware identity mapping for device :00:1c.5
[1.166911] IOMMU: hardware identity mapping for device :00:1d.0
[1.166913] IOMMU: hardware identity mapping for device :00:1d.1
[1.166915] IOMMU: hardware identity mapping for device :00:1d.2
[1.166916] IOMMU: hardware identity mapping for device :00:1d.7
[1.166919] IOMMU: hardware identity mapping for device :00:1f.0
[1.166920] IOMMU: hardware identity mapping for device :00:1f.2
[1.166922] IOMMU: hardware identity 

Re: [Qemu-devel] Fwd: [Qemu-discuss] pci-assign error

2013-04-03 Thread Alex Williamson
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.parpail...@free.fr
 Pour : qemu-disc...@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+: 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 :02:00.0  /sys/bus/pci/devices/:02:00.0/driver/unbind
 echo :02:00.1  /sys/bus/pci/devices/:02:00.1/driver/unbind
 sleep 3
 echo :02:00.0  /sys/bus/pci/drivers/pci-stub/bind
 echo :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.00] 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 fedc ver 1:0 cap
 c90780106f0462 ecap f020f6
 [1.166855] IOMMU 0 0xebffe000: using Queued invalidation
 [1.166861] IOMMU 1 0xfedc: using Queued invalidation
 [1.166889] IOMMU: hardware identity mapping for device :00:00.0
 [1.166891] IOMMU: hardware identity mapping for device :00:03.0
 [1.166893] IOMMU: hardware identity mapping for device :00:07.0
 [1.166895] IOMMU: hardware identity mapping for device :00:14.0
 [1.166897] IOMMU: hardware identity mapping for device :00:14.1
 [1.166898] IOMMU: hardware identity mapping for device :00:14.2
 [1.166900] IOMMU: hardware identity mapping for device :00:1a.0
 [