1

I am trying to set up a PCI Passthrough of my Audio device in QEMU/KVM. The audio device is in the group 9, together with other three devices:

IOMMU Group 9 00:1f.0 ISA bridge [0601]: Intel Corporation Device [8086:9d4e] (rev 21)
IOMMU Group 9 00:1f.2 Memory controller [0580]: Intel Corporation Sunrise Point-LP PMC [8086:9d21] (rev 21)
IOMMU Group 9 00:1f.3 Audio device [0403]: Intel Corporation Device [8086:9d71] (rev 21)
IOMMU Group 9 00:1f.4 SMBus [0c05]: Intel Corporation Sunrise Point-LP SMBus [8086:9d23] (rev 21)

So, I modified my /etc/modprobe.d/vfio with the devices I want to attach:

00:1f.0 0601: 8086:9d4e (rev 21)
00:1f.2 0580: 8086:9d21 (rev 21)
00:1f.3 0403: 8086:9d71 (rev 21)
00:1f.4 0c05: 8086:9d23 (rev 21)

So the file reads

options vfio-pci ids=8086:9d4e,8086:9d21,8086:9d71,8086:9d23

Also, in order to charge them at boot time, I modified the mkinitcpio so it loads vfio vfio_iommu_type1 vfio_pci vfio_virqfd

And it worked:

$ dmesg | grep vfio
[    0.746712] vfio_pci: add [8086:9d4e[ffff:ffff]] class 0x000000/00000000
[    0.746715] vfio_pci: add [8086:9d21[ffff:ffff]] class 0x000000/00000000
[    0.762942] vfio_pci: add [8086:9d71[ffff:ffff]] class 0x000000/00000000
[    0.762968] vfio_pci: add [8086:9d23[ffff:ffff]] class 0x000000/00000000

However, for some reason, the Memory controller continues using the intel_pmc_core kernel driver instead of vfio-pci, as all the others

$ lspci -k -s 00:1f
00:1f.0 ISA bridge: Intel Corporation Device 9d4e (rev 21)
    Subsystem: Hewlett-Packard Company Device 827e
    Kernel driver in use: vfio-pci
00:1f.2 Memory controller: Intel Corporation Sunrise Point-LP PMC (rev 21)
    Subsystem: Hewlett-Packard Company Device 827e
    Kernel driver in use: intel_pmc_core
00:1f.3 Audio device: Intel Corporation Device 9d71 (rev 21)
    Subsystem: Hewlett-Packard Company Device 827e
    Kernel driver in use: vfio-pci
    Kernel modules: snd_hda_intel, snd_soc_skl
00:1f.4 SMBus: Intel Corporation Sunrise Point-LP SMBus (rev 21)
    Subsystem: Hewlett-Packard Company Device 827e
    Kernel driver in use: vfio-pci
    Kernel modules: i2c_i801

And so, qemu complains that not all the IOMMU group is passed by:

$ qemu-system-x86_64 -hda /home/janus/qemu/win10qemu.img -enable-kvm -device vfio-pci,host=0000:00:1f.0 -device vfio-pci,host=0000:00:1f.2 -device vfio-pci,host=0000:00:1f.3 -device vfio-pci,host=0000:00:1f.4
qemu-system-x86_64: -device vfio-pci,host=0000:00:1f.0: vfio error: 0000:00:1f.0: group 9 is not viable
Please ensure all devices within the iommu_group are bound to their vfio bus driver.

What I am doing wrong?

1 Answer 1

1

The answer seems to be: of course I cannot pass the Memory Controller to the VM. And since the Audio Card is in the same IOMMU group as the Memory Controller, I will not be able to pass it to the VM.

1
  • Time to buy an external audio card! Mar 30, 2018 at 21:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.