[vfio-users] Initialization problem with pass-through video card

Ivan Volosyuk ivan.volosyuk at gmail.com
Sat May 7 12:42:44 UTC 2016


I have GTX 970 and an intel buildin graphic I use for X11.
If you use ovmf you should at least get the efi startup screen on your
nvidia output when your VM boots. Don't bother loading windows there, solve
this first.
I have:
00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v3/4th
Gen Core Processor Integrated Graphics Controller (rev 06)
BOOT_IMAGE=/kernel-genkernel-x86_64-4.5.1-gentoo
root=UUID=8982a4f4-741e-4e77-9ac6-45422b169c4c ro rootfstype=ext4
init=/sbin/init intel_iommu=on pci-stub.ids=10de:13c2,10de:0fbb

On Sat, May 7, 2016 at 9:43 AM Sheldon Palmer <slf_palmer at hotmail.com>
wrote:

> > > # cat /etc/modprobe.d/vfio.conf
> > > options vfio-pci ids=8086:0151,10de:17c8,10de:0fb0
>
> I deleted:  8086:0151
>
>
> > Do NOT add the root port here, it needs to be bound to the default
> > driver which will be pcieport. If the bridge is not enabled we can't
> > talk to the card behind it. I'm not sure if this is actually taking
> > affect though since vfio-pci in your kernel shouldn't bind to it.
> >
> > > options vfio-pci disable_vga=1
> > >
> > > # cat /etc/modprobe.d/kvm.conf
> > > # if vfio-pci was built as a module ( default on arch & ubuntu )
> > > options vfio_iommu_type1 allow_unsafe_interrupts=1
>
> And got rid of this: options vfio_iommu_type1 allow_unsafe_interrupts=1
>
>
>
> > This is IGD going whacko, is this just a result of enabling the IOMMU
> > or does it have some relation to the VM starting? Have you tried
> > intel_iommu=on,igfx_off? It might be a bug in your host firmware not
> > enabling RMRR entries for stolen memory. iommu=pt may also resolve it.
>
> Adding "igfx_off" got rid of the DMA write errors
>
>
> Removed all of this:
>
> > > <qemu:commandline>
> > > <qemu:arg value='-drive'/>
> > > <qemu:arg
> value='if=pflash,format=raw,readonly,file=/usr/share/edk2.git/ovmf-x64/OVMF-pure-efi.fd'/>
> > > </qemu:commandline>
>
> > My only suspicion is the misuse of that root port by trying to bind it
> > to vfio-pci. Undo that, if it still doesn't work send 'sudo lspci
> > -vvv' for 00:01.0, and 01:
>
>
> Still just a flicker then the monitor turns off so here is sudo lspci -vvv
>
> 00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core
> processor PCI Express Root Port (rev 09) (prog-if 00 [Normal decode])
>     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, Cache Line Size: 64 bytes
>     Interrupt: pin A routed to IRQ 26
>     Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
>     I/O behind bridge: 0000e000-0000efff
>     Memory behind bridge: f6000000-f70fffff
>     Prefetchable memory behind bridge: 00000000e0000000-00000000f1ffffff
>     Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort-
> <TAbort- <MAbort+ <SERR- <PERR-
>     BridgeCtl: Parity- SERR- NoISA- VGA+ MAbort- >Reset- FastB2B-
>         PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
>     Capabilities: [88] Subsystem: ASUSTeK Computer Inc. P8H77-I Motherboard
>     Capabilities: [80] 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: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-
>         Address: feeff00c  Data: 41a1
>     Capabilities: [a0] Express (v2) Root Port (Slot+), MSI 00
>         DevCap:    MaxPayload 256 bytes, PhantFunc 0
>             ExtTag- RBE+
>         DevCtl:    Report errors: Correctable- Non-Fatal- Fatal-
> Unsupported-
>             RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
>             MaxPayload 256 bytes, MaxReadReq 128 bytes
>         DevSta:    CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr-
> TransPend-
>         LnkCap:    Port #2, Speed 8GT/s, Width x16, ASPM L0s L1, Exit
> Latency L0s <256ns, L1 <8us
>             ClockPM- Surprise- LLActRep- BwNot+ ASPMOptComp+
>         LnkCtl:    ASPM Disabled; RCB 64 bytes Disabled- CommClk+
>             ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
>         LnkSta:    Speed 8GT/s, Width x16, TrErr- Train+ SlotClk+
> DLActive- BWMgmt+ ABWMgmt+
>         SltCap:    AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug-
> Surprise-
>             Slot #1, PowerLimit 75.000W; Interlock- NoCompl+
>         SltCtl:    Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq-
> LinkChg-
>             Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
>         SltSta:    Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+
> Interlock-
>             Changed: MRL- PresDet+ LinkState-
>         RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna-
> CRSVisible-
>         RootCap: CRSVisible-
>         RootSta: PME ReqID 0000, PMEStatus- PMEPending-
>         DevCap2: Completion Timeout: Not Supported, TimeoutDis-, LTR-,
> OBFF Not Supported ARIFwd-
>         DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF
> Disabled ARIFwd-
>         LnkCtl2: Target Link Speed: 8GT/s, EnterCompliance- SpeedDis-
>              Transmit Margin: Normal Operating Range,
> EnterModifiedCompliance- ComplianceSOS-
>              Compliance De-emphasis: -6dB
>         LnkSta2: Current De-emphasis Level: -6dB, 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: [140 v1] Root Complex Link
>         Desc:    PortNumber=02 ComponentID=01 EltType=Config
>         Link0:    Desc:    TargetPort=00 TargetComponent=01 AssocRCRB-
> LinkType=MemMapped LinkValid+
>             Addr:    00000000fed19000
>     Capabilities: [d94 v1] #19
>     Kernel driver in use: pcieport
>
>
>
> 01:00.0 VGA compatible controller: NVIDIA Corporation GM200 [GeForce GTX
> 980 Ti] (rev a1) (prog-if 00 [VGA controller])
>     Subsystem: ASUSTeK Computer Inc. GM200 [GeForce GTX 980 Ti]
>     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 f6000000 (32-bit, non-prefetchable) [size=16M]
>     Region 1: Memory at e0000000 (64-bit, prefetchable) [size=256M]
>     Region 3: Memory at f0000000 (64-bit, prefetchable) [size=32M]
>     Region 5: I/O ports at e000 [size=128]
>     Expansion ROM at f7000000 [disabled] [size=512K]
>     Capabilities: [60] Power Management version 3
>         Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
> PME(D0-,D1-,D2-,D3hot-,D3cold-)
>         Status: D3 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
>     Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
>         Address: 0000000000000000  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 not supported,
> Exit Latency L0s <1us, L1 <4us
>             ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp+
>         LnkCtl:    ASPM Disabled; RCB 64 bytes Disabled- CommClk+
>             ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
>         LnkSta:    Speed 8GT/s, Width x16, TrErr- Train- SlotClk+
> DLActive- BWMgmt- ABWMgmt-
>         DevCap2: Completion Timeout: Range AB, TimeoutDis+, LTR+, OBFF Via
> message
>         DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF
> Disabled
>         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=01
>             Status:    NegoPending- InProgress-
>     Capabilities: [250 v1] Latency Tolerance Reporting
>         Max snoop latency: 0ns
>         Max no snoop latency: 0ns
>     Capabilities: [258 v1] L1 PM Substates
>         L1SubCap: PCI-PM_L1.2+ PCI-PM_L1.1+ ASPM_L1.2+ ASPM_L1.1+
> L1_PM_Substates+
>               PortCommonModeRestoreTime=255us PortTPowerOnTime=10us
>     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: vfio-pci
>     Kernel modules: nvidia
>
>
>
> 01:00.1 Audio device: NVIDIA Corporation Device 0fb0 (rev a1)
>     Subsystem: ASUSTeK Computer Inc. Device 8548
>     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 B routed to IRQ 17
>     Region 0: Memory at f7080000 (32-bit, non-prefetchable) [size=16K]
>     Capabilities: [60] Power Management version 3
>         Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
> PME(D0-,D1-,D2-,D3hot-,D3cold-)
>         Status: D3 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
>     Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
>         Address: 0000000000000000  Data: 0000
>     Capabilities: [78] Express (v2) 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 not supported,
> Exit Latency L0s <1us, L1 <4us
>             ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp+
>         LnkCtl:    ASPM Disabled; RCB 64 bytes Disabled- CommClk+
>             ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
>         LnkSta:    Speed 8GT/s, Width x16, TrErr- Train- SlotClk+
> DLActive- BWMgmt- ABWMgmt-
>         DevCap2: Completion Timeout: Range AB, TimeoutDis+, LTR+, OBFF Via
> message
>         DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF
> Disabled
>         LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-,
> EqualizationPhase1-
>              EqualizationPhase2-, EqualizationPhase3-,
> LinkEqualizationRequest-
>     Capabilities: [100 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-
>     Kernel driver in use: vfio-pci
>     Kernel modules: snd_hda_intel
>
>
> Appreciate it Alex, thank you!
>
>
>
> _______________________________________________
> vfio-users mailing list
> vfio-users at redhat.com
> https://www.redhat.com/mailman/listinfo/vfio-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/vfio-users/attachments/20160507/6d7d3645/attachment.htm>


More information about the vfio-users mailing list