Le 08/09/2012 19:46, Michael Tokarev a écrit : > On 08.09.2012 20:55, michael chlon wrote: >> Package: qemu-kvm >> Version: 1.1.1+dfsg-1 >> Severity: normal >> >> Dear Maintainer, >> >> I try to bind my WiFi card - Atheros ( module ath5k) - with my VM >> in dorder to present WiFi card to the VM. >> I try this with PCi Passtrough. >> I have read a lot on internet, and done this: >> >> - Activate iommu with for my kernel: >> > [] > >> - Then, activate the kvm module parameter (as request in syslog and VM >> log !): >> >> options kvm allow_unsafe_assigned_interrupts=1 >> >> - Kernel: 3.2.0-3-amd64 >> - qmeu-kvm: 1.1.1+dfsg-1 >> >> But each time, impossible to boot, with this messsage in virt-manager: >> Unable to read from monitor: Connection reset by peer >> >> Traceback (most recent call last): >> File "/usr/share/virt-manager/virtManager/asyncjob.py", line 45, in >> cb_wrapper >> callback(asyncjob, *args, **kwargs) >> File "/usr/share/virt-manager/virtManager/asyncjob.py", line 66, >> in tmpcb >> callback(*args, **kwargs) >> File "/usr/share/virt-manager/virtManager/domain.py", line >> 1114, in startup >> self._backend.create() >> File "/usr/lib/python2.7/dist-packages/libvirt.py", >> line 620, in create >> if ret == -1: raise libvirtError >> ('virDomainCreate() failed', dom=self) >> libvirtError: Unable to read from monitor: >> Connection reset by peer >> >> The good new ... is that the VM boot with my ethernet NIC card ! > Please show what _kvm_ process says. It might be somewhere in > libvirt logs. And please complain to libvirt for not showing > error messages. === 8< ================================================================ => Output of libvirt.log:
2012-09-08 21:27:35.632+0000: 7778: warning : qemuDomainObjTaint:1371 : Domain id=2 name='android_4_0' uuid=65471d1a-613d-9046-94ce-2d57e234033e is tainted: high-privileges 2012-09-08 21:27:36.803+0000: 7776: error : qemuMonitorIORead:527 : Unable to read from monitor: Connection reset by peer === 8< =============================================================== => And in the VM log (qemu log): 2012-09-08 21:27:35.632+0000: starting up LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin HOME=/ QEMU_AUDIO_DRV=none /usr/bin/kvm -S -M pc-1.1 -enable-kvm -m 1024 -smp 1,sockets=1,cores=1,threads=1 -name android_4 _0 -uuid 65471d1a-613d-9046-94ce-2d57e234033e -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/android_4_0.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 -drive file=/etc/libvirt/qemu/android_4_0.img,if=none,id=drive-ide0-0-0,format=raw -device ide-hd,bus=id e.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -drive 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 -chardev pty,id=chars erial0 -device isa-serial,chardev=charserial0,id=serial0 -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 pc i-assign,host=37:09.0,id=hostdev0,configfd=34,bus=pci.0,addr=0x3 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6 Domain id=2 is tainted: high-privileges char device redirected to /dev/pts/10 Failed to assign irq for "hostdev0": Input/output error Perhaps you are assigning a device that shares an IRQ with another device? kvm: -device pci-assign,host=37:09.0,id=hostdev0,configfd=34,bus=pci.0,addr=0x3: Device 'pci-assign' could not be initialized 2012-09-08 21:27:36.845+0000: shutting down === 8< ================================================================ > Did this wifi card work before, with some previous version of > qemu-kvm? I mean, is it a regression of an old bug? I haven't try. I have try it on the host and everything is working fine! That is why I would like to test it with a VM, with PCI Passthrough ... > Please try running stuff without libvirt. === 8< =========================================================== => Here is the CLI, i have try ( copy from the qemu log): sudo /usr/bin/kvm -S -M pc-1.1 -enable-kvm -m 1024 -smp 1,sockets=1,cores=1,threads=1 -name android_4_0 -uuid 65471d1a-613d-9046-94ce-2d57e234033e -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/android_4_0.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 -drive file=/etc/libvirt/qemu/android_4_0.img,if=none,id=drive-ide0-0-0,format=raw -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -drive 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 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -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=37:09.0,id=hostdev0,configfd=34,bus=pci.0,addr=0x3 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6 => And stdout: char device redirected to /dev/pts/9 get_real_device: read failed, errno = 9 assigned_dev_pci_read: pread failed, ret = -1 errno = 9 === 8< ============================================================= => The output of dmesg: [ 1172.509550] ath5k 0000:37:09.0: PCI INT A disabled [ 1172.509655] pci-stub 0000:37:09.0: claimed by stub [ 1173.891518] pci-stub 0000:37:09.0: PCI INT A -> GSI 21 (level, low) -> IRQ 21 [ 1173.925004] pci-stub 0000:37:09.0: restoring config space at offset 0x1 (was 0x2900400, writing 0x2900102) [ 1174.275116] assign device 0:37:9.0 [ 1174.275356] deassign device 0:37:9.0 [ 1174.304978] pci-stub 0000:37:09.0: restoring config space at offset 0x1 (was 0x2900400, writing 0x2900102) [ 1174.305034] pci-stub 0000:37:09.0: PCI INT A disabled [ 1174.847781] ath5k 0000:37:09.0: PCI INT A -> GSI 21 (level, low) -> IRQ 21 [ 1174.848000] ath5k 0000:37:09.0: registered as 'phy1' [ 1175.433859] ath: EEPROM regdomain: 0x30 [ 1175.433862] ath: EEPROM indicates we should expect a direct regpair map [ 1175.433867] ath: Country alpha2 being used: AM [ 1175.433868] ath: Regpair used: 0x30 [ 1175.433969] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht' [ 1175.434632] ath5k phy1: Atheros AR2414 chip found (MAC: 0x79, PHY: 0x45) === 8< ============================================================== I hope that's will help. > > Thanks, > > /mjt Thanks for the reply. Rgds, Michaël * *