[vfio-users] Radeon R9 290, stuttering audio over HDMI with MSI enabled

Tmplt tmplt at dragons.rocks
Sat Jan 28 23:38:39 UTC 2017


I forgot to mention: I'm using the linux-vfio kernel, v4.8.13, and my
only kernel options are intel_iommu=on and pcie_acs_override=downstream.

On 01/28/2017 06:13 AM, Tmplt wrote:
> Having spent some hours (unsucessfully) to get stutter-free audio via
> Pulseaudio (and ALSA) have left me with the options of either dual
> booting or letting dedicated hardware handle the audio, which I can then
> mix together into a single output.
> 
> However, passing only the GPU as a soundcard and listening to the audio
> via my monitor's headphone jack, there is some noticable audio
> stuttering. While only noticable when running some more heavier games
> (e.g. Battlefield 1), I'm guessing this shouldn't be the case, and that
> I've configured something incorrectly. Especially since I've enabled
> MSIs for both the GPU and the GPUs audio device.
> 
> Here is what my system is:
> CPU:  i5-6600k @ stock
> MOBO: ASUS Z170-A
> RAM:  16GB DDR4 at 2133Mhz (I think, could be 1600)
> GPU:  ASUS R9 290 (for the VM; reference card)
> 
> HOST OS:  Arch Linux
> GUEST OS: Windows 8.1
> 
> I run my VM via qemu (2.8.0) and libvirt (2.4.0).
> 
> When Windows was installed it automatically enabled MSI for the GPU. I
> manually enabled it for the audio device, rebooted, and confirmed that
> they both appeared below the IRQ drop-down in the device manager.
> 
> It can be worth of note that I flashed my card with a UEFI-bios some
> time ago so that it got passed-through without issue. I can't recall
> whether this was required for my qemu config at the time or if a
> non-UEFI card can't be passed through. I'm also not sure if both BIOSes
> (there is a switch to toggle between the two on my card) are overwritten
> during the flash, or just the current one. Either case, the topical
> issue is present on both settings.
> 
> Here follows my libvirt .xml-config:
> <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
>   <name>windows</name>
>   <uuid>e3ec8ec6-087d-443a-8899-fab99b9251f2</uuid>
>   <memory unit='KiB'>8388608</memory>
>   <currentMemory unit='KiB'>8388608</currentMemory>
>   <vcpu placement='static'>4</vcpu>
>   <iothreads>2</iothreads>
>   <cputune>
>     <vcpupin vcpu='0' cpuset='0'/>
>     <vcpupin vcpu='1' cpuset='1'/>
>     <vcpupin vcpu='2' cpuset='2'/>
>     <vcpupin vcpu='3' cpuset='3'/>
>   </cputune>
>   <os>
>     <type arch='x86_64' machine='pc-i440fx-2.7'>hvm</type>
>     <loader readonly='yes'
> type='pflash'>/usr/share/ovmf/x64/ovmf_x64.bin</loader>
>     <nvram>/var/lib/libvirt/qemu/nvram/windows_VARS.fd</nvram>
>     <bootmenu enable='no'/>
>   </os>
>   <features>
>     <acpi/>
>     <apic/>
>     <hyperv>
>       <relaxed state='on'/>
>       <vapic state='on'/>
>       <spinlocks state='on' retries='8191'/>
>     </hyperv>
>     <vmport state='off'/>
>   </features>
>   <cpu mode='host-passthrough'>
>     <topology sockets='1' cores='4' threads='1'/>
>   </cpu>
>   <clock offset='localtime'>
>     <timer name='rtc' tickpolicy='catchup'/>
>     <timer name='pit' tickpolicy='delay'/>
>     <timer name='hpet' present='no'/>
>     <timer name='hypervclock' present='yes'/>
>   </clock>
>   <on_poweroff>destroy</on_poweroff>
>   <on_reboot>restart</on_reboot>
>   <on_crash>restart</on_crash>
>   <pm>
>     <suspend-to-mem enabled='no'/>
>     <suspend-to-disk enabled='no'/>
>   </pm>
>   <devices>
>     <emulator>/usr/sbin/qemu-system-x86_64</emulator>
>     <disk type='block' device='disk'>
>       <driver name='qemu' type='raw' cache='none' io='threads'
> iothread='1'/>
>       <source dev='/dev/sda'/>
>       <target dev='vdb' bus='virtio'/>
>       <boot order='3'/>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x08'
> function='0x0'/>
>     </disk>
>     <disk type='block' device='disk'>
>       <driver name='qemu' type='raw' cache='none' io='threads'
> iothread='2'/>
>       <source dev='/dev/sde2'/>
>       <target dev='vdc' bus='virtio'/>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x0c'
> function='0x0'/>
>     </disk>
>     <controller type='pci' index='0' model='pci-root'/>
>     <controller type='virtio-serial' index='0'>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x06'
> function='0x0'/>
>     </controller>
>     <controller type='usb' index='0' model='piix3-uhci'>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x01'
> function='0x2'/>
>     </controller>
>     <interface type='network'>
>       <mac address='52:54:00:20:63:3a'/>
>       <source network='default'/>
>       <model type='virtio'/>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x04'
> function='0x0'/>
>     </interface>
>     <input type='mouse' bus='ps2'/>
>     <input type='keyboard' bus='ps2'/>
>     <hostdev mode='subsystem' type='pci' managed='yes'>
>       <source>
>         <address domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
>       </source>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x09'
> function='0x0'/>
>     </hostdev>
>     <hostdev mode='subsystem' type='pci' managed='yes'>
>       <source>
>         <address domain='0x0000' bus='0x02' slot='0x00' function='0x1'/>
>       </source>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x03'
> function='0x0'/>
>     </hostdev>
>     <memballoon model='none'/>
>   </devices>
>   <qemu:commandline>
>     <qemu:arg value='-object'/>
>     <qemu:arg
> value='input-linux,id=kbd,evdev=/dev/input/by-id/usb-04d9_USB_Keyboard-event-kbd,grab_all=yes,repeat=yes'/>
>     <qemu:arg value='-object'/>
>     <qemu:arg
> value='input-linux,id=mouse,evdev=/dev/input/by-id/usb-La-VIEW_CO._QPAD_Gaming_Mouse-event-mouse'/>
>     <qemu:arg value='-object'/>
>     <qemu:arg
> value='input-linux,id=mouse-thumb,evdev=/dev/input/by-id/usb-La-VIEW_CO._QPAD_Gaming_Mouse-if01-event-kbd'/>
>   </qemu:commandline>
> </domain>
> 
> Have I done anything wrong here?
> 
> Cheers,
>   Tmplt.
> 




More information about the vfio-users mailing list