intel / gvt-linux

Other
503 stars 94 forks source link

Does intel nuc 11 N5105 support igpu gvt-d? #210

Closed wnark closed 1 year ago

wnark commented 2 years ago

Does intel nuc 11 support igpu gvt-d? I tried to use qemu pass-through nuc, although pass-through usb controller is normal, but pass-through nuc is always black screen. dmesg: image

[  743.040302] DMAR: DRHD: handling fault status reg 3
[  743.040310] DMAR: [DMA Read NO_PASID] Request device [00:02.0] fault addr 0x7c0c0000 [fault reason 0x02] Present bit in context entry is clear
[  743.040980] DMAR: DRHD: handling fault status reg 3
[  743.040985] DMAR: [DMA Read NO_PASID] Request device [00:02.0] fault addr 0x7c100000 [fault reason 0x06] PTE Read access is not set
[  743.041661] DMAR: DRHD: handling fault status reg 3
[  743.041681] DMAR: [DMA Read NO_PASID] Request device [00:02.0] fault addr 0x7c180000 [fault reason 0x06] PTE Read access is not set
[  743.042332] DMAR: DRHD: handling fault status reg 3
[  744.457544] vfio-pci 0000:00:02.0: vfio_ecap_init: hiding ecap 0x1b@0x100
[  744.459316] vfio-pci 0000:00:02.0: BAR 2: can't reserve [mem 0x4000000000-0x403fffffff 64bit pref]
[  746.700854] vfio-pci 0000:00:02.0: Invalid PCI ROM header signature: expecting 0xaa55, got 0x4284
[  774.100510] kvm [1036]: ignored rdmsr: 0x309 data 0x0
[  774.100519] kvm [1036]: ignored rdmsr: 0x30a data 0x0
[  774.100521] kvm [1036]: ignored rdmsr: 0x30b data 0x0
[  774.100523] kvm [1036]: ignored rdmsr: 0x30c data 0x0
[  774.100525] kvm [1036]: ignored rdmsr: 0x38d data 0x0
[  774.100546] kvm [1036]: ignored rdmsr: 0x38e data 0x0
[  774.100548] kvm [1036]: ignored rdmsr: 0x38f data 0x0
[  774.100550] kvm [1036]: ignored rdmsr: 0x390 data 0x0
[  774.100554] kvm [1036]: ignored rdmsr: 0xc3 data 0x0
[  774.100556] kvm [1036]: ignored rdmsr: 0xc4 data 0x0

/var/log/libvirt/qemu/ubuntu.log

2022-04-12T14:23:40.049068Z qemu-system-x86_64: -device vfio-pci,host=0000:00:02.0,id=hostdev0,bus=pcie.0,addr=0x2: Failed to mmap 0000:00:02.0 BAR 2. Performance may be slow
2022-04-12T14:23:40.049408Z qemu-system-x86_64: -device vfio-pci,host=0000:00:02.0,id=hostdev0,bus=pcie.0,addr=0x2: IGD device 0000:00:02.0 cannot support legacy mode due to existing devices at address 1f.0
2022-04-12T14:23:42.290574Z qemu-system-x86_64: vfio-pci: Cannot read device rom at 0000:00:02.0
Device option ROM contents are probably invalid (check dmesg).
Skip option ROM probe with rombar=0, or load from file with romfile=
wnark commented 2 years ago

pci:

IOMMU Group 0:
    00:00.0 Host bridge [0600]: Intel Corporation Device [8086:4e24]
IOMMU Group 1:
    00:02.0 VGA compatible controller [0300]: Intel Corporation JasperLake [UHD Graphics] [8086:4e61] (rev 01)
IOMMU Group 2:
    00:04.0 Signal processing controller [1180]: Intel Corporation Dynamic Tuning service [8086:4e03]
IOMMU Group 3:
    00:08.0 System peripheral [0880]: Intel Corporation Device [8086:4e11]
IOMMU Group 4:
    00:14.0 USB controller [0c03]: Intel Corporation Device [8086:4ded] (rev 01)
    00:14.2 RAM memory [0500]: Intel Corporation Device [8086:4def] (rev 01)
IOMMU Group 5:
    00:14.3 Network controller [0280]: Intel Corporation Wi-Fi 6 AX201 160MHz [8086:4df0] (rev 01)
IOMMU Group 6:
    00:15.0 Serial bus controller [0c80]: Intel Corporation Serial IO I2C Host Controller [8086:4de8] (rev 01)
    00:15.2 Serial bus controller [0c80]: Intel Corporation Device [8086:4dea] (rev 01)
IOMMU Group 7:
    00:16.0 Communication controller [0780]: Intel Corporation Management Engine Interface [8086:4de0] (rev 01)
IOMMU Group 8:
    00:17.0 SATA controller [0106]: Intel Corporation Device [8086:4dd3] (rev 01)
IOMMU Group 9:
    00:19.0 Serial bus controller [0c80]: Intel Corporation Device [8086:4dc5] (rev 01)
    00:19.1 Serial bus controller [0c80]: Intel Corporation Device [8086:4dc6] (rev 01)
IOMMU Group 10:
    00:1a.0 SD Host controller [0805]: Intel Corporation Device [8086:4dc4] (rev 01)
IOMMU Group 11:
    00:1c.0 PCI bridge [0604]: Intel Corporation Device [8086:4dbc] (rev 01)
IOMMU Group 12:
    00:1c.7 PCI bridge [0604]: Intel Corporation Device [8086:4dbf] (rev 01)
