strongtz / i915-sriov-dkms

dkms module of Linux i915 driver with SR-IOV support
1.13k stars 138 forks source link

Kernel driver in use: vf90-pci #106

Closed amosyuen closed 1 year ago

amosyuen commented 1 year ago

I was following this guide https://www.derekseaman.com/2023/06/proxmox-ve-8-windows-11-vgpu-vt-d-passthrough-with-intel-alder-lake.html to enable SR-IOV in proxmox for my i5-1135G7 integrated graphics. But it failed to load.

dmesg | grep i915 output:

[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-6.2.16-10-pve root=/dev/mapper/pve-root ro quiet consoleblank=60 intel_iommu=on iommu=pt i915.enable_guc=3 i915.max_vfs=7 pci=realloc,assign-busses
[    0.060909] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-6.2.16-10-pve root=/dev/mapper/pve-root ro quiet consoleblank=60 intel_iommu=on iommu=pt i915.enable_guc=3 i915.max_vfs=7 pci=realloc,assign-busses
[   10.393964] i915: module verification failed: signature and/or required key missing - tainting kernel
[   10.641252] i915 0000:00:02.0: Running in SR-IOV PF mode
[   10.641781] i915 0000:00:02.0: [drm] VT-d active for gfx access
[   10.641884] i915 0000:00:02.0: vgaarb: deactivate vga console
[   10.641929] i915 0000:00:02.0: [drm] Using Transparent Hugepages
[   10.643213] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=io+mem
[   10.644234] mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i915_hdcp_component_ops [i915])
[   10.644396] i915 0000:00:02.0: [drm] Finished loading DMC firmware i915/tgl_dmc_ver2_12.bin (v2.12)
[   10.689116] i915 0000:00:02.0: [drm] GT0: GuC firmware i915/tgl_guc_70.1.1.bin version 70.1.1
[   10.689120] i915 0000:00:02.0: [drm] GT0: HuC firmware i915/tgl_huc_7.9.3.bin version 7.9.3
[   10.692740] i915 0000:00:02.0: [drm] GT0: HuC: authenticated for all workloads!
[   10.693142] i915 0000:00:02.0: [drm] GT0: GUC: submission enabled
[   10.693143] i915 0000:00:02.0: [drm] GT0: GUC: SLPC enabled
[   10.693580] i915 0000:00:02.0: [drm] GuC RC: enabled
[   10.694501] mei_pxp 0000:00:16.0-fbf6fcf1-96cf-4e2e-a6a6-1bab8cbe36b1: bound 0000:00:02.0 (ops i915_pxp_tee_component_ops [i915])
[   10.694660] i915 0000:00:02.0: [drm] Protected Xe Path (PXP) protected content support initialized
[   10.699421] [drm] Initialized i915 1.6.0 20201103 for 0000:00:02.0 on minor 0
[   10.701022] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[   10.701288] i915 0000:00:02.0: 7 VFs could be associated with this PF
[   10.716985] fbcon: i915drmfb (fb0) is primary device
[   10.750889] i915 0000:00:02.0: [drm] fb0: i915drmfb frame buffer device
[   12.320871] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=io+mem
[   12.320941] i915 0000:00:02.1: enabling device (0000 -> 0002)
[   12.320961] i915 0000:00:02.1: Running in SR-IOV VF mode
[   12.321125] i915 0000:00:02.1: [drm] GT0: GUC: interface version 0.1.0.0
[   12.321525] i915 0000:00:02.1: [drm] VT-d active for gfx access
[   12.321542] i915 0000:00:02.1: [drm] Using Transparent Hugepages
[   12.321895] i915 0000:00:02.1: [drm] GT0: GUC: interface version 0.1.0.0
[   12.322062] i915 0000:00:02.1: GuC firmware PRELOADED version 1.0 submission:SR-IOV VF
[   12.322063] i915 0000:00:02.1: HuC firmware PRELOADED
[   12.323772] i915 0000:00:02.1: [drm] Protected Xe Path (PXP) protected content support initialized
[   12.323777] i915 0000:00:02.1: [drm] PMU not supported for this GPU.
[   12.323854] [drm] Initialized i915 1.6.0 20201103 for 0000:00:02.1 on minor 1
[   12.324133] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=io+mem
[   12.324189] i915 0000:00:02.2: enabling device (0000 -> 0002)
[   12.324204] i915 0000:00:02.2: Running in SR-IOV VF mode
[   12.324324] i915 0000:00:02.2: [drm] GT0: GUC: interface version 0.1.0.0
[   12.324582] i915 0000:00:02.2: [drm] VT-d active for gfx access
[   12.324606] i915 0000:00:02.2: [drm] Using Transparent Hugepages
[   12.325041] i915 0000:00:02.2: [drm] GT0: GUC: interface version 0.1.0.0
[   12.325199] i915 0000:00:02.2: GuC firmware PRELOADED version 1.0 submission:SR-IOV VF
[   12.325202] i915 0000:00:02.2: HuC firmware PRELOADED
[   12.326747] i915 0000:00:02.2: [drm] Protected Xe Path (PXP) protected content support initialized
[   12.326754] i915 0000:00:02.2: [drm] PMU not supported for this GPU.
[   12.326837] [drm] Initialized i915 1.6.0 20201103 for 0000:00:02.2 on minor 2
[   12.327141] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=io+mem
[   12.327147] i915 0000:00:02.1: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=none
[   12.327153] i915 0000:00:02.2: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=none
[   12.327221] i915 0000:00:02.3: enabling device (0000 -> 0002)
[   12.327245] i915 0000:00:02.3: Running in SR-IOV VF mode
[   12.327371] i915 0000:00:02.3: [drm] GT0: GUC: interface version 0.1.0.0
[   12.327852] i915 0000:00:02.3: [drm] VT-d active for gfx access
[   12.327869] i915 0000:00:02.3: [drm] Using Transparent Hugepages
[   12.328216] i915 0000:00:02.3: [drm] GT0: GUC: interface version 0.1.0.0
[   12.328367] i915 0000:00:02.3: GuC firmware PRELOADED version 1.0 submission:SR-IOV VF
[   12.328368] i915 0000:00:02.3: HuC firmware PRELOADED
[   12.329969] i915 0000:00:02.3: [drm] Protected Xe Path (PXP) protected content support initialized
[   12.329973] i915 0000:00:02.3: [drm] PMU not supported for this GPU.
[   12.330051] [drm] Initialized i915 1.6.0 20201103 for 0000:00:02.3 on minor 3
[   12.330240] i915 0000:00:02.0: Enabled 3 VFs
[   21.007018] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=io+mem
[   21.007034] i915 0000:00:02.2: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=none
[   21.007045] i915 0000:00:02.3: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=none
[   21.119017] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=io+mem
[   21.119033] i915 0000:00:02.3: vgaarb: changed VGA decodes: olddecodes=none,decodes=none:owns=none
[   21.239011] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=none,decodes=io+mem:owns=io+mem
[   22.482633] i915 0000:00:02.0: Disabled 3 VFs

