Stalkkaaja Posted November 18, 2017 Share Posted November 18, 2017 (edited) Hey guys, it's been a looong time I've been dabbling with Unraid but just started again. Now that the Unraid (latest beta) should support Intel HD 4600 passthrough out-of-the-box, I think I've missed something. It's been a while so I might have forgotten a trick or two, but do we still need to add ACS override manually or something? This is my XML for this Windows 7 Ultimate, 64-bit VM: <domain type='kvm'> <name>Windows 7</name> <uuid>74be7cd7-cd15-e35d-9691-aad9801609ed</uuid> <description>RaaRaa</description> <metadata> <vmtemplate xmlns="unraid" name="Windows 7" icon="windows7.png" os="windows7"/> </metadata> <memory unit='KiB'>4194304</memory> <currentMemory unit='KiB'>4194304</currentMemory> <memoryBacking> <nosharepages/> </memoryBacking> <vcpu placement='static'>2</vcpu> <cputune> <vcpupin vcpu='0' cpuset='0'/> <vcpupin vcpu='1' cpuset='1'/> </cputune> <os> <type arch='x86_64' machine='pc-i440fx-2.9'>hvm</type> </os> <features> <acpi/> <apic/> </features> <cpu mode='host-passthrough' check='none'> <topology sockets='1' cores='2' threads='1'/> </cpu> <clock offset='localtime'> <timer name='rtc' tickpolicy='catchup'/> <timer name='pit' tickpolicy='delay'/> <timer name='hpet' present='no'/> </clock> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <emulator>/usr/local/sbin/qemu</emulator> <disk type='file' device='disk'> <driver name='qemu' type='raw' cache='writeback'/> <source file='/mnt/user/domains/Windows 7/vdisk1.img'/> <target dev='hdc' bus='virtio'/> <boot order='1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/mnt/user/isos/Windows 7 SP1 Ultimate (64 Bit).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.126-2.iso'/> <target dev='hdb' bus='ide'/> <readonly/> <address type='drive' controller='0' bus='0' target='0' unit='1'/> </disk> <controller type='usb' index='0' model='ich9-ehci1'> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x7'/> </controller> <controller type='usb' index='0' model='ich9-uhci1'> <master startport='0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0' multifunction='on'/> </controller> <controller type='usb' index='0' model='ich9-uhci2'> <master startport='2'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x1'/> </controller> <controller type='usb' index='0' model='ich9-uhci3'> <master startport='4'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' 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='0x04' function='0x0'/> </controller> <interface type='bridge'> <mac address='52:54:00:47:77:a3'/> <source bridge='br0'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> <serial type='pty'> <target port='0'/> </serial> <console type='pty'> <target type='serial' port='0'/> </console> <channel type='unix'> <target type='virtio' name='org.qemu.guest_agent.0'/> <address type='virtio-serial' controller='0' bus='0' port='1'/> </channel> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </source> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </hostdev> <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </source> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </hostdev> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> </memballoon> </devices> </domain> Everything is updated and running well as long as I don't try to passthrough the igpu+intel audio... This is what I get on my log when trying to boot the VM with igpu: 2017-11-18T19:50:13.644507Z qemu-system-x86_64: -device vfio-pci,host=00:02.0,id=hostdev0,bus=pci.0,addr=0x2: Failed to mmap 0000:00:02.0 BAR 2. Performance may be slow 2017-11-18T19:50:22.371630Z qemu-system-x86_64: vfio_region_write(0000:00:02.0:region2+0x0, 0xaa55aa55,4) failed: Device or resource busy 2017-11-18T19:50:22.371658Z qemu-system-x86_64: vfio_region_read(0000:00:02.0:region2+0x0, 4) failed: Device or resource busy 2017-11-18T19:50:23.196350Z qemu-system-x86_64: vfio_region_write(0000:00:02.0:region2+0x0, 0xaa55aa55,4) failed: Device or resource busy 2017-11-18T19:50:23.196380Z qemu-system-x86_64: vfio_region_read(0000:00:02.0:region2+0x0, 4) failed: Device or resource busy I have only used Unraid Web UI to configure everything in hopes that I would not have to manually do anything, but should it be that easy? I did also try to disable Hyper-V and went to settings in VM Manager to activate the ACS override. With the exact same results tho... Any ideas what to do next? Thnx guys. =) Oh and if it matters here are the main specs for my Unraid system: i5-4440 Gigabyte GA-Q87N ITX motherboard 8Gb DDR3 (16Gb soon) HD Plex 160W PSU 3 * 2,5" 7,200rpm HDDs (2,5" 500GB SSD and msata SSD soon as well if I can get VMs working with iGPU as well) Edited November 18, 2017 by Stalkkaaja Quote Link to comment
Stalkkaaja Posted November 20, 2017 Author Share Posted November 20, 2017 Help me out guys, please =) Here is my syslinux: default menu.c32 menu title Lime Technology, Inc. prompt 0 timeout 50 label unRAID OS menu default kernel /bzimage append pcie_acs_override=downstream initrd=/bzroot label unRAID OS GUI Mode kernel /bzimage append pcie_acs_override=downstream initrd=/bzroot,/bzroot-gui label unRAID OS Safe Mode (no plugins, no GUI) kernel /bzimage append pcie_acs_override=downstream initrd=/bzroot unraidsafemode label unRAID OS GUI Safe Mode (no plugins) kernel /bzimage append pcie_acs_override=downstream initrd=/bzroot,/bzroot-gui unraidsafemode label Memtest86+ kernel /memtest And here are my groups after ACS override: IOMMU group 0: [8086:0c00] 00:00.0 Host bridge: Intel Corporation 4th Gen Core Processor DRAM Controller (rev 06) IOMMU group 1: [8086:0412] 00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller (rev 06) IOMMU group 2: [8086:0c0c] 00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06) IOMMU group 3: [8086:8c31] 00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 05) IOMMU group 4: [8086:8c3a] 00:16.0 Communication controller: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 (rev 04) [8086:8c3d] 00:16.3 Serial controller: Intel Corporation 8 Series/C220 Series Chipset Family KT Controller (rev 04) IOMMU group 5: [8086:153a] 00:19.0 Ethernet controller: Intel Corporation Ethernet Connection I217-LM (rev 05) IOMMU group 6: [8086:8c2d] 00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 05) IOMMU group 7: [8086:8c20] 00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 05) IOMMU group 8: [8086:8c26] 00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 (rev 05) IOMMU group 9: [8086:8c4e] 00:1f.0 ISA bridge: Intel Corporation Q87 Express LPC Controller (rev 05) [8086:8c02] 00:1f.2 SATA controller: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] (rev 05) [8086:8c22] 00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 05) I have tried multiple different VM options. Win 7(SeaBios) and Windows 10(SeaBios and OVMF), but none of them work. With OVMF Windows 10 I was actually able to connect to it via RDP with the only problem being that I could not get the Intel HD 4600 to work. Win10 VM with SeaBios is the most crazy one. This is the log after I try to boot it: 2017-11-20 15:12:56.641+0000: Domain id=7 is tainted: high-privileges 2017-11-20 15:12:56.641+0000: Domain id=7 is tainted: host-cpu 2017-11-20T15:12:56.687714Z qemu-system-x86_64: -chardev pty,id=charserial0: char device redirected to /dev/pts/0 (label charserial0) 2017-11-20T15:12:57.151444Z qemu-system-x86_64: -device vfio-pci,host=00:02.0,id=hostdev0,bus=pci.0,addr=0x2: Failed to mmap 0000:00:02.0 BAR 2. Performance may be slow 2017-11-20T15:13:13.478899Z qemu-system-x86_64: vfio_region_write(0000:00:02.0:region2+0xfe5c000, 0x0,1) failed: Device or resource busy 2017-11-20T15:13:13.478926Z qemu-system-x86_64: vfio_region_write(0000:00:02.0:region2+0xfe5c001, 0x0,1) failed: Device or resource busy 2017-11-20T15:13:13.478934Z qemu-system-x86_64: vfio_region_write(0000:00:02.0:region2+0xfe5c002, 0x0,1) failed: Device or resource busy 2017-11-20T15:13:13.478948Z qemu-system-x86_64: vfio_region_write(0000:00:02.0:region2+0xfe5c003, 0x4,1) failed: Device or resource busy 2017-11-20T15:13:13.478955Z qemu-system-x86_64: vfio_region_write(0000:00:02.0:region2+0xfe5c004, 0xc000000,4) failed: Device or resource busy 2017-11-20T15:13:13.478959Z qemu-system-x86_64: vfio_region_write(0000:00:02.0:region2+0xfe5c008, 0x30413109,4) failed: Device or resource busy 2017-11-20T15:13:13.478967Z qemu-system-x86_64: vfio_region_write(0000:00:02.0:region2+0xfe5c00c, 0x0,1) failed: Device or resource busy 2017-11-20T15:13:13.478975Z qemu-system-x86_64: vfio_region_write(0000:00:02.0:region2+0xfe5c00d, 0x0,1) failed: Device or resource busy 2017-11-20T15:13:13.478984Z qemu-system-x86_64: vfio_region_write(0000:00:02.0:region2+0xfe5c00e, 0x0,1) failed: Device or resource busy 2017-11-20T15:13:13.478990Z qemu-system-x86_64: vfio_region_write(0000:00:02.0:region2+0xfe5c00f, 0x0,1) failed: Device or resource busy 2017-11-20T15:13:13.478996Z qemu-system-x86_64: vfio_region_write(0000:00:02.0:region2+0xfe5c010, 0x1,1) failed: Device or resource busy 2017-11-20T15:13:13.479002Z qemu-system-x86_64: vfio_region_write(0000:00:02.0:region2+0xfe5c011, 0x0,1) failed: Device or resource busy 2017-11-20T15:13:13.479011Z qemu-system-x86_64: vfio_region_write(0000:00:02.0:region2+0xfe5c012, 0x0,1) failed: Device or resource busy 2017-11-20T15:13:13.479019Z qemu-system-x86_64: vfio_region_write(0000:00:02.0:region2+0xfe5c013, 0x4,1) failed: Device or resource busy 2017-11-20T15:13:13.479038Z qemu-system-x86_64: vfio_region_write(0000:00:02.0:region2+0xfe5c014, 0x0,1) failed: Device or resource busy 2017-11-20T15:13:13.479048Z qemu-system-x86_64: vfio_region_write(0000:00:02.0:region2+0xfe5c015, 0x0,1) failed: Device or resource busy 2017-11-20T15:13:13.479054Z qemu-system-x86_64: vfio_region_write(0000:00:02.0:region2+0xfe5c016, 0x0,1) failed: Device or resource busy . . . etc... Sooo... Should I modify my syslinux somehow or something? Quote Link to comment
Stalkkaaja Posted November 22, 2017 Author Share Posted November 22, 2017 (edited) Any idea, guys? Shouldn't my motherboard be compatible with passthrough? At least HVM and IOMMU are Enabled or so says Unraid. Also Q87 should not be a problem. Where should I start to troubleshoot? =/ This is my log when trying to boot the Windows 7 VM with iGPU and HD Audio: 2017-11-22 10:39:21.141+0000: starting up libvirt version: 3.8.0, qemu version: 2.10.1, hostname: unraid LC_ALL=C PATH=/bin:/sbin:/usr/bin:/usr/sbin HOME=/ QEMU_AUDIO_DRV=none /usr/local/sbin/qemu -name 'guest=Windows 7,debug-threads=on' -S -object 'secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-1-Windows 7/master-key.aes' -machine pc-i440fx-2.9,accel=kvm,usb=off,dump-guest-core=off,mem-merge=off -cpu host,hv_time,hv_relaxed,hv_vapic,hv_spinlocks=0x1fff,hv_vendor_id=none -m 4096 -realtime mlock=off -smp 2,sockets=1,cores=2,threads=1 -uuid 74be7cd7-cd15-e35d-9691-aad9801609ed -display none -no-user-config -nodefaults -chardev 'socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-1-Windows 7/monitor.sock,server,nowait' -mon chardev=charmonitor,id=monitor,mode=control -rtc base=localtime -no-hpet -no-shutdown -boot strict=on -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x7.0x7 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x7 -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x7.0x1 -device ich9-usb-userialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 -device vfio-pci,host=00:02.0,id=hostdev0,bus=pci.0,addr=0x2 -device vfio-pci,host=00:03.0,id=hostdev1,bus=pci.0,addr=0x6 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x8 -msg timestamp=on 2017-11-22 10:39:21.141+0000: Domain id=1 is tainted: high-privileges 2017-11-22 10:39:21.141+0000: Domain id=1 is tainted: host-cpu 2017-11-22T10:39:21.189552Z qemu-system-x86_64: -chardev pty,id=charserial0: char device redirected to /dev/pts/0 (label charserial0) 2017-11-22T10:39:21.653874Z qemu-system-x86_64: -device vfio-pci,host=00:02.0,id=hostdev0,bus=pci.0,addr=0x2: Failed to mmap 0000:00:02.0 BAR 2. Performance may be slow 2017-11-22T10:39:39.407473Z qemu-system-x86_64: vfio_region_write(0000:00:02.0:region2+0x0, 0xaa55aa55,4) failed: Device or resource busy 2017-11-22T10:39:39.407496Z qemu-system-x86_64: vfio_region_read(0000:00:02.0:region2+0x0, 4) failed: Device or resource busy 2017-11-22T10:39:40.188394Z qemu-system-x86_64: vfio_region_write(0000:00:02.0:region2+0x0, 0xaa55aa55,4) failed: Device or resource busy 2017-11-22T10:39:40.188468Z qemu-system-x86_64: vfio_region_read(0000:00:02.0:region2+0x0, 4) failed: Device or resource busy PS. I was actually able to login to this VM using DVI-out and usb keyboard+mouse but the iGPU was not there and the resolution was 800x600 with 8bit color or something disgusting. After RDP'ing to it, I still could not even see the Intel HD 4600 in device manager and for HD Audio device there was "This device cannot start (Code 10)". Anyways... The ultimate goal would be to be able to run this VM headless and always RDP into it. Edited November 22, 2017 by Stalkkaaja Quote Link to comment
Stalkkaaja Posted November 24, 2017 Author Share Posted November 24, 2017 So... No one has any idea what's wrong? Is my motherboard (Gigabyte GA-Q87N) not compatible? I have enabled VT-d and virtualization in BIOS and the chipset should be compatible as well. =/ Quote Link to comment
Bubba Wong Posted December 20, 2017 Share Posted December 20, 2017 The audio controller on 0:3 wont work. You can use ALSA for audio. But... Can you pass through and option of x-igd-opregion=on into the command that runs qemu? If so then see if you can change the device to -device vfio-pci,host=00:00:02.0,addr=0x2,x-igd-opregion=on in the command that runs qemu? You should be able to boot Ubuntu Linux 17.10 with the IGD pass through if you do that. Because the HD4600 uses chip on CPU + components on mother board you will need for windows to hack Opregion (this is the only way I got HD4600 to work). if you do lspci -xxx -s 0:2 you find something l like 00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller (rev 06) 00: 86 80 12 04 00 04 90 00 06 00 00 03 00 00 00 00 10: 04 00 80 f7 00 00 00 00 0c 00 00 d0 00 00 00 00 20: 01 f0 00 00 00 00 00 00 00 00 00 00 43 10 34 85 30: 00 00 00 00 90 00 00 00 00 00 00 00 ff 01 00 00 40: 09 00 0c 01 6d a0 00 62 d0 00 44 36 00 00 00 00 50: 11 02 00 00 19 00 00 00 00 00 00 00 01 00 20 cb 60: 00 00 02 01 00 00 00 00 00 00 00 00 00 00 00 00 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 90: 05 d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 a0: 00 00 00 00 13 00 06 03 00 00 00 00 00 00 00 00 b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 d0: 01 a4 22 00 03 00 00 00 00 00 00 00 00 00 00 00 e0: 00 00 00 00 00 00 00 00 00 80 00 00 00 00 00 00 f0: 00 00 00 00 00 00 00 00 00 00 06 00 18 c0 d5 c8 See the last 4 bytes - they make up a 32bit offset - eg c8d5c018 - this is different for each bios - for windows to work (not Linux) you need to patch qemu and kernel thus: Kernel : https://pastebin.com/z8Ai79J7 Qemu: (patch hardcodes address with offset 0x18) :https://pastebin.com/BhV1wegR Quote Link to comment
s1l3nce Posted 10 hours ago Share Posted 10 hours ago On 11/18/2017 at 9:27 PM, Stalkkaaja said: Hey guys, it's been a looong time I've been dabbling with Unraid but just started again. Now that the Unraid (latest beta) should support Intel HD 4600 passthrough out-of-the-box, I think I've missed something. It's been a while so I might have forgotten a trick or two, but do we still need to add ACS override manually or something? I know this is an old post but I'm on the same boat, as you can see in my post: Did you ever solve this issue? Quote Link to comment
s1l3nce Posted 10 hours ago Share Posted 10 hours ago I just found the culprit! I had to enable VT-d. Intel Virtualization Technology wasn't enough apparently. Quote Link to comment
Recommended Posts
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.