IOMMU Group 13:
    00:1e.0 Communication controller [0780]: Intel Corporation Device [8086:4da8] (rev 01)
    00:1e.3 Serial bus controller [0c80]: Intel Corporation Device [8086:4dab] (rev 01)
IOMMU Group 14:
    00:1f.0 ISA bridge [0601]: Intel Corporation Device [8086:4d87] (rev 01)
    00:1f.3 Audio device [0403]: Intel Corporation Jasper Lake HD Audio [8086:4dc8] (rev 01)
    00:1f.4 SMBus [0c05]: Intel Corporation Jasper Lake SMBus [8086:4da3] (rev 01)
    00:1f.5 Serial bus controller [0c80]: Intel Corporation Jasper Lake SPI Controller [8086:4da4] (rev 01)
IOMMU Group 15:
    01:00.0 Non-Volatile memory controller [0108]: Sandisk Corp Device [15b7:5019] (rev 01)
IOMMU Group 16:
    02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15)
rahulc07 commented 2 years ago

Do you have video=efifb:off in your kernel boot parms?

wnark commented 2 years ago

Do you have video=efifb:off in your kernel boot parms?

Hello, there is no such parameter. Then I try to add this parameter

wnark commented 2 years ago

Do you have video=efifb:off in your kernel boot parms?

Hello,when my current grub parameters are:

GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 intel_iommu=on kvm.ignore_msrs=1 vfio-pci.ids=8086:4e61 iommu=pt video=efifb:off"

the log of '/var/log/libvirt/qemu' is: image

2022-04-18T20:43:48.616567Z qemu-system-x86_64: -device vfio-pci,host=0000:00:02.0,id=hostdev0,bus=pcie.0,addr=0x2: IGD device 0000:00:02.0 cannot support legacy mode due to existing devices at address 1f.0
2022-04-18T20:43:50.893000Z qemu-system-x86_64: vfio-pci: Cannot read device rom at 0000:00:02.0
Device option ROM contents are probably invalid (check dmesg).
Skip option ROM probe with rombar=0, or load from file with romfile=
libusb: error [udev_hotplug_event] ignoring udev action change
libusb: error [udev_hotplug_event] ignoring udev action change
libusb: error [udev_hotplug_event] ignoring udev action change

and windows show: image

the dmesg: image

wnark commented 2 years ago

I tried using a custom Rom had to be written for the vbios for ovmf https://github.com/patmagauran/i915ovmfPkg/issues/25#issuecomment-1101425616

But it doesn't seem to work properly. image

wnark commented 2 years ago

Perhaps, I should use UPT mode to pass through Intel's core display (because the 11th generation CPU no longer supports legacy mode), and then use x-igd-opregion=on to output from hdmi. According to the qemu documentation, Intel has not officially supported this feature yet? https://github.com/qemu/qemu/blob/master/docs/igd-assign.txt

wnark commented 2 years ago

test.txt this is my libvirt xml It is a bit strange that although it says that gvt-d has both legacy and upt modes, there is no difference between these two modes in the subsystem of the libvirt xml file. How can I tell which mode my virtual machine's intel GPU is in?

wnark commented 2 years ago

i know The pci bus location of 00:02.0, if the IGD is assigned to this location, will activate Legacy direct mode, as Legacy mode requires the IGD's pci bus location to use 00:02.0. I'll change the PCI address and try again

wnark commented 2 years ago

When I modified the physical address of the virtual machine's kernel display, there was a new prompt after starting the virtual machine: /var/log/libvirt/qemu/test.log

2022-04-18T23:30:39.887502Z qemu-system-x86_64: vfio-pci: Cannot read device rom at 0000:00:02.0
Device option ROM contents are probably invalid (check dmesg).
Skip option ROM probe with rombar=0, or load from file with romfile=
libusb: error [udev_hotplug_event] ignoring udev action change
libusb: error [udev_hotplug_event] ignoring udev action change
libusb: error [udev_hotplug_event] ignoring udev action change
libusb: error [udev_hotplug_event] ignoring udev action change

dmesg: image


[   68.044734] DMAR: DRHD: handling fault status reg 3
[   68.044749] DMAR: [DMA Read] Request device [00:02.0] PASID ffffffff fault addr 7c000000 [fault reason 06] PTE Read access is not set
[   68.046040] DMAR: DRHD: handling fault status reg 3
[   68.046056] DMAR: [DMA Read] Request device [00:02.0] PASID ffffffff fault addr 7c0c0000 [fault reason 06] PTE Read access is not set
[   68.046710] DMAR: DRHD: handling fault status reg 3
[   68.046718] DMAR: [DMA Read] Request device [00:02.0] PASID ffffffff fault addr 7c100000 [fault reason 06] PTE Read access is not set
[   68.047386] DMAR: DRHD: handling fault status reg 3

Still unable to install graphics driver image IntelGFX.log

wnark commented 2 years ago

Hello, I use the latest version of qemu and the kernel. After the pass-through, the driver is installed successfully, but the blue screen is displayed when restarting Windows. 1650355101(1)

marcosscriven commented 2 years ago

Did you get anywhere with this @wnark? My understanding is N5105 is "10th gen" / "Jasper Lake", which I think does support GVT-D?

wnark commented 2 years ago

Did you get anywhere with this @wnark? My understanding is N5105 is "10th gen" / "Jasper Lake", which I think does support GVT-D?

The n5105 is the 11th generation, and the intel nuclear display driver can not drive the nuclear display behind gvt-d very well at present.

lixaotec commented 1 year ago

Any news on this?

wnark commented 1 year ago

Any news on this?

NO,I have to try 12th,just like nuc12i5,try to sr-iov