Bug#687040: qemu-kvm / libvirt* : PCI Passthough for Atheros WiFi card does not work

2015-11-29 Thread michaël chlon
HI,

I don’t know, it was in 2012 ….


Rgds,


> Le 29 nov. 2015 à 13:41, Michael Tokarev  a écrit :
> 
> Hello.
> 
> I'm rehashing old bugreports in qemu package.
> Is thie issue you reported back in 2012 still
> relevant now, with current qemu and kernel
> versions in jessie?
> 
> Thanks,
> 
> /mjt



Bug#687040: qemu-kvm / libvirt* : PCI Passthough for Atheros WiFi card does not work

2015-11-29 Thread Michael Tokarev
Hello.

I'm rehashing old bugreports in qemu package.
Is thie issue you reported back in 2012 still
relevant now, with current qemu and kernel
versions in jessie?

Thanks,

/mjt



Bug#687040: qemu-kvm / libvirt* : PCI Passthough for Atheros WiFi card does not work

2015-11-29 Thread Michael Tokarev
29.11.2015 17:56, michaël chlon wrote:
> HI,
> 
> I don’t know, it was in 2012 ….

Sure thing, I mentioned the year when you filed the bugreport.  It _was_ in 
2012.
But I'm asking whenever it works _now_, which is in 2015.. ;)

Thanks,

/mjt

>> Le 29 nov. 2015 à 13:41, Michael Tokarev  a écrit :
>>
>> Hello.
>>
>> I'm rehashing old bugreports in qemu package.
>> Is thie issue you reported back in 2012 still
>> relevant now, with current qemu and kernel
>> versions in jessie?



Bug#687040: qemu-kvm / libvirt* : PCI Passthough for Atheros WiFi card does not work

2013-09-26 Thread Thomas Pierson
Hello,

I have the same issue using a pci card.
Finally, is there any solution or workaround to this problem?

Best regards,
-- 
Thomas Pierson - NOC
Mezcalito - http://www.mezcalito.fr
17 boulevard Agutte Sembat - 38000 Grenoble
04 76 01 03 91


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#687040: qemu-kvm / libvirt* : PCI Passthough for Atheros WiFi card does not work

2012-09-22 Thread Michael Tokarev
On 22.09.2012 00:04, Chlon Michaël wrote:
 Hello,
 
 Here is the results:
 $ sudo  lspci -vvvxxx -s 37:09.0
 37:09.0 Ethernet controller: Atheros Communications Inc. AR5212/AR5213 
 Wireless Network Adapter (rev 01)
 Subsystem: D-Link System Inc AirPlus DWL-G520 Wireless PCI Adapter (rev. 
 B)
 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-
 Latency: 168 (2500ns min, 7000ns max), Cache Line Size: 64 bytes
 Interrupt: pin A routed to IRQ 21
 Region 0: Memory at e300 (32-bit, non-prefetchable) [size=64K]
 Capabilities: [44] Power Management version 2
 Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA 
 PME(D0-,D1-,D2-,D3hot-,D3cold-)
 Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=2 PME-
 Kernel driver in use: ath5k

Good.  So it doesn't support MSI.  Ok.

 $ sudo setpci -s 37:09.0 CONTROL
 setpci: Unknown register CONTROL.
 Try `setpci --help' for more information.
 
 So:
 $ setpci --dumpregs | grep -i control
  3e W BRIDGE_CONTROL

nope.  I'm sorry about that.  I mean COMMAND not CONTROL.
This is a mandatory register.

Thank you, and please excuse me for the noize.

/mjt


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#687040: qemu-kvm / libvirt* : PCI Passthough for Atheros WiFi card does not work

2012-09-21 Thread Chlon Michaël
Hello,

Here is the results:
$ sudo  lspci -vvvxxx -s 37:09.0
37:09.0 Ethernet controller: Atheros Communications Inc. AR5212/AR5213
Wireless Network Adapter (rev 01)
Subsystem: D-Link System Inc AirPlus DWL-G520 Wireless PCI Adapter
(rev. B)
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-
Latency: 168 (2500ns min, 7000ns max), Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 21
Region 0: Memory at e300 (32-bit, non-prefetchable) [size=64K]
Capabilities: [44] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=2 PME-
Kernel driver in use: ath5k
00: 8c 16 13 00 06 01 90 02 01 00 00 02 10 a8 00 00
10: 00 00 00 e3 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 01 50 00 00 86 11 13 3a
30: 00 00 00 00 44 00 00 00 00 00 00 00 03 01 0a 1c
40: 00 00 00 00 01 00 c2 01 00 40 00 c6 00 00 00 00
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

And then:

$ sudo setpci -s 37:09.0 CONTROL
setpci: Unknown register CONTROL.
Try `setpci --help' for more information.

