Skylake: Issue with my latest configuration


arkan

Recommended Posts

Hey,

 

I built an unRaid computer based on:

- Intel Skylake Core i7-6700K

- Asus Z170-DELUXE

- AMD Radeon 6950 (old card which is gonna be replaced with a 1070+)

 

It worked and booted. I've been able to create a windows VM with GPU Pathtrough.

 

However I'm unable to pass the intel soundcard to the VM.

 

It fails with the following error:

 

internal error: early end of file from monitor: possible problem:
2016-08-26T17:33:45.726577Z qemu-system-x86_64: -device vfio-pci,host=00:1f.3,bus=root.1,addr=01.0: vfio: error, group 9 is not viable, please ensure all devices within the iommu_group are bound to their vfio bus driver.
2016-08-26T17:33:45.726614Z qemu-system-x86_64: -device vfio-pci,host=00:1f.3,bus=root.1,addr=01.0: vfio: failed to get group 9
2016-08-26T17:33:45.726631Z qemu-system-x86_64: -device vfio-pci,host=00:1f.3,bus=root.1,addr=01.0: Device initialization failed
2016-08-26T17:33:45.726646Z qemu-system-x86_64: -device vfio-pci,host=00:1f.3,bus=root.1,addr=01.0: Device 'vfio-pci' could not be initialized

 

In the logs I can see:

Domain id=18 is tainted: host-cpu
char device redirected to /dev/pts/1 (label charserial0)
2016-08-26T17:33:45.726577Z qemu-system-x86_64: -device vfio-pci,host=00:1f.3,bus=root.1,addr=01.0: vfio: error, group 9 is not viable, please ensure all devices within the iommu_group are bound to their vfio bus driver.
2016-08-26T17:33:45.726614Z qemu-system-x86_64: -device vfio-pci,host=00:1f.3,bus=root.1,addr=01.0: vfio: failed to get group 9
2016-08-26T17:33:45.726631Z qemu-system-x86_64: -device vfio-pci,host=00:1f.3,bus=root.1,addr=01.0: Device initialization failed
2016-08-26T17:33:45.726646Z qemu-system-x86_64: -device vfio-pci,host=00:1f.3,bus=root.1,addr=01.0: Device 'vfio-pci' could not be initialized
2016-08-26 17:33:46.435+0000: shutting down

 

Here is the XML of my VM:

<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>Gaming RIG</name>
  <uuid>d0d8519c-b8ba-d924-2f78-f27f72e6881e</uuid>
  <metadata>
    <vmtemplate name="Custom" icon="openelec.png" os="windows"/>
  </metadata>
  <memory unit='KiB'>16777216</memory>
  <currentMemory unit='KiB'>16777216</currentMemory>
  <memoryBacking>
    <nosharepages/>
    <locked/>
  </memoryBacking>
  <vcpu placement='static'>6</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='0'/>
    <vcpupin vcpu='1' cpuset='1'/>
    <vcpupin vcpu='2' cpuset='2'/>
    <vcpupin vcpu='3' cpuset='4'/>
    <vcpupin vcpu='4' cpuset='5'/>
    <vcpupin vcpu='5' cpuset='6'/>
  </cputune>
  <os>
    <type arch='x86_64' machine='pc-i440fx-2.3'>hvm</type>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
    </hyperv>
  </features>
  <cpu mode='host-passthrough'>
    <topology sockets='1' cores='6' threads='1'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='hypervclock' present='yes'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/user/Vdisks/Gaming RIG/vdisk1.img'/>
      <target dev='hdc' bus='virtio'/>
      <boot order='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/ISOS/Microsoft Windows 10 Pro x64.iso'/>
      <target dev='hda' bus='ide'/>
      <readonly/>
      <boot order='2'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/ISOS/virtio-win-0.1.102.iso'/>
      <target dev='hdb' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <controller type='usb' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'/>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:25:ef:6b'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/Gaming RIG.org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <hostdev mode='subsystem' type='usb' managed='yes'>
      <source>
        <vendor id='0x0b05'/>
        <product id='0x180a'/>
      </source>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='yes'>
      <source>
        <vendor id='0x0951'/>
        <product id='0x16a4'/>
      </source>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='yes'>
      <source>
        <vendor id='0x046d'/>
        <product id='0xc521'/>
      </source>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='yes'>
      <source>
        <vendor id='0x1b1c'/>
        <product id='0x1c06'/>
      </source>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='yes'>
      <source>
        <vendor id='0x046a'/>
        <product id='0x0011'/>
      </source>
    </hostdev>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </memballoon>
  </devices>
  <qemu:commandline>
    <qemu:arg value='-device'/>
    <qemu:arg value='ioh3420,bus=pci.0,addr=1c.0,multifunction=on,port=2,chassis=1,id=root.1'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=00:1f.3,bus=root.1,addr=01.0'/>
  </qemu:commandline>
</domain>

 

Do you have any idea how this could be solved?

 

Thanks for your help!

 

Link to comment

You can't pass the integrated video/audio to a VM.

 

Right for iGPU, wrong for audio...

due to a bug in older kernels, it worked although it should not have due to the iommu grps.

 

Go HERE for Details...

 

Its just RC4 that does this, due to its newer kernel. Go with RC3 until they fix it... There are several ways to fix this, I think they are looking for the best way.

Link to comment

Well, as it was said, it worked due to a bug.

I actually have not tried any other version than RC3, but that one worked.

Maybe that bug was only present in the kernel used in 6.2 RC3... or maybe not even every Skylake board is affected.

 

