<div dir="ltr">Resending as I forgot to reply-all/include the mailing list. The below suggestions didn't work, unfortunately. Does anyone have any other ideas?<div>---</div><div><br></div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Nov 27, 2016 at 11:02 AM, Muted Bytes <span dir="ltr"><<a href="mailto:mutedbytes@gmail.com" target="_blank">mutedbytes@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail-HOEnZb"><div class="gmail-h5">On Sun, Nov 27, 2016 at 1:38 AM, Brian Chow<br>
<<a href="mailto:brianchow@digitaldescent.net">brianchow@digitaldescent.net</a>> wrote:<br>
> I converted my Win10 VM over to a full libvirt VM, removing qemu command<br>
> line args from the XML, and I no longer have functioning HDMI audio. The<br>
> device shows up in device manager as OK, and it detects my monitor as the<br>
> speakers, which is also correct, but no audio plays, when and when I attempt<br>
> to to configure the speakers/test the audio, I get a message that the test<br>
> tone cannot be played. Does anyone know what I need to tweak to get it<br>
> working again? I moved off the qemu command args style because a<br>
> system/libvirt/qemu update a while ago changed how the permissions were<br>
> working and that broke passthrough for me. I also saw Alex recommend not<br>
> using qemu command args a while back. Video passthrough IS working.<br>
><br>
> Thanks in advance!<br>
><br>
> My XML is as follows:<br>
><br>
> <domain type='kvm' id='3'> <name>starscream</name><br>
> <uuid>d18b5dce-5bdf-4db7-87b6-<wbr>e0c6b2479b0f</uuid> <memory<br>
> unit='KiB'>7813120</memory> <currentMemory<br>
> unit='KiB'>7812500</<wbr>currentMemory> <memoryBacking> <hugepages/><br>
> </memoryBacking> <vcpu placement='static' current='2'>4</vcpu> <cputune><br>
> <vcpupin vcpu='0' cpuset='2'/> <vcpupin vcpu='1' cpuset='3'/> <vcpupin<br>
> vcpu='2' cpuset='6'/> <vcpupin vcpu='3' cpuset='7'/> </cputune><br>
> <resource> <partition>/machine</<wbr>partition> </resource> <os> <type<br>
> arch='x86_64' machine='pc-i440fx-2.4'>hvm</<wbr>type> <loader readonly='yes'<br>
> type='pflash'>/usr/share/OVMF/<wbr>OVMF-pure-efi.fd</loader> <nvram<br>
> template='/kvm/starscream/<wbr>OVMF-starscream.fd'>/var/lib/<wbr>libvirt/qemu/nvram/starscream_<wbr>VARS.fd</nvram><br>
> <bootmenu enable='yes'/> </os> <features> <acpi/> <hyperv><br>
> <relaxed state='on'/> <vapic state='on'/> <spinlocks state='on'<br>
> retries='8191'/> </hyperv> <kvm> <hidden state='on'/> </kvm><br>
> </features> <cpu mode='host-passthrough'> <topology sockets='1'<br>
> cores='2' threads='2'/> </cpu> <clock offset='variable'<br>
> adjustment='-28801' basis='utc'> <timer name='hypervclock'<br>
> present='yes'/> </clock> <on_poweroff>destroy</on_<wbr>poweroff><br>
> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices><br>
> <emulator>/usr/bin/qemu-<wbr>system-x86_64</emulator> <disk type='block'<br>
> device='disk'> <driver name='qemu' type='raw'/> <source<br>
> dev='/dev/zvol/htpc/vm/<wbr>starscream1'/> <backingStore/> <target<br>
> dev='vda' bus='virtio'/> <boot order='1'/> <alias<br>
> name='virtio-disk0'/> <address type='pci' domain='0x0000' bus='0x00'<br>
> slot='0x07' function='0x0'/> </disk> <disk type='block' device='disk'><br>
> <driver name='qemu' type='raw'/> <source<br>
> dev='/dev/zvol/htpc/vm/<wbr>starscream2'/> <backingStore/> <target<br>
> dev='vdb' bus='virtio'/> <alias name='virtio-disk1'/> <address<br>
> type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/><br>
> </disk> <disk type='file' device='cdrom'> <driver name='qemu'<br>
> type='raw'/> <backingStore/> <target dev='hda' bus='ide'/><br>
> <readonly/> <alias name='ide0-0-0'/> <address type='drive'<br>
> controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file'<br>
> device='cdrom'> <driver name='qemu' type='raw'/> <backingStore/><br>
> <target dev='hdb' bus='ide'/> <readonly/> <alias name='ide0-0-1'/><br>
> <address type='drive' controller='0' bus='0' target='0' unit='1'/><br>
> </disk> <controller type='usb' index='0' model='piix3-uhci'> <alias<br>
> name='usb'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01'<br>
> function='0x2'/> </controller> <controller type='pci' index='0'<br>
> model='pci-root'> <alias name='pci.0'/> </controller> <controller<br>
> type='ide' index='0'> <alias name='ide'/> <address type='pci'<br>
> domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller><br>
> <controller type='virtio-serial' index='0'> <alias<br>
> name='virtio-serial0'/> <address type='pci' domain='0x0000' bus='0x00'<br>
> slot='0x02' function='0x0'/> </controller> <controller type='sata'<br>
> index='0'> <alias name='sata0'/> <address type='pci'<br>
> domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </controller><br>
> <interface type='bridge'> <mac address='52:54:00:f7:64:f4'/><br>
> <source bridge='br0'/> <target dev='vnet0'/> <model<br>
> type='virtio'/> <alias name='net0'/> <address type='pci'<br>
> domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </interface><br>
> <console type='pty' tty='/dev/pts/2'> <source path='/dev/pts/2'/><br>
> <target type='virtio' port='0'/> <alias name='console0'/> </console><br>
> <input type='mouse' bus='ps2'> <alias name='input0'/> </input><br>
> <input type='keyboard' bus='ps2'> <alias name='input1'/> </input><br>
> <hostdev mode='subsystem' type='pci' managed='yes'> <driver<br>
> name='vfio'/> <source> <address domain='0x0000' bus='0x01'<br>
> slot='0x00' function='0x0'/> </source> <alias name='hostdev0'/><br>
> <rom bar='on'/> <address type='pci' domain='0x0000' bus='0x00'<br>
> slot='0x08' function='0x0' multifunction='on'/> </hostdev> <hostdev<br>
> mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/><br>
> <source> <address domain='0x0000' bus='0x01' slot='0x00'<br>
> function='0x1'/> </source> <alias name='hostdev1'/> <rom<br>
> bar='on'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x09'<br>
> function='0x0' multifunction='on'/> </hostdev> <hostdev<br>
> mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/><br>
> <source> <address domain='0x0000' bus='0x05' slot='0x00'<br>
> function='0x0'/> </source> <alias name='hostdev2'/> <address<br>
> type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/><br>
> </hostdev> <memballoon model='virtio'> <alias name='balloon0'/><br>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/><br>
> </memballoon> </devices> <seclabel type='none' model='none'/> <seclabel<br>
> type='dynamic' model='dac' relabel='yes'> <label>+1000:+78</label><br>
> <imagelabel>+1000:+78</<wbr>imagelabel> </seclabel></domain><br>
><br>
><br>
</div></div>> ______________________________<wbr>_________________<br>
> vfio-users mailing list<br>
> <a href="mailto:vfio-users@redhat.com">vfio-users@redhat.com</a><br>
> <a href="https://www.redhat.com/mailman/listinfo/vfio-users" rel="noreferrer" target="_blank">https://www.redhat.com/<wbr>mailman/listinfo/vfio-users</a><br>
><br>
<br>>I'm assuming this is the relevant gpu stuff, with gpu at 0000:01:00.0<br>>and hdmi audio at 0000:01:00.1:<br>
<span class="gmail-">><br>><hostdev mode='subsystem' type='pci' managed='yes'><br>> <driver name='vfio'/><br>> <source><br>> <address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/><br>> </source><br>> <alias name='hostdev0'/><br>> <rom bar='on'/><br>> <address type='pci' domain='0x0000' bus='0x00' slot='0x08'<br>>function='0x0' multifunction='on'/><br>></hostdev><br>><hostdev mode='subsystem' type='pci' managed='yes'><br>> <driver name='vfio'/><br>> <source><br>> <address domain='0x0000' bus='0x01' slot='0x00' function='0x1'/><br>> </source><br>> <alias name='hostdev1'/><br>> <rom bar='on'/><br>> <address type='pci' domain='0x0000' bus='0x00' slot='0x09'<br>>function='0x0' multifunction='on'/><br>></hostdev><br>
><br>
</span>>On host, audio is defined as additional function in same slot, so I<br>>usually assign to guest in the same way, so that yours would be at<br>>slot='0x08' function='0x1', but not sure if this really matters or if<br>>this is what your problem is. multifunction='on' would also be removed<br>>for function 1.<br>
<br>>You might also try virsh's domxml-to-native command to see the<br>>generated qemu command + args to see if anything funny is happening in<br>>the actual vm launch (audio related stuff etc).<br></blockquote><div><br></div><div>-----</div><span style="font-size:12.8px">Yes, sorry, that is the relevant GPU part of the XML. I tried removing the multifunction attribute on the secondary function (hdmi audio) and that didn't change anything. I also tried changing the slot/function as you mentioned. The device re-enumerated and appears the same as before inn device manager -- it does show up correctly. Unfortunately, the same end result of no audio, and windows saying it couldn't play the test sound.</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I'm including what was in my old start script for comparison -- the 01:00.[0,1] device is the GPU., 05:00 is a usb controller: </div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><div>qemu-system-x86_64 \</div><div> -name starscream \</div><div> -enable-kvm \</div><div> -m 8192 \</div><div> -cpu host,kvm=off \</div><div> -smp 4,sockets=1,cores=4,threads=1 \</div><div> -drive if=pflash,format=raw,readonly,<wbr>file=/usr/share/OVMF/OVMF-<wbr>pure-efi.fd \</div><div> -drive if=pflash,format=raw,file=/<wbr>kvm/starscream/OVMF-<wbr>starscream.fd \</div><div> -drive file=/kvm/starscream/<wbr>starscream.img,if=virtio,<wbr>format=raw \</div><div> -drive file="",format=raw,id=<wbr>optical1,if=none -device ide-cd,bus=ide.1,drive=<wbr>optical1 \</div><div> -net nic,macaddr=52:54:00:f7:64:f4,<wbr>model=virtio \</div><div> -net bridge,br=br0 \</div><div> -device ioh3420,bus=pci.0,addr=1c.0,<wbr>multifunction=on,port=1,<wbr>chassis=1,id=root.1 \</div><div> -device vfio-pci,host=01:00.0,bus=<wbr>root.1,addr=00.0,<wbr>multifunction=on, \</div><div> -device vfio-pci,host=01:00.1,bus=<wbr>root.1,addr=00.1,<wbr>multifunction=on \</div><div> -device vfio-pci,host=05:00.0 \</div><div> -vga none \</div><div> -boot menu=on \</div></div><div><span style="font-size:12.8px"> -nographic</span> </div></div><br></div></div>