So:
$ setpci --dumpregs | grep -i control
 3e W BRIDGE_CONTROL

Your parameter CONTROL does not exist !!!
I guess I have to use: BRIDGE_CONTROL ???

$ sudo setpci -s 37:09.0 BRIDGE_CONTROL
1c0a

$ printf %x\n $((0x1c0a | 0x0400))  
1c0a

Nothing to do !!!
is it normal ???

but I try:
$ sudo setpci -s 37:09.0 BRIDGE_CONTROL=0x1c0a

And:
$ sudo setpci -s 37:09.0 BRIDGE_CONTROL  
1c0a

OK, seems to be good. I hope ???

Now, how can I pass the argument prefer_msi and/or share_intx to the
guest VM, in the xml file ??
I found nothing on the web, doc., ... 

I did not find too, how to convert a xml guest file to a CLI !
I try to peek up the one in the log, but this does not work !
Here it is:

LC_ALL=C
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
HOME=/root USER=root LOGNAME=root 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 cha
rdev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown
-no-acpi -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=25,bus=pci.0,addr=0x3
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6


And now ?

/Michaël C.




Le 19/09/2012 17:03, Michael Tokarev a écrit :
 On 17.09.2012 17:30, Chlon Michaël wrote:
 Good Evening,


 Well, in fact, it is  *an issue with shared IRQ*.
 I wonder if there is a mean to pass to the kernel a fixed IRQ for
 this PCI device, at boot for example. I haven't find anything ...
 I have also stop my server, change physically the port of the
 WiFi card, but after reboot it's remain shared ... with an
 another IRQ, but shared! :'(
 Here there is:

 $ cat /proc/interrupts
 21: 0 0 0 0 0 0 0 0 IO-APIC-fasteoi   uhci_hcd:usb4, uhci_hcd:usb7, ath
 Ok.  Please provide lspci -vvvxxx output for this
 device.  Take a look at lspci, note the device number
 (left column), and do

  lspci -vvvxxx -s device

 like, for a random my device, lspci -xxxvvv -s 02:00.0,
 and send the result.

 It might be that the device itself does not support irq
 sharing in this mode.   qemu-kvm wants devices which
 either support MSI (in this case everything should just
 work, and is fast, if the device is not buggy to start
 with), or by disabling using legacy INTx by config register
 setup.

 You can check if the device supports the 2nd mode by writing
 bit 10 (0x0400) to CONTROL register using setpci and verifying
 (using setpci again) it is set by reading it again.  For
 this:

   

Bug#687040: qemu-kvm / libvirt* : PCI Passthough for Atheros WiFi card does not work

2012-09-19 Thread Michael Tokarev
On 17.09.2012 17:30, Chlon Michaël wrote:
 Good Evening,
 
 
 Well, in fact, it is  *an issue with shared IRQ*.
 I wonder if there is a mean to pass to the kernel a fixed IRQ for
 this PCI device, at boot for example. I haven't find anything ...
 I have also stop my server, change physically the port of the
 WiFi card, but after reboot it's remain shared ... with an
 another IRQ, but shared! :'(
 Here there is:
 
 $ cat /proc/interrupts
 21: 0 0 0 0 0 0 0 0 IO-APIC-fasteoi   uhci_hcd:usb4, uhci_hcd:usb7, ath

Ok.  Please provide lspci -vvvxxx output for this
device.  Take a look at lspci, note the device number
(left column), and do

 lspci -vvvxxx -s device

like, for a random my device, lspci -xxxvvv -s 02:00.0,
and send the result.

It might be that the device itself does not support irq
sharing in this mode.   qemu-kvm wants devices which
either support MSI (in this case everything should just
work, and is fast, if the device is not buggy to start
with), or by disabling using legacy INTx by config register
setup.

You can check if the device supports the 2nd mode by writing
bit 10 (0x0400) to CONTROL register using setpci and verifying
(using setpci again) it is set by reading it again.  For
this:

  setpci -s device CONTROL

this will return a hexadecimal number.  Or it with 0x0400,
eg, like this:

  printf %x\n  $((0xprev_value | 0x0400))

and write it back:

  setpci -s device CONTROL=newvalue

and read it again:

  setpci -s device CONTROL

If the new value is the same what you set above, it has
some chance to work.

