<div dir="ltr"><div dir="ltr"><div dir="ltr">Dear All,<div>These days I'm working on Intel IGD passthrough by qemu+vfio.</div><div>Success on i3-6100, but failed on i3-6100U.<br></div><div><br></div><div><div>The two cpus are both SkyLake arch.</div><div><br></div><div>I have successed to passthrough IGD device to Win7/Win10 on an  i3-6100 machine with Fedora 25. I use legacy mode and set x-igd-gms=1 on qemu command line.</div><div><br></div><div>When I work on another machine of i3-6100U with the same solution.</div><div><br></div><div>CPU:  Intel(R) Core(TM) i3-6100U CPU @ 2.30GHz</div><div>VGA:   00:02.0 VGA compatible controller: Intel Corporation HD Graphics 520 (rev 07)</div><div><br></div><div>[root localhost ~]# dmesg | grep IOMMU</div><div>[    0.000000] DMAR: IOMMU enabled</div><div>[    0.067707] DMAR-IR: IOAPIC id 2 under DRHD base  0xfed91000 IOMMU 1</div><div><br></div><div>[root localhost ~]# cat /proc/cmdline</div><div>BOOT_IMAGE=/vmlinuz-4.8.6-300.fc25.x86_64 root=/dev/mapper/fedora-root ro <a href="http://rd.lvm.lv">rd.lvm.lv</a>=fedora/root <a href="http://rd.lvm.lv">rd.lvm.lv</a>=fedora/swap rhgb quiet intel_iommu=on iommu=pt</div><div><br></div><div>After virsh create command, nothing displays on the screen, there's always no signal.</div><div>No other graphic and video devices, only passthrough hostdev:</div><div><br></div><div>    <hostdev mode='subsystem' type='pci' managed='yes'></div><div>      <driver name='vfio'/></div><div>      <source></div><div>        <address domain='0x0000' bus='0x00' slot='0x02' function='0x0'/></div><div>      </source></div><div>      <alias name='hostdev0'/></div><div>      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/></div><div>    </hostdev></div><div><br></div><div>[root localhost ~]# ps -elf | grep qemu</div><div>6 S qemu      1541     1 99  80   0 - 804613 poll_s 17:34 ?       00:04:22 /usr/bin/qemu-system-x86_64 -machine accel=kvm -name guest=cn_windows_10_enterprise_version_1703_updated_july_2017_x64_dvd_10925390,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-2-cn_windows_10_enterp/master-key.aes -machine pc-i440fx-2.7,accel=kvm,usb=off -cpu Skylake-Client,hv_time,hv_relaxed,hv_vapic,hv_spinlocks=0x1fff -m 2048 -realtime mlock=off -smp 2,sockets=2,cores=1,threads=1 -uuid 128589da-017e-412d-b807-92de81ca7a29 -display none -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-2-cn_windows_10_enterp/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=localtime,driftfix=slew -global kvm-pit.lost_tick_policy=discard -no-hpet -no-shutdown -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 -boot strict=on -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x5.0x7 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x5 -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x5.0x1 -device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x5.0x2 -drive file=/home/zwj/cn_windows_10_enterprise_version_1703_updated_july_2017_x64_dvd_10925390.qcow2,format=qcow2,if=none,id=drive-ide0-0-0 -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -netdev tap,fd=26,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:86:04:cc,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -device usb-tablet,id=input0,bus=usb.0,port=1 -device vfio-pci,host=00:02.0,id=hostdev0,bus=pci.0,addr=0x2 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 -bios /usr/share/seabios/bios.bin -chardev file,id=seabios,path=/tmp/bios.log -device isa-debugcon,iobase=0x402,chardev=seabios -set device.hostdev0.x-igd-opregion=on -set device.hostdev0.x-igd-gms=1 -msg timestamp=on</div><div><br></div><div><br></div><div>dmesg has an error:</div><div>[五 10月 12 17:34:21 2018] Console: switching to colour dummy device 80x25</div><div>[五 10月 12 17:34:21 2018] vgaarb: device changed decodes: PCI:0000:00:02.0,olddecodes=io+mem,decodes=io+mem:owns=io+mem</div><div>[五 10月 12 17:34:21 2018] virbr0: port 2(vnet0) entered blocking state</div><div>[五 10月 12 17:34:21 2018] virbr0: port 2(vnet0) entered disabled state</div><div>[五 10月 12 17:34:21 2018] device vnet0 entered promiscuous mode</div><div>[五 10月 12 17:34:21 2018] virbr0: port 2(vnet0) entered blocking state</div><div>[五 10月 12 17:34:21 2018] virbr0: port 2(vnet0) entered listening state</div><div>[五 10月 12 17:34:22 2018] DMAR: DRHD: handling fault status reg 2</div><div>[五 10月 12 17:34:22 2018] DMAR: [DMA Write] Request device [00:02.0] fault addr 0 [fault reason 02] Present bit in context entry is clear</div><div>[五 10月 12 17:34:22 2018] vfio_ecap_init: 0000:00:02.0 hiding ecap 0x1b 0x100</div><div>[五 10月 12 17:34:23 2018] virbr0: port 2(vnet0) entered learning state</div><div>[五 10月 12 17:34:25 2018] virbr0: port 2(vnet0) entered forwarding state</div><div>[五 10月 12 17:34:25 2018] virbr0: topology change detected, propagating</div><div><br></div><div>Below is log of SeaBIOS, it stops at running rom:</div><div><br></div><div>[root localhost ~]# cat /tmp/bios.log</div><div>SeaBIOS (version 1.9.3-1.fc25)</div><div>BUILD: gcc: (GCC) 6.1.1 20160621 (Red Hat Cross 6.1.1-2) binutils: version 2.26.1-1.fc25</div><div>RamSize: 0x80000000 [cmos]</div><div>Relocating init from 0x000e4080 to 0x7ffb2320 (size 56384)</div><div>Found QEMU fw_cfg</div><div>QEMU fw_cfg DMA interface supported</div><div>RamBlock: addr 0x0000000000000000 len 0x0000000080000000 [e820]</div><div>Moving pm_base to 0x600</div><div>boot order:</div><div>1: /pci i0cf8/ide 1,1/drive 0/disk 0</div><div>2: HALT</div><div>=== PCI bus & bridge init ===</div><div>PCI: pci_bios_init_bus_rec bus = 0x0</div><div>=== PCI device probing ===</div><div>Found 12 PCI devices (max PCI bus is 00)</div><div>=== PCI new allocation pass #1 ===</div><div>PCI: check devices</div><div>=== PCI new allocation pass #2 ===</div><div>PCI: IO: c000 - c1cf</div><div>PCI: 32: 0000000080000000 - 00000000fec00000</div><div>PCI: map device bdf=00:03.0  bar 0, addr 0000c000, size 00000100 [io]</div><div>PCI: map device bdf=00:02.0  bar 4, addr 0000c100, size 00000040 [io]</div><div>PCI: map device bdf=00:04.0  bar 0, addr 0000c140, size 00000020 [io]</div><div>PCI: map device bdf=00:05.0  bar 4, addr 0000c160, size 00000020 [io]</div><div>PCI: map device bdf=00:05.1  bar 4, addr 0000c180, size 00000020 [io]</div><div>PCI: map device bdf=00:05.2  bar 4, addr 0000c1a0, size 00000020 [io]</div><div>PCI: map device bdf=00:01.1  bar 4, addr 0000c1c0, size 00000010 [io]</div><div>PCI: map device bdf=00:02.0  bar 0, addr fd000000, size 01000000 [mem]</div><div>PCI: map device bdf=00:03.0  bar 6, addr fe000000, size 00040000 [mem]</div><div>PCI: map device bdf=00:02.0  bar 6, addr fe040000, size 00020000 [mem]</div><div>PCI: map device bdf=00:03.0  bar 1, addr fe060000, size 00001000 [mem]</div><div>PCI: map device bdf=00:05.7  bar 0, addr fe061000, size 00001000 [mem]</div><div>PCI: map device bdf=00:02.0  bar 2, addr e0000000, size 10000000 [prefmem]</div><div>PCI: map device bdf=00:04.0  bar 4, addr f0000000, size 00800000 [prefmem]</div><div>PCI: init bdf=00:00.0 id=8086:1237</div><div>PCI: init bdf=00:01.0 id=8086:7000</div><div>PIIX3/PIIX4 init: elcr=00 0c</div><div>PCI: init bdf=00:01.1 id=8086:7010</div><div>PCI: init bdf=00:01.3 id=8086:7113</div><div>Using pmtimer, ioport 0x608</div><div>PCI: init bdf=00:02.0 id=8086:1916</div><div>Intel IGD OpRegion enabled at 0x7fffe000, size 8KB, dev 00:02.0</div><div>Intel IGD BDSM enabled at 0x7d700000, size 40MB, dev 00:02.0</div><div>PCI: init bdf=00:03.0 id=10ec:8139</div><div>PCI: init bdf=00:04.0 id=1af4:1002</div><div>PCI: init bdf=00:05.0 id=8086:2934</div><div>PCI: init bdf=00:05.1 id=8086:2935</div><div>PCI: init bdf=00:05.2 id=8086:2936</div><div>PCI: init bdf=00:05.7 id=8086:293a</div><div>PCI: init bdf=00:1f.0 id=8086:9d48</div><div>PCI: Using 00:02.0 for primary VGA</div><div>handle_smp: apic_id=1</div><div>Found 2 cpu(s) max supported 2 cpu(s)</div><div>Copying PIR from 0x7ffbfca0 to 0x000f1c40</div><div>Copying MPTABLE from 0x00006e90/7ffa8e80 to 0x000f1b10</div><div>Copying SMBIOS entry point from 0x00006e90 to 0x000f1930</div><div>Scan for VGA option rom</div><div>Running option rom at c000:0003</div></div><div><br></div><div>Now seabios stops and monitor shows no signal.</div><div>I have install win10 directly on the host and it works well. Does it means the vga rom image is ok? What can I do for further debug? Thanks!</div><div><br></div><div><h1 style="color:rgb(0,0,0);font-family:"Hiragino Sans GB""><br></h1></div><div><br></div></div></div></div>