I have a Windows7-VM with GPU-passthrough running under qemu(2.7.0)/kvm and it works without problems as long as I do not enable the sound device (hda). As soon as sound is beeing played the system freezes for seconds or even longer than 5 minutes. The sound also is very bad, which might be caused by small freezes. The first time it freezes I get this message in my terminal:
main-loop: WARNING: I/O thread spun for 1000 iterations I have not found any other trace of related problems in any other log-file (maybe I missed an important one?). The command used to start this VM is: qemu-system-x86_64 \ -m 6G \ -machine type=pc,accel=kvm \ -drive file=/vm/win7.qcow2 \ -L /usr/share/qemu/bios.bin \ -net user \ -soundhw hda \ -net nic,model=rtl8139 \ -smp cores=2,threads=2,sockets=1 \ -rtc base=localtime \ -device vfio-pci,host=01:00.0,romfile=/vm/Club3D.HD7850.2048.rom \ -device vfio-pci,host=01:00.1 \ -display gtk QEMU_AUDIO_DRV is set to 'alsa' (without quotes). I do not want to to use any hardware-passthrough, because I intend to run multiple VMs at the same time all with sound capabilities (these VMs will be linux). I am not using ac97, because I have trouble inding a driver for Windows7 ( the one on the realtek-homepage is for Vista only). I also tried to solve this problem compiling qemu from source with the patch in vl.c explained in this github-issue: https://github.com/riscv/riscv-qemu/issues/3. (setting nonblocking to 0;) Any help or pointer in the right direction would be greatly appreciated. Holger Wünsche
