intel / gvt-linux

Other
509 stars 95 forks source link

Can't enable GVT-d on rocket lake i7-11700 #203

Open z7z8th opened 2 years ago

z7z8th commented 2 years ago

CPU:

11th Gen Intel(R) Core(TM) i7-11700 @ 2.50GHz

PCI:

lspci -P -D   
0000:00:00.0 PCI bridge: Intel Corporation Device 4c43 (rev 01)
0000:00:01.0 PCI bridge: Intel Corporation Device 4c01 (rev 01)
0000:00:02.0 VGA compatible controller: Intel Corporation Device 4c8a (rev 04)

error:

[ 6797.582962] vfio-pci 0000:00:02.0: Failed to setup Intel IGD regions

the error is caused by pci 0000:00:00.0 is not a host bridge

static int vfio_pci_igd_cfg_init(struct vfio_pci_device *vdev)
{
...
    if (host_bridge->vendor != PCI_VENDOR_ID_INTEL ||
        host_bridge->class != (PCI_CLASS_BRIDGE_HOST << 8)) {
        pci_dev_put(host_bridge);
        return -EINVAL;
    }
...
}

Is it possible to walk around this limit? Thanks.

TerrenceXu commented 2 years ago

Please try to disable the VMD option in BIOS and try again.

z7z8th commented 2 years ago

Thanks. But I can't find any VMD or Volume Management settings in Dell XPS 8940 BIOS. Can I assume it already disabled?

z7z8th commented 2 years ago

Hi @TerrenceXu, is there other ways to disable VMD?

z7z8th commented 2 years ago

Can I disable VMD by write the register "Capability B - offset E8h" of Host Bridge and DRAM Controller (D0:F0)? But I don't know the base address of that controller, can you give some tips on this? And I don't know what does D0:F0 means?

TerrenceXu commented 2 years ago

@z7z8th , I am not sure whether your issue is related to VMD, just for a try.

BTW, can you provide your full "dmesg" log and "cat /proc/cmdline" log? and what is your reproduce steps.

z7z8th commented 2 years ago

@TerrenceXu Attached dmesg-1.log

BOOT_IMAGE=/boot/vmlinuz-5.10.92-zzz+ ro module_blacklist=i915 intel_iommu=on i915.enable_guc=0 kvm.ignore_msrs=1 drm.debug=2 "dyndbg=file gvt +p" pcie=noear pcie_ports=native quiet

In virt-manager:

  1. select "Add hardware" -> "PCI Host Device" select 0000:00:02.0
  2. start the virtual machine
kuasha420 commented 1 year ago

Were you successful with this? @z7z8th