PCI Passthrough with QEMU-KVM-SPICE fails

Bug #1010893 reported by Aaron Rogers
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
qemu-kvm-spice (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

lsb_release -rd
Description: Ubuntu 12.04 LTS
Release: 12.04

apt-cache policy qemu-kvm-spice
qemu-kvm-spice:
  Installed: 1.0.50-2012.03-0ubuntu2
  Candidate: 1.0.50-2012.03-0ubuntu2
  Version table:
 *** 1.0.50-2012.03-0ubuntu2 0
        500 http://au.archive.ubuntu.com/ubuntu/ precise/universe amd64 Packages
        100 /var/lib/dpkg/status

Attempting to passthrough a PCI device using kvm-spice fails.
Upon investigating logs, I was able to locate the following:
kvm-spice: -device pci-assign,host=25:00.0,id=hostdev0,bus=pci.0,addr=0x7: Parameter 'driver' expects device type

Appropriate config data from virtual machine:
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <source>
        <address domain='0x0000' bus='0x25' slot='0x00' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </hostdev>

If I attempt to start using just geneic qemu-kvm, PCI passes through correctly

 /usr/bin/kvm -S -M pc-1.0 -enable-kvm -m 1024 -smp 1,sockets=1,cores=1,threads=1 -name Win7 -uuid 0639053f-03ef-1d53-6bbb-fca91a597053 -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/Win7.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=localtime -no-shutdown -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x5 -drive file=/dev/VG_SYSTEM/VM_WIN7,if=none,id=drive-ide0-0-0,format=raw -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -netdev tap,fd=20,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:2f:ed:45,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -usb -device usb-tablet,id=input0 -vnc 127.0.0.1:0 -vga cirrus -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=25:00.0,id=hostdev0,configfd=21,bus=pci.0,addr=0x7 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: qemu-kvm-spice 1.0.50-2012.03-0ubuntu2
ProcVersionSignature: Ubuntu 3.2.0-23.36-generic 3.2.14
Uname: Linux 3.2.0-23-generic x86_64
NonfreeKernelModules: fglrx
ApportVersion: 2.0.1-0ubuntu8
Architecture: amd64
Date: Sat Jun 9 23:53:20 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
ProcEnviron:
 LANGUAGE=en_AU:en
 TERM=xterm
 LANG=en_AU.UTF-8
 SHELL=/bin/bash
SourcePackage: qemu-linaro
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Aaron Rogers (uitin) wrote :
Revision history for this message
Robstarusa (rob-naseca) wrote :

This affects me as well. in Quantal. Is someone going to release a fix for this? Any idea how to force my vm (generated with virt-manager) to use kvm instead of kvm-spice?

Revision history for this message
Robstarusa (rob-naseca) wrote :

er, my version of kvm-qemu-spice is 1.2.0-2012.09-0ubuntu1

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in qemu-kvm-spice (Ubuntu):
status: New → Confirmed
Revision history for this message
neonkandi (jodi-curtis) wrote :

I am having problems with kvm-spice trying to use filesystem, it is giving the same message reported by many sources which reference PCI passthrough, I don't know if they rely on a similar mechanism behind the scenes, I am a bit of a noob, but I can't see a problem with the use of <filesystem>

<filesystem rtpe="mount" accessmode="squash">
    <driver type="path" />
    <source dir="/var/lib/libvirt/drivers" />
    <target dir="/host/drivers" />
    <readonly />
 </filesystem>

error: Failed to start domain VM7
error: internal error process exited while connecting to monitor: char device redirected to /dev/pts/1
kvm: -device virtio-9p-pci,id=fs0,fsdev=fsdev-fs0,mount_tag=/var/lib/libvirt/drivers,bus=pci.0,addr=0x3: Parameter 'driver' expects device type

qemu-kvm-spice:
  Installed: 1.2.0-2012.09-0ubuntu1
  Candidate: 1.2.0-2012.09-0ubuntu1
  Version table:
 *** 1.2.0-2012.09-0ubuntu1 0
        500 http://gb.archive.ubuntu.com/ubuntu/ quantal/universe amd64 Packages
        100 /var/lib/dpkg/status

Revision history for this message
Aaron Rogers (uitin) wrote :

Hi guys,
As a work around, find the emulator tag in the Xml configuration and switch it from kvm-spice to kvm.

Unfortunately it means you will loose the spice capabilities.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.