Hello qemu-devel list, I have a problem with PCI passthrough of my second gfx card (Nvidia GTX 760). I use gentoo, gentoo-hardened kernel sources and I have SELinux enabled (anyway for purpose of these tests I've added svirt_t and virtd_t to permissive types, so it shouldn't make any problem). I use the following versions of applications:
app-emulation/qemu-2.2.0 (but I've also tested app-emulation/qemu-2.1.2-r2) app-emulation/libvirt-1.2.10-r4 app-emulation/virt-manager-1.1.0 While running guest without PCI passthrough everything works fine so far, when I pass my PCI device to the guest I end up with the following message: __QUOTE_BEGIN_CANARY__ Error starting domain: internal error: Process exited while reading console log output: char device redirected to /dev/pts/3 (label charserial0) qemu: hardware error: pci read failed, ret = 0 errno = 0 CPU #0: EAX=00000000 EBX=00000000 ECX=00000000 EDX=00000663 ESI=00000000 EDI=00000000 EBP=00000000 ESP=00000000 EIP=0000fff0 EFL=00000002 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0 ES =0000 00000000 0000ffff 00009300 CS =f000 ffff0000 0000ffff 00009b00 SS =0000 00000000 0000ffff 00009300 DS =0000 00000000 0000ffff 00009300 FS =0000 00000000 0000ffff 00009300 GS =0000 00000000 0000ffff 00009300 LDT=0000 00000000 0000ffff 00008200 TR =0000 00000000 0000ffff 00008b00 GDT= 00000000 0000ffff IDT= 00000000 0000ffff CR0=60000010 CR2=00000000 CR3=00000000 CR4=00000000 DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000 DR6=00000000ffff0ff0 DR7=0000000000000400 EFER=0000000000000000 FCW=037f FSW=0000 [ST=0] FTW=00 MXCSR=00001f80 FPR0=0000000000000000 0000 FPR1=0000000000000000 0000 FPR2=0000000000000000 0000 FPR3=00000 __QUOTE_END_CANARY__ In /var/log/libvirtd/libvirtd.log there is: 2015-02-03 02:12:27.135+0000: 3073: error : qemuProcessReadLogOutput:1719 : internal error: Process exited while reading console log output: char device redirected to /dev/pts/3 (label charserial0) qemu: hardware error: pci read failed, ret = 0 errno = 0 __QUOTE_BEGIN_CANARY__ ... __QUOTE_END_CANARY__ And in /var/log/libvirtd/qemu/guest.log there is: 2015-02-03 02:12:27.025+0000: starting up LC_ALL=C PATH=/bin:/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin HOME=/ USER=root QEMU_AUDIO_DRV=none /usr/bin/qemu-system-x86_64 -name debian7 -S -machine pc-i440fx-2.1,accel=kvm -m 1024 -smp 1,sockets=1,cores=1,threads=1 -uui d a00b499e-ad90-4470-8b65-18e17e55dca4 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/debian7.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc,driftfix=slew -no-hpet -no-shutdown -boot c -usb -drive file=/var/lib/libvirt/filesystems/debian.qcow2,if=none,id=drive-virtio-disk0,format=qcow2 -device virtio-blk-pci,bus=pci.0,addr=0x3,drive=drive-virtio-disk0,id=virtio-disk0 -drive file=/var/lib/libvirt/images/debian-7.8.0-amd64-netinst.iso,if=none,media=cdrom, id=drive-ide0-0-0,readonly=on,format=raw -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -device usb-tablet,id=input0 -vnc 127.0.0.1:0 -vga cirrus -device pci-assign,hos t=06:00.0,id=hostdev0,bus=pci.0,addr=0x5 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 char device redirected to /dev/pts/3 (label charserial0) qemu: hardware error: pci read failed, ret = 0 errno = 0 __QUOTE_BEGIN_CANARY__ ... __QUOTE_END_CANARY__ I add that I was required to turn off integrated sound device because the earlier error was: 2015-02-03 01:47:40.189+0000: 3070: error : virPCIDeviceReset:985 : internal error: Unable to reset PCI device 0000:06:00.0: internal error: Active 0000:06:00.1 devices on bus with 0000:06:00.0, not doing bus reset after typing: echo 1 > /sys/devices/pci0000:00/0000:00:15.0/0000:06:00.1/remove this problem disappears and I'm stuck on the above one. Any help? Any work around? Is it a known issue? Could I provide any additional info to help you diagnose the problem? Thanks, Chris