lspci | grep VGA output: 00:02.0 VGA compatible controller: Intel Corporation TigerLake-LP GT2 [Iris Xe Graphics] (rev 01)

I didn't find a SR-IOV option in the bios, tried with and without pci=realloc,assign-busses but same result.

From https://github.com/strongtz/i915-sriov-dkms/issues/48#issuecomment-1464772926 it sounded like i should verify the kernel driver is i915.

lspci -vs 00:02.0 output:

00:02.0 VGA compatible controller: Intel Corporation TigerLake-LP GT2 [Iris Xe Graphics] (rev 01) (prog-if 00 [VGA controller])
        DeviceName: Onboard - Video
        Subsystem: Device 1c6c:078b
        Flags: bus master, fast devsel, latency 0, IRQ 138, IOMMU group 0
        Memory at 6000000000 (64-bit, non-prefetchable) [size=16M]
        Memory at 4000000000 (64-bit, prefetchable) [size=256M]
        I/O ports at 3000 [size=64]
        Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
        Capabilities: [40] Vendor Specific Information: Len=0c <?>
        Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
        Capabilities: [ac] MSI: Enable+ Count=1/1 Maskable+ 64bit-
        Capabilities: [d0] Power Management version 2
        Capabilities: [100] Process Address Space ID (PASID)
        Capabilities: [200] Address Translation Service (ATS)
        Capabilities: [300] Page Request Interface (PRI)
        Capabilities: [320] Single Root I/O Virtualization (SR-IOV)
        Kernel driver in use: vfio-pci
        Kernel modules: i915

Looks like the kernel driver is vfio-pci instead of i915, but I'm not sure what is the correct steps to fix that.

amosyuen commented 1 year ago

Figured it out, the problem was I already had the graphics set to pass through to the VM. Removing it from the VM, fixed the problem.

JobberRT commented 9 months ago

@amosyuen Hi, sorry for interrupt, but do you mean everytime I restart the PVE host, I have to remove the vGPU from VM, then after started, readd it to VM?