Now,  There are two parameters for -device pci-assign --
prefer_msi and share_intx.  You can experiment with the
two - prefer_msi is now off, but if your device supports
msi, you can turn it on.  share_intx is also an on/off
switch.

Please post your findings.

Thanks,

/mjt


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#687040: qemu-kvm / libvirt* : PCI Passthough for Atheros WiFi card does not work

2012-09-17 Thread Chlon Michaël
Good Evening,


Well, in fact, it is  *an issue with shared IRQ*.
I wonder if there is a mean to pass to the kernel a fixed IRQ for
this PCI device, at boot for example. I haven't find anything ...
I have also stop my server, change physically the port of the
WiFi card, but after reboot it's remain shared ... with an
another IRQ, but shared! :'(
Here there is:

$ cat /proc/interrupts
CPU0   CPU1   CPU2   CPU3   CPU4  
CPU5   CPU6   CPU7  
   0: 40  0  0   70702758  0 
0  0  0   IO-APIC-edge  timer
   1:  1  0  0  2  0 
0  0  0   IO-APIC-edge  i8042
   6:  0  0  0  3  0 
0  0  0   IO-APIC-edge  floppy
   8:  0  0  0  1  0 
0  0  0   IO-APIC-edge  rtc0
   9:  0  0  0  0  0 
0  0  0   IO-APIC-fasteoi   acpi
  12:  1  0  0  4  0 
0  0  0   IO-APIC-edge  i8042
  14:  0  0  03444378  0 
0  0  0   IO-APIC-edge  ata_piix
  15:  0  0  03728287  0 
0  0  0   IO-APIC-edge  ata_piix
  18:  0  0  0  0  0 
0  0  0   IO-APIC-fasteoi   ata_piix
  20:  0  0  0  0 316817 
0  0  0   IO-APIC-fasteoi   ehci_hcd:usb2,
firewire_ohci, uhci_hcd:usb3, uhci_hcd:usb6
*  21:  0  0  0  0  0 
0  0  0   IO-APIC-fasteoi   uhci_hcd:usb4,
uhci_hcd:usb7, ath*
  22:  0  0  0  01876955 
0  0  0   IO-APIC-fasteoi   ehci_hcd:usb1,
uhci_hcd:usb5, uhci_hcd:usb8
  24:  0  02974577  0  0 
0  0  0   IO-APIC-fasteoi   nvidia
  64:  0  0  0  0  0 
0  0  0  DMAR_MSI-edge  dmar0
  67:  0  0  0  0  0 
0  07983015   PCI-MSI-edge  eth0-rx-0
  68:  0  0  0  0  0 
0  03489487   PCI-MSI-edge  eth0-tx-0
  69:  2  0  0  0  0 
0  0  0   PCI-MSI-edge  eth0
  70:  0648  0  0  0 
0  0  0   PCI-MSI-edge  snd_hda_intel
 NMI:  10127   9027  10394  11389   4733  
4657   4032   6682   Non-maskable interrupts
 LOC:   19881625   19575288   171415719342020   11034179   
90003869172012   11063969   Local timer interrupts
 SPU:  0  0  0  0  0 
0  0  0   Spurious interrupts
 PMI:  10127   9027  10394  11389   4733  
4657   4032   6682   Performance monitoring interrupts
 IWI:  0  0  0  0  0 
0  0  0   IRQ work interrupts
 RES:   34203542   33352437   32938061   31707805   11543099  
10889861   115828529604631   Rescheduling interrupts
 CAL: 182415 182495 189768 168399  84702
104909  93302 106265   Function call interrupts
 TLB:28908192808521278938929796751194289   
129163112489871623216   TLB shootdowns
 TRM:  0  0  0  0  0 
0  0  0   Thermal event interrupts
 THR:  0  0  0  0  0 
0  0  0   Threshold APIC interrupts
 MCE:  0  0  0  0  0 
0  0  0   Machine check exceptions
 MCP:165165165165165   
165165165   Machine check polls

Wny solution will be apreciate !!!
Should I report the Bug to someone else ? who ?

Thanks.
Cheers,
Rgds,

Michaël


Le 09/09/2012 15:18, Michael Tokarev a écrit :
 On 09.09.2012 01:38, Chlon Michaël wrote:
 []
 = And in the VM log (qemu log):

 2012-09-08 21:27:35.632+: 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 
 

Bug#687040: qemu-kvm / libvirt* : PCI Passthough for Atheros WiFi card does not work

2012-09-09 Thread Michael Tokarev
On 09.09.2012 01:38, Chlon Michaël wrote:
[]
 = And in the VM log (qemu log):
 
 2012-09-08 21:27:35.632+: 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+: shutting down

