[libvirt-users] passthrough of PCI-device

Weis, Michael (DWIE) michael.weis at smithsdetection.com
Mon Oct 13 05:54:28 UTC 2014


Good morning,

there is a typo in my description;
the line
     <address domain='0x0' bus='0x1' slot='0x00' function='0x0'/>
should be
     <address domain='0x0' bus='0x2' slot='0x00' function='0x0'/>
That was correct in my xml-file.

Isn't there anybody how can help me with that?


Regards

   Michael Weis



Von: Weis, Michael (DWIE)
Gesendet: Dienstag, 7. Oktober 2014 11:45
An: 'libvirt-users at redhat.com'
Betreff: passthrough of PCI-device

Hello,

I try to passthrough a PCI-card to a VM named  testvm
I want to do that with an xml-file named hga.xml including the following content:

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

When I execute
virsh attach-device testvm hga.xml
I get the following error:
Fehler: Fehler beim Anhängen des Geräts von hga.xml
(error: error while attaching device from hga.xml)
Fehler: Interner Fehler: Kann Qemu-Befehl 'device_add' nicht ausführen: Device initialization failed.
(error: internal error: cannot execute 'device_add':

In the syslog of the host I get the following errors:
Oct  7 11:32:34 artemis2 journal: Interner Fehler: Kann Qemu-Befehl 'device_add' nicht ausführen: Device initialization failed.
Oct  7 11:32:53 artemis2 kernel: ffff880220fadd10 ffffffff810f924a ffff880220fadd28 0000000000000246
Oct  7 11:32:53 artemis2 kernel: ffff8800bd07a400 000000007265756d ffffffffa0866ee0 0000000000000000
Oct  7 11:32:53 artemis2 kernel: Call Trace:
Oct  7 11:32:53 artemis2 kernel: [<ffffffff815e237b>] dump_stack+0x19/0x1b
Oct  7 11:32:53 artemis2 kernel: [<ffffffff810f924a>] __setup_irq+0x54a/0x570
Oct  7 11:32:53 artemis2 kernel: [<ffffffffa0866ee0>] ? virqfd_wakeup+0xc0/0xc0 [vfio_pci]
Oct  7 11:32:53 artemis2 kernel: [<ffffffff810f93cc>] request_threaded_irq+0xcc/0x170
Oct  7 11:32:53 artemis2 kernel: [<ffffffffa0866b8a>] vfio_intx_set_signal+0x10a/0x1f0 [vfio_pci]
Oct  7 11:32:53 artemis2 kernel: [<ffffffffa08670e8>] vfio_pci_set_intx_trigger+0xc8/0x1b0 [vfio_pci]
Oct  7 11:32:53 artemis2 kernel: [<ffffffffa086799b>] vfio_pci_set_irqs_ioctl+0x7b/0x100 [vfio_pci]
Oct  7 11:32:53 artemis2 kernel: [<ffffffff8115d352>] ? memdup_user+0x42/0x70
Oct  7 11:32:53 artemis2 kernel: [<ffffffffa0865e74>] vfio_pci_ioctl+0x314/0xa00 [vfio_pci]
Oct  7 11:32:53 artemis2 kernel: [<ffffffff81194b6a>] ? kmem_cache_alloc+0x1ba/0x1d0
Oct  7 11:32:53 artemis2 kernel: [<ffffffff811b156c>] ? get_empty_filp+0x5c/0x190
Oct  7 11:32:53 artemis2 kernel: [<ffffffff811f1891>] ? fsnotify+0x251/0x350
Oct  7 11:32:53 artemis2 kernel: [<ffffffff81251806>] ? security_file_alloc+0x16/0x20
Oct  7 11:32:53 artemis2 kernel: [<ffffffff811b15a0>] ? get_empty_filp+0x90/0x190
Oct  7 11:32:53 artemis2 kernel: [<ffffffffa084f163>] vfio_device_fops_unl_ioctl+0x23/0x30 [vfio]
Oct  7 11:32:53 artemis2 kernel: [<ffffffff811c2af5>] do_vfs_ioctl+0x2e5/0x4c0
Oct  7 11:32:53 artemis2 kernel: [<ffffffff811af780>] ? vfs_write+0x160/0x1e0
Oct  7 11:32:53 artemis2 kernel: [<ffffffff811c2d71>] SyS_ioctl+0xa1/0xc0
Oct  7 11:32:53 artemis2 kernel: [<ffffffff815f2a59>] system_call_fastpath+0x16/0x1b
Oct  7 11:32:53 artemis2 journal: Interner Fehler: Kann Qemu-Befehl 'device_add' nicht ausführen: Device initialization failed.

My version-information:
OS: CentOS Linux release 7.0.1406 (Core)
Kernel: Linux artemis2 3.10.0-123.8.1.el7.x86_64
libvirt-daemon-driver-secret-1.2.8-1.el7.centos.x86_64
libvirt-1.2.8-1.el7.centos.x86_64
libvirt-daemon-kvm-1.2.8-1.el7.centos.x86_64
libvirt-client-1.2.8-1.el7.centos.x86_64
libvirt-daemon-driver-qemu-1.2.8-1.el7.centos.x86_64
libvirt-daemon-config-network-1.2.8-1.el7.centos.x86_64
libvirt-daemon-driver-interface-1.2.8-1.el7.centos.x86_64
libvirt-daemon-1.2.8-1.el7.centos.x86_64
libvirt-daemon-driver-nodedev-1.2.8-1.el7.centos.x86_64
libvirt-daemon-driver-storage-1.2.8-1.el7.centos.x86_64
libvirt-daemon-config-nwfilter-1.2.8-1.el7.centos.x86_64
libvirt-daemon-driver-network-1.2.8-1.el7.centos.x86_64
libvirt-daemon-driver-lxc-1.2.8-1.el7.centos.x86_64
libvirt-daemon-driver-nwfilter-1.2.8-1.el7.centos.x86_64

The PCI-Card I want to passthrough:
02:00.0 Ethernet controller: PLX Technology, Inc. Device 235e
        Subsystem: PLX Technology, Inc. Device 235e
        Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Interrupt: pin A routed to IRQ 16
        Region 0: Memory at f0810000 (32-bit, non-prefetchable) [disabled] [size=256]
        Region 1: I/O ports at e000 [disabled] [size=256]
        Region 2: Memory at e0000000 (32-bit, non-prefetchable) [disabled] [size=256M]
        Region 3: Memory at f0000000 (32-bit, non-prefetchable) [disabled] [size=8M]
        Expansion ROM at f0800000 [disabled] [size=64K]
        Capabilities: [40] Power Management version 1
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [48] CompactPCI hot-swap <?>
        Capabilities: [4c] Vital Product Data
                Unknown large resource type 35, will not decode more.
        Kernel driver in use: vfio-pci

Please help.


Best regards

   Michael Weis



PROPRIETARY: This e-mail contains proprietary information some or all of which may be legally privileged.  It is intended for the recipient only.  If an addressing or transmission error has misdirected this e-mail, please notify the authority by replying to this e-mail.  If you are not the intended recipient you must not use, disclose, distribute, copy, print, or rely on this e-mail.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20141013/95e029b5/attachment.htm>


More information about the libvirt-users mailing list