There is a workaround which more or less reproduce the effects of the bug. (not beeing able to load a module)

 

If you blacklist the driver, that prevents any device in the iommu grp to be passed through, it seems to be working.

I have not yet seen any side effects, but since I do not 100% know what that device does, its on your own risk :)

 

Go to "Main" -> "Boot Device" -> "Flash" -> "Syslinux configuration"

Add "modprobe.blacklist=i2c_i801,i2c_smbus" somewhere between "append" and "initrd=/bzroot".

It should look like this:

label unRAID OS
  menu default
  kernel /bzimage
  append modprobe.blacklist=i2c_i801,i2c_smbus initrd=/bzroot

 

Then save and reboot and see if you can start the VM with the onboard sound attached.

If not, you should post a diagnostics (tools -> diagnostics) or at least tell us what the iommu grps look like. (tools -> sytem devices)

 

Even if it works, keep in mind its a workaround, not a solution. A solution would probably to buy an additional pci-soundcard and pass that through.

There is a chance, that Intel just broke the passthrough of the onboard sound by grouping it up with another device. Maybe intentional, to push virtualisation to their workstation/Server hardware... or its an ASUS thing, because we both have ASUS.

Link to comment

Hi dAigio,

 

I added the line  append modprobe.blacklist=i2c_i801,i2c_smbus initrd=/bzroot to Syslinux configuration, but i still dont have IOMMU Groups.

Means that my cpu & mainboard is not compatible Intel Skylake Core i3 6100 , MSI B150M Bazooka

 

00:00.0 Host bridge [0600]: Intel Corporation Skylake Host Bridge/DRAM Registers [8086:190f] (rev 07)
00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 530 [8086:1912] (rev 06)
00:08.0 System peripheral [0880]: Intel Corporation Skylake Gaussian Mixture Model [8086:1911]
00:14.0 USB controller [0c03]: Intel Corporation Sunrise Point-H USB 3.0 xHCI Controller [8086:a12f] (rev 31)
00:14.2 Signal processing controller [1180]: Intel Corporation Sunrise Point-H Thermal subsystem [8086:a131] (rev 31)
00:15.0 Signal processing controller [1180]: Intel Corporation Sunrise Point-H Serial IO I2C Controller #0 [8086:a160] (rev 31)
00:15.1 Signal processing controller [1180]: Intel Corporation Sunrise Point-H Serial IO I2C Controller #1 [8086:a161] (rev 31)
00:16.0 Communication controller [0780]: Intel Corporation Sunrise Point-H CSME HECI #1 [8086:a13a] (rev 31)
00:17.0 SATA controller [0106]: Intel Corporation Sunrise Point-H SATA controller [AHCI mode] [8086:a102] (rev 31)
00:1c.0 PCI bridge [0604]: Intel Corporation Sunrise Point-H PCI Express Root Port #5 [8086:a114] (rev f1)
00:1c.5 PCI bridge [0604]: Intel Corporation Sunrise Point-H PCI Express Root Port #6 [8086:a115] (rev f1)
00:1e.0 Signal processing controller [1180]: Intel Corporation Sunrise Point-H Serial IO UART #0 [8086:a127] (rev 31)
00:1f.0 ISA bridge [0601]: Intel Corporation Sunrise Point-H LPC Controller [8086:a148] (rev 31)
00:1f.2 Memory controller [0580]: Intel Corporation Sunrise Point-H PMC [8086:a121] (rev 31)
00:1f.3 Audio device [0403]: Intel Corporation Sunrise Point-H HD Audio [8086:a170] (rev 31)
00:1f.4 SMBus [0c05]: Intel Corporation Sunrise Point-H SMBus [8086:a123] (rev 31)
01:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15)
02:00.0 Multimedia controller [0480]: TBS Technologies DVB-S2 4 Tuner PCIe Card [544d:6178]

Link to comment
  • 1 month later...

 

Hi!

 

 

Well, as it was said, it worked due to a bug.

I actually have not tried any other version than RC3, but that one worked.

Maybe that bug was only present in the kernel used in 6.2 RC3... or maybe not even every Skylake board is affected.

 

There is a workaround which more or less reproduce the effects of the bug. (not beeing able to load a module)

 

If you blacklist the driver, that prevents any device in the iommu grp to be passed through, it seems to be working.

I have not yet seen any side effects, but since I do not 100% know what that device does, its on your own risk :)

 

Go to "Main" -> "Boot Device" -> "Flash" -> "Syslinux configuration"

Add "modprobe.blacklist=i2c_i801,i2c_smbus" somewhere between "append" and "initrd=/bzroot".

It should look like this:

label unRAID OS
  menu default
  kernel /bzimage
  append modprobe.blacklist=i2c_i801,i2c_smbus initrd=/bzroot

 

Then save and reboot and see if you can start the VM with the onboard sound attached.

If not, you should post a diagnostics (tools -> diagnostics) or at least tell us what the iommu grps look like. (tools -> sytem devices)

 

Even if it works, keep in mind its a workaround, not a solution. A solution would probably to buy an additional pci-soundcard and pass that through.

There is a chance, that Intel just broke the passthrough of the onboard sound by grouping it up with another device. Maybe intentional, to push virtualisation to their workstation/Server hardware... or its an ASUS thing, because we both have ASUS.

 

 

As dAigo stated, this workaround works on my setup. I'm using 6.2.1 and can passthrough the onboard sound.

 

See my thread:

 

http://lime-technology.com/forum/index.php?topic=50193.0

 

Bye!

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.