Here we go.  This is the error/log which I asked you to
provide (I wish libvirt gave these details right away
without extra efforts from the user).

So you have to investigate - the IRQ hint is a good
hint to start with.

/mjt


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#687040: qemu-kvm / libvirt* : PCI Passthough for Atheros WiFi card does not work

2012-09-08 Thread michael chlon
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:

[0.00] Command line: BOOT_IMAGE=/vmlinuz-3.2.0-3-amd64
root=/dev/mapper/vg01-root ro hugepages=20 intel_iommu=on quiet
[0.00] Kernel command line: BOOT_IMAGE=/vmlinuz-3.2.0-3-amd64
root=/dev/mapper/vg01-root ro hugepages=20 intel_iommu=on quiet
[0.00] Intel-IOMMU: enabled
[0.008416] IOMMU 0: reg_base_addr fed9 ver 1:0 cap
c90780106f0462 ecap f02076
[1.233856] IOMMU 0 0xfed9: using Queued invalidation
[1.233863] IOMMU: Setting RMRR:
[1.233875] IOMMU: Setting identity map for device :00:1a.2
[0xcefd7000 - 0xcefd7fff]
[1.233906] IOMMU: Setting identity map for device :00:1a.1
[0xcefd6000 - 0xcefd6fff]
[1.233930] IOMMU: Setting identity map for device :00:1a.0
[0xcefd5000 - 0xcefd5fff]
[1.233955] IOMMU: Setting identity map for device :00:1d.2
[0xcefd4000 - 0xcefd4fff]
[1.233979] IOMMU: Setting identity map for device :00:1d.1
[0xcefd3000 - 0xcefd3fff]
[1.234003] IOMMU: Setting identity map for device :00:1d.0
[0xcefd2000 - 0xcefd2fff]
[1.234027] IOMMU: Setting identity map for device :00:1a.7
[0xcefd1000 - 0xcefd1fff]
[1.234053] IOMMU: Setting identity map for device :00:1d.7
[0xcefd - 0xcefd0fff]
[1.234071] IOMMU: Prepare 0-16MiB unity mapping for LPC
[1.234081] IOMMU: Setting identity map for device :00:1f.0 [0x0
- 0xff]


- 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 !

Any idea ?

Thanks for the troubleshooting, and the response !

Rgds,

Michael Chlon




-- Package-specific info:


/proc/cpuinfo:

processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model   : 26
model name  : Intel(R) Xeon(R) CPU   W3540  @ 2.93GHz
stepping: 5
microcode   : 0x11
cpu MHz : 1596.000
cache size  : 8192 KB
physical id : 0
siblings: 8
core id : 0
cpu cores   : 4
apicid  : 0
initial apicid  : 0
fpu : yes
fpu_exception   : yes
cpuid level : 11
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm 
constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc 
aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca 
sse4_1 sse4_2 popcnt lahf_lm ida dtherm tpr_shadow vnmi flexpriority ept vpid
bogomips: 5866.31
clflush size: 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor   : 1
vendor_id   : GenuineIntel
cpu family  : 6
model   : 26
model name  : Intel(R) Xeon(R) CPU   W3540  @ 2.93GHz
stepping: 5
microcode   : 0x11
cpu MHz : 1596.000
cache size  : 8192 KB
physical id : 0
siblings: 8
core id : 1
cpu cores   : 4
apicid  : 2
initial apicid  : 2
fpu : yes
fpu_exception   : yes
cpuid level : 11
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm 
constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc 
aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca 
sse4_1 sse4_2 popcnt lahf_lm ida dtherm tpr_shadow vnmi flexpriority ept vpid
bogomips: 5866.47
clflush size: 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor   : 2
vendor_id   : GenuineIntel
cpu family  : 6
model   : 26
model name  : Intel(R) Xeon(R) CPU   W3540  @ 2.93GHz
stepping: 5
microcode   : 0x11
cpu MHz : 1596.000
cache 

Bug#687040: qemu-kvm / libvirt* : PCI Passthough for Atheros WiFi card does not work

2012-09-08 Thread Michael Tokarev
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.

Did this wifi card work before, with some previous version of
qemu-kvm?  I mean, is it a regression of an old bug?

Please try running stuff without libvirt.

Thanks,

/mjt


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#687040: qemu-kvm / libvirt* : PCI Passthough for Atheros WiFi card does not work

2012-09-08 Thread Chlon Michaël
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+: 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+: 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+: 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+: 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