[libvirt-users] PCI passthrough error

Jaap Winius jwinius at umrk.nl
Thu Mar 29 21:41:47 UTC 2012


Hi folks,

Has anyone encountered the following PCI passthrough error?

   error: internal error Process exited while reading console \
          log output: char device redirected to /dev/pts/1
   assigned_dev_pci_read: pread failed, ret = 0 errno = 2

It's produced after I've detached the PCI device from the base OS and  
have tried to start up the guest domain.

To get to this point, I mostly followed these instructions:

http://docs.fedoraproject.org/en-US/Fedora/13/html/Virtualization_Guide/chap-Virtualization-PCI_passthrough.html#sect-Virtualization-PCI_passthrough-AI_device_to_a_host

The distro I'm using is Debian squeeze, which by default comes with  
libvirt 0.8.3 and qemu-kvm 0.12.5, although to avoid a different PCI  
passthrough error, I used Debian backports for squeeze to upgrade them  
to libvirt 0.9.8 and qemu-kvm 1.0.

The motherboard involved has VT-d support, which I've enabled with the  
"intel_iommu=on" kernel option (dmesg shows "Intel-IOMMU: enabled"). I  
did not bother with setsebool because SELinux is disabled.

According to lspci, the device I want to pass through to the guest  
domain, a USB controller, has bus/slot/function 00:1a.0, so I added  
the following stanza to the <devices> section of my guest domain:

   <hostdev mode='subsystem' type='pci' managed='yes'>
     <source>
       <address domain='0x0000' bus='0x00'
                slot='0x1a' function='0x0'/>
     </source>
   </hostdev>

Actually, every time I save this configuration, libvirt changes it to:

   <hostdev mode='subsystem' type='pci' managed='yes'>
     <source>
       <address domain='0x0000' bus='0x00'
                slot='0x1a' function='0x0'/>
     </source>
     <address type='pci' domain='0x0000' bus='0x00'
              slot='0x05' function='0x0'/>
   </hostdev>

Huh, slot 5? I don't have any PCI devices that use slot 5. Well, at  
least the system doesn't complain, but I worry that this might be a  
symptom of something more serious.

Anyway, I'd be very grateful if anyone has any tips on how I might  
avoid the aforementioned error and get PCI passthrough to to work.

Thanks,

Jaap




More information about the libvirt-users mailing list