<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>hello,</div><div>    Thanks for your reply and sorry to provide not enough information.</div><div>    The IGD is the <span style="line-height: 23.7999992370605px;">the primary graphics on the host and I am trying to do </span><span style="line-height: 23.7999992370605px;"> </span><span style="line-height: 23.7999992370605px;">legacy mode.</span><span style="line-height: 23.7999992370605px;"> T</span><span style="line-height: 23.7999992370605px;">he VM is SeaBIOS based and the system is a a desktop. </span><span style="line-height: 23.7999992370605px;">My configuration is as follows:</span></div><div><b style="line-height: 23.7999992370605px;"><span lang="EN-US" class="" style="font-size: 14pt;"><br></span></b></div><div><b style="line-height: 23.7999992370605px;"><span lang="EN-US" class="" style="font-size: 14pt;">environment :</span></b></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><span class=""><div style="line-height: 23.7999992370605px;">Intel Core i3-6100U @ 2.30GHz</div></span></div><div><span class=""><div style="line-height: 23.7999992370605px;">Intel Corporation Sky Lake Integrated Graphics </div></span></div><div><span class=""><div style="line-height: 23.7999992370605px;">Ubuntu 16.04 LTS <b>DESKTOP</b></div></span></div><div><span class=""><div style="line-height: 23.7999992370605px;">Host kernel 4.6.6 x86_64 GNU/Linux</div></span></div><div><span class=""><div style="line-height: 23.7999992370605px;">qemu 2.7.0</div></span></div></blockquote><div><span class=""><div style="line-height: 23.7999992370605px;"><br></div><div style="line-height: 23.7999992370605px;"><b style="line-height: 23.7999992370605px;"><span lang="EN-US" class="" style="font-size: 14pt;">configuration:</span></b></div><div style="line-height: 23.7999992370605px;"><ul><li><span style="line-height: 23.7999992370605px;"><b>/boot/config-4.6.6</b></span></li></ul></div></span></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><span class=""><div><span style="line-height: 23.7999992370605px;" class="">    </span>CONFIG_VFIO_IOMMU_TYPE1=m</div></span></div><div><span class=""><div>    CONFIG_VFIO=m</div></span></div><div><span class=""><div>    CONFIG_VFIO_PCI=m</div></span></div><div><span class=""><div>    CONFIG_VFIO_PCI_IGD=y</div></span></div><div><span class=""><div>    CONFIG_VFIO_PCI_VGA=y</div></span></div><div><span class=""><div>    CONFIG_FW_CFG_SYSFS=y </div></span></div><div><span class=""><div>    CONFIG_FW_CFG_SYSFS_COMLINE=y</div></span></div><div><span class=""><div>    CONFIG_INTEL_IOMMU_DEFAULT_ON=y</div></span></div></blockquote><span style="line-height: 23.7999992370605px;"><ul><li><span style="line-height: 23.7999992370605px;"><b>/boot/grub/grub</b></span><span style="line-height: 23.7999992370605px;"></span><span style="line-height: 23.7999992370605px;"><b>.cfg</b></span></li></ul></span>            <span style="line-height: 23.7999992370605px;">/boot/vmlinuz-4.6.6 root=¡­ quiet splash intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 $vt_handoff modprobe.blacklist=i915 video=vesafb:off video=efifb:off </span> <ul><li><b>modprobe vfio-pci vfio vfio_iommu_type1 pci_stub</b></li><li><b>dmesg</b></li></ul><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><span class=""><div>[    0.000000] DMAR: IOMMU enabled</div><div>[    0.079101] DMAR: Host address width 39</div><div>[    0.079103] DMAR: DRHD base: 0x000000fed90000 flags: 0x0</div><div>[    0.079114] DMAR: dmar0: reg_base_addr fed90000 ver 1:0 cap 1c0000c40660462 ecap 7e3ff0505e</div><div>[    0.079116] DMAR: DRHD base: 0x000000fed91000 flags: 0x1</div><div>[    0.079121] DMAR: dmar1: reg_base_addr fed91000 ver 1:0 cap d2008c40660462 ecap f050da</div><div>[    0.079123] DMAR: RMRR base: 0x0000008714a000 end: 0x00000087169fff</div><div>[    0.079125] DMAR: RMRR base: 0x00000088800000 end: 0x0000008cffffff</div><div>[    0.079127] DMAR: ANDD device: 9 name: \_SB.PCI0.UA00</div><div>[    0.079129] DMAR-IR: IOAPIC id 2 under DRHD base  0xfed91000 IOMMU 1</div><div>[    0.079131] DMAR-IR: HPET id 0 under DRHD base 0xfed91000</div><div>[    0.079132] DMAR-IR: x2apic is disabled because BIOS sets x2apic opt out bit.</div><div>[    0.079134] DMAR-IR: Use 'intremap=no_x2apic_optout' to override the BIOS setting.</div><div>[    0.080772] DMAR-IR: Enabled IRQ remapping in xapic mode</div><div>[    7.224820] DMAR: ACPI device "device:56" under DMAR at fed91000 as 00:1e.0</div><div>[    7.224831] DMAR: No ATSR found</div><div>[    7.225085] DMAR: dmar0: Using Queued invalidation</div><div>[    7.225091] DMAR: dmar1: Using Queued invalidation</div><div>[    7.225257] DMAR: Hardware identity mapping for device 0000:00:00.0</div><div>[    7.225264] DMAR: Hardware identity mapping for device 0000:00:02.0</div><div>[    7.225266] DMAR: Hardware identity mapping for device 0000:00:08.0</div><div>[    7.225268] DMAR: Hardware identity mapping for device 0000:00:14.0</div><div>[    7.225270] DMAR: Hardware identity mapping for device 0000:00:16.0</div><div>[    7.225272] DMAR: Hardware identity mapping for device 0000:00:17.0</div><div>[    7.225274] DMAR: Hardware identity mapping for device 0000:00:1d.0</div><div>[    7.225276] DMAR: Hardware identity mapping for device 0000:00:1d.1</div><div>[    7.225278] DMAR: Hardware identity mapping for device 0000:00:1e.0</div><div>[    7.225279] DMAR: Hardware identity mapping for device 0000:00:1f.0</div><div>[    7.225281] DMAR: Hardware identity mapping for device 0000:00:1f.2</div><div>[    7.225283] DMAR: Hardware identity mapping for device 0000:00:1f.3</div><div>[    7.225285] DMAR: Hardware identity mapping for device 0000:00:1f.4</div><div>[    7.225288] DMAR: Hardware identity mapping for device 0000:01:00.0</div><div>[    7.225292] DMAR: Hardware identity mapping for device 0000:02:00.0</div><div>[    7.225294] DMAR: Hardware identity mapping for device 0000:00:1e.0</div><div>[    7.225295] DMAR: Setting RMRR:</div><div>[    7.225297] DMAR: Ignoring identity map for HW passthrough device 0000:00:02.0 [0x88800000 - 0x8cffffff]</div><div>[    7.225299] DMAR: Ignoring identity map for HW passthrough device 0000:00:14.0 [0x8714a000 - 0x87169fff]</div><div>[    7.225300] DMAR: Prepare 0-16MiB unity mapping for LPC</div><div>[    7.225302] DMAR: Ignoring identity map for HW passthrough device 0000:00:1f.0 [0x0 - 0xffffff]</div><div>[    7.225320] DMAR: Intel(R) Virtualization Technology for Directed I/O</div><div>[    7.868474] DMAR: 32bit 0000:02:00.0 uses non-identity mapping</div><div>[   11.026811] DMAR: 32bit 0000:01:00.0 uses non-identity mapping</div><div>[62353.718698] DMAR: DRHD: handling fault status reg 2</div><div>[62353.718705] DMAR: [DMA Write] Request device [00:02.0] fault addr 0 [fault reason 02] Present bit in context entry is clear</div><div>[62365.445003] DMAR: DRHD: handling fault status reg 2</div><div>[62365.445014] DMAR: [DMA Write] Request device [00:02.0] fault addr 0 [fault reason 02] Present bit in context entry is clear</div></span></blockquote><span style="line-height: 1.7;"><ul><li><span style="line-height: 1.7;"><b>lspci -nks 00:02.0</b></span></li></ul></span><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div>00:02.0 0300: 8086:1906 (rev 07)</div><div><span class="Apple-tab-span" style="white-space:pre">      </span>Subsystem: 1b0a:01c6</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>Kernel driver in use: vfio-pci</div><div><span class="Apple-tab-span" style="white-space:pre">       </span>Kernel modules: i915</div></blockquote><ul><li><span style="line-height: 1.7;"><b>qemu cmdline bash</b></span></li></ul><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div>#!/bin/bash</div><div>sudo /home/pengqian/build/x86_64-softmmu/qemu-system-x86_64 \</div><div>-name pq \</div><div>-boot order=dc \</div><div>-cpu host \</div><div>-machine pc,accel=kvm,usb=off \</div><div>-m 4096 \</div><div>-smp 4,sockets=1,cores=4,threads=1 \</div><div>-device vfio-pci,host=00:02.0,id=hostdev0,bus=pci.0,addr=0x2 \</div><div>-nographic \</div><div>-vga none \</div><div>-drive file=/home/pengqian/win7.base,if=none,id=drive-virtio-disk0,format=qcow2,cache=writeback \</div><div>-device virtio-blk-pci,scsi=off,drive=drive-virtio-disk0 \</div><div>-netdev user,id=hostnet0 \</div><div>-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:1a:0d:64 \</div><div>-device usb-ehci,id=ehci0 \</div><div>-device usb-tablet,id=input0 \</div><div>-device intel-hda,id=sound0 \</div><div>-monitor tcp:172.21.136.8:4444,server,nowait \</div><div>-device hda-micro,id=sound0-codec0,bus=sound0.0,cad=0 \</div></div><div><div><span style="line-height: 1.7;"><br></span></div><div><span style="line-height: 1.7;">sorry to my poor English.</span></div><div>                                                                                                                                                                                                                                                                                   yangfulai</div></div></blockquote><div><br></div><br><br><br><div style="position:relative;zoom:1"></div><div id="divNeteaseMailCard"></div><br>ÔÚ 2016-09-14 09:33:08£¬"Alex Williamson" <alex.l.williamson@gmail.com> Ð´µÀ£º<br> <blockquote id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Sep 13, 2016 at 6:59 PM, fulaiyang <span dir="ltr"><<a href="mailto:fulaiyang@163.com" target="_blank">fulaiyang@163.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">thank you£¬I also have tried many ways but it still didn't work. I want to know what kind of gpu vfio support?</blockquote><div><br></div><div>You haven't really provided enough information to begin to help.  Are you trying to do legacy mode or UPT for the GPU?  What's the QEMU command line or XML for the VM?  Is IGD the primary graphics on the host?   What are the CONFIG_VFIO_* options in the host kernel?  Is the VM SeaBIOS based or OVMF?  Is the system a laptop or a desktop?  The less you can make trying to help you a game of 20 question, the more help you're potentially going to get.  Output to a monitor or laptop screen requires opregion support, which generally works, but is not something Intel officially claims support for with UPT mode.  I don't know why an i3-6100U would be unique, but I only have a handful of devices to test and that processor is not among them.  Thanks,</div><div><br></div><div>Alex</div></div></div></div>
</blockquote></div><br><br><span title="neteasefooter"><p> </p></span>