[vfio-users] Attempting IGD Passthrough on Kaby Lake

Kyle Manna 2bluesc at gmail.com
Thu Apr 6 19:07:05 UTC 2017


Works for me on a ASRock Z270 + i7-7700k.

Configuration: https://gist.github.com/f91530f56a1d1c98f48482456197f4ee

Also, make sure your UEFI BIOS selects the Intel GPU as the primary
graphics adapter.  You should see the system boot up on the IGD
display until your external GPU drivers are loaded.

- Kyle

On Thu, Apr 6, 2017 at 2:47 AM, simon <simon at unterwurzacher.at> wrote:
> Hello everyone,
>
> I have been trying to pass through the IGD of an i7-7700k. I managed to
> passthrough the device (it shows up in the Windows Device Manager), but I
> can't get a output signal.
> I am on Arch-Linux, Kernel 4.10, I use a GTX 1080 as primary graphics for
> the Host. Guest System is Windows 10.
>
>
> lspci -vvs 00:02 Output:
> 00:02.0 Display controller: Intel Corporation Device 5912 (rev 04)
>     Subsystem: Micro-Star International Co., Ltd. [MSI] Device 7a66
>     Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr-
> Stepping- SERR- FastB2B- DisINTx+
>     Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort-
> <MAbort- >SERR- <PERR- INTx-
>     Interrupt: pin A routed to IRQ 16
>     Region 0: Memory at dd000000 (64-bit, non-prefetchable) [disabled]
> [size=16M]
>     Region 2: Memory at b0000000 (64-bit, prefetchable) [disabled]
> [size=256M]
>     Region 4: I/O ports at f000 [disabled] [size=64]
>     Capabilities: [40] Vendor Specific Information: Len=0c <?>
>     Capabilities: [70] Express (v2) Root Complex Integrated Endpoint, MSI 00
>         DevCap:    MaxPayload 128 bytes, PhantFunc 0
>             ExtTag- RBE+
>         DevCtl:    Report errors: Correctable- Non-Fatal- Fatal-
> Unsupported-
>             RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
>             MaxPayload 128 bytes, MaxReadReq 128 bytes
>         DevSta:    CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr-
> TransPend-
>         DevCap2: Completion Timeout: Not Supported, TimeoutDis-, LTR-, OBFF
> Not Supported
>         AtomicOpsCap: 32bit- 64bit- 128bitCAS-
>         DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF
> Disabled
>         AtomicOpsCtl: ReqEn-
>     Capabilities: [ac] MSI: Enable- Count=1/1 Maskable- 64bit-
>         Address: 00000000  Data: 0000
>     Capabilities: [d0] Power Management version 2
>         Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA
> PME(D0-,D1-,D2-,D3hot-,D3cold-)
>         Status: D3 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
>     Capabilities: [100 v1] Process Address Space ID (PASID)
>         PASIDCap: Exec- Priv-, Max PASID Width: 14
>         PASIDCtl: Enable- Exec- Priv-
>     Capabilities: [200 v1] Address Translation Service (ATS)
>         ATSCap:    Invalidate Queue Depth: 00
>         ATSCtl:    Enable-, Smallest Translation Unit: 00
>     Capabilities: [300 v1] Page Request Interface (PRI)
>         PRICtl: Enable- Reset-
>         PRISta: RF- UPRGI- Stopped+
>         Page Request Capacity: 00008000, Page Request Allocation: 00000020
>     Kernel driver in use: vfio-pci
>     Kernel modules: i915
>
> lspci -vvs 01:00.0 Output:
> 01:00.0 VGA compatible controller: NVIDIA Corporation GP104 [GeForce GTX
> 1080] (rev a1) (prog-if 00 [VGA controller])
>     Subsystem: ASUSTeK Computer Inc. Device 859b
>     Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
> Stepping- SERR- FastB2B- DisINTx-
>     Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort-
> <MAbort- >SERR- <PERR- INTx-
>     Latency: 0
>     Interrupt: pin A routed to IRQ 144
>     Region 0: Memory at de000000 (32-bit, non-prefetchable) [size=16M]
>     Region 1: Memory at c0000000 (64-bit, prefetchable) [size=256M]
>     Region 3: Memory at d0000000 (64-bit, prefetchable) [size=32M]
>     Region 5: I/O ports at e000 [size=128]
>     [virtual] Expansion ROM at 000c0000 [disabled] [size=128K]
>     Capabilities: [60] Power Management version 3
>         Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
> PME(D0-,D1-,D2-,D3hot-,D3cold-)
>         Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
>     Capabilities: [68] MSI: Enable+ Count=1/1 Maskable- 64bit+
>         Address: 00000000fee004f8  Data: 0000
>     Capabilities: [78] Express (v2) Legacy Endpoint, MSI 00
>         DevCap:    MaxPayload 256 bytes, PhantFunc 0, Latency L0s unlimited,
> L1 <64us
>             ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
>         DevCtl:    Report errors: Correctable- Non-Fatal- Fatal-
> Unsupported-
>             RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+
>             MaxPayload 256 bytes, MaxReadReq 512 bytes
>         DevSta:    CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr-
> TransPend-
>         LnkCap:    Port #0, Speed 8GT/s, Width x16, ASPM L0s L1, Exit
> Latency L0s <512ns, L1 <16us
>             ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp+
>         LnkCtl:    ASPM Disabled; RCB 64 bytes Disabled- CommClk+
>             ExtSynch- ClockPM+ AutWidDis- BWInt- AutBWInt-
>         LnkSta:    Speed 2.5GT/s, Width x16, TrErr- Train- SlotClk+
> DLActive- BWMgmt- ABWMgmt-
>         DevCap2: Completion Timeout: Range AB, TimeoutDis+, LTR+, OBFF Via
> message
>         AtomicOpsCap: 32bit- 64bit- 128bitCAS-
>         DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR+, OBFF
> Disabled
>         AtomicOpsCtl: ReqEn-
>         LnkCtl2: Target Link Speed: 8GT/s, EnterCompliance- SpeedDis-
>              Transmit Margin: Normal Operating Range,
> EnterModifiedCompliance- ComplianceSOS-
>              Compliance De-emphasis: -6dB
>         LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete+,
> EqualizationPhase1+
>              EqualizationPhase2-, EqualizationPhase3-,
> LinkEqualizationRequest-
>     Capabilities: [100 v1] Virtual Channel
>         Caps:    LPEVC=0 RefClk=100ns PATEntryBits=1
>         Arb:    Fixed- WRR32- WRR64- WRR128-
>         Ctrl:    ArbSelect=Fixed
>         Status:    InProgress-
>         VC0:    Caps:    PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
>             Arb:    Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
>             Ctrl:    Enable+ ID=0 ArbSelect=Fixed TC/VC=ff
>             Status:    NegoPending- InProgress-
>     Capabilities: [250 v1] Latency Tolerance Reporting
>         Max snoop latency: 34326183936ns
>         Max no snoop latency: 34326183936ns
>     Capabilities: [128 v1] Power Budgeting <?>
>     Capabilities: [420 v2] Advanced Error Reporting
>         UESta:    DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF-
> MalfTLP- ECRC- UnsupReq- ACSViol-
>         UEMsk:    DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF-
> MalfTLP- ECRC- UnsupReq- ACSViol-
>         UESvrt:    DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+
> MalfTLP+ ECRC- UnsupReq- ACSViol-
>         CESta:    RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
>         CEMsk:    RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
>         AERCap:    First Error Pointer: 00, GenCap- CGenEn- ChkCap- ChkEn-
>     Capabilities: [600 v1] Vendor Specific Information: ID=0001 Rev=1
> Len=024 <?>
>     Capabilities: [900 v1] #19
>     Kernel driver in use: nvidia
>     Kernel modules: nouveau, nvidia_drm, nvidia
>
>
>
> The thing i find Interesting here is that the IGD shows up as "Display
> controller" and the other GPU as "VGA compatible controller".
> I also have another pc with an i7-2600 running Arch-Linux, when i issue
> lspci -vvs 00:02 there it shows up as a "VGA compatible controller".
> Could this be in any way related to the problem?
>
> qemu config:
>
> <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
>   <name>win10</name>
>   <uuid>1ecbebf4-cee7-4482-b24a-35c4f5fa6f5b</uuid>
>   <memory unit='KiB'>8388608</memory>
>   <currentMemory unit='KiB'>8388608</currentMemory>
>   <vcpu placement='static'>4</vcpu>
>   <os>
>     <type arch='x86_64' machine='pc-i440fx-2.8'>hvm</type>
>     <bootmenu enable='no'/>
>   </os>
>   <features>
>     <acpi/>
>     <apic/>
>     <hyperv>
>       <relaxed state='on'/>
>       <vapic state='on'/>
>       <spinlocks state='on' retries='8191'/>
>     </hyperv>
>     <vmport state='off'/>
>   </features>
>   <cpu mode='host-passthrough' check='none'>
>     <topology sockets='1' cores='4' threads='1'/>
>   </cpu>
>   <clock offset='localtime'>
>     <timer name='rtc' tickpolicy='catchup'/>
>     <timer name='pit' tickpolicy='delay'/>
>     <timer name='hpet' present='no'/>
>     <timer name='hypervclock' present='yes'/>
>   </clock>
>   <on_poweroff>destroy</on_poweroff>
>   <on_reboot>restart</on_reboot>
>   <on_crash>destroy</on_crash>
>   <pm>
>     <suspend-to-mem enabled='no'/>
>     <suspend-to-disk enabled='no'/>
>   </pm>
>   <devices>
>     <emulator>/usr/sbin/qemu-system-x86_64</emulator>
>     <disk type='file' device='disk'>
>       <driver name='qemu' type='vmdk'/>
>       <source file='/var/lib/libvirt/images/w10.vmdk'/>
>       <target dev='hda' bus='ide'/>
>       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
>     </disk>
>     <disk type='file' device='cdrom'>
>       <driver name='qemu' type='raw'/>
>       <source
> file='/home/simon/Desktop/Win10_1607_N_EnglishInternational_x64.iso'/>
>       <target dev='hdb' bus='ide'/>
>       <readonly/>
>       <boot order='1'/>
>       <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='0x05'
> function='0x7'/>
>     </controller>
>     <controller type='usb' index='0' model='ich9-uhci1'>
>       <master startport='0'/>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x05'
> function='0x0' multifunction='on'/>
>     </controller>
>     <controller type='usb' index='0' model='ich9-uhci2'>
>       <master startport='2'/>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x05'
> function='0x1'/>
>     </controller>
>     <controller type='usb' index='0' model='ich9-uhci3'>
>       <master startport='4'/>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x05'
> 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>
>     <input type='tablet' bus='usb'>
>       <address type='usb' bus='0' port='1'/>
>     </input>
>     <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>
>     <memballoon model='none'/>
>   </devices>
> </domain>
>
> If i add
> <qemu:commandline>
>   <qemu:arg value='-set'/>
>   <qemu:arg value='device.hostdev0.x-vga=on'/>
> </qemu:commandline>
> I get an error message:
> Error starting domain: internal error: qemu unexpectedly closed the monitor:
> 2017-04-06T09:36:06.194417Z qemu-system-x86_64: -device
> vfio-pci,host=00:02.0,id=hostdev0,bus=pci.0,addr=0x2: vfio error:
> 0000:00:02.0: failed getting region info for VGA region index 8: Invalid
> argument
>
> Traceback (most recent call last):
>   File "/usr/share/virt-manager/virtManager/asyncjob.py", line 88, in
> cb_wrapper
>     callback(asyncjob, *args, **kwargs)
>   File "/usr/share/virt-manager/virtManager/asyncjob.py", line 124, in tmpcb
>     callback(*args, **kwargs)
>   File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 83, in
> newfn
>     ret = fn(self, *args, **kwargs)
>   File "/usr/share/virt-manager/virtManager/domain.py", line 1479, in
> startup
>     self._backend.create()
>   File "/usr/lib/python2.7/site-packages/libvirt.py", line 1039, in create
>     if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
> libvirtError: internal error: qemu unexpectedly closed the monitor:
> 2017-04-06T09:36:06.194417Z qemu-system-x86_64: -device
> vfio-pci,host=00:02.0,id=hostdev0,bus=pci.0,addr=0x2: vfio error:
> 0000:00:02.0: failed getting region info for VGA region index 8: Invalid
> argument
>
> Any help and guidance is greatly appreciated!
> Thanks,
> wurzelsim
>
> _______________________________________________
> vfio-users mailing list
> vfio-users at redhat.com
> https://www.redhat.com/mailman/listinfo/vfio-users
>




More information about the vfio-users mailing list