Skip to content

Commit e4eccb8

Browse files
fred1gaoAlex Williamson
authored andcommitted
vfio/pci: Bypass IGD init in case of -ENODEV
Bypass the IGD initialization when -ENODEV returns, that should be the case if opregion is not available for IGD or within discrete graphics device's option ROM, or host/lpc bridge is not found. Then use of -ENODEV here means no special device resources found which needs special care for VFIO, but we still allow other normal device resource access. Cc: Zhenyu Wang <zhenyuw@linux.intel.com> Cc: Xiong Zhang <xiong.y.zhang@intel.com> Cc: Hang Yuan <hang.yuan@linux.intel.com> Cc: Stuart Summers <stuart.summers@intel.com> Signed-off-by: Fred Gao <fred.gao@intel.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
1 parent bb742ad commit e4eccb8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/vfio/pci/vfio_pci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ static int vfio_pci_enable(struct vfio_pci_device *vdev)
385385
pdev->vendor == PCI_VENDOR_ID_INTEL &&
386386
IS_ENABLED(CONFIG_VFIO_PCI_IGD)) {
387387
ret = vfio_pci_igd_init(vdev);
388-
if (ret) {
388+
if (ret && ret != -ENODEV) {
389389
pci_warn(pdev, "Failed to setup Intel IGD regions\n");
390390
goto disable_exit;
391391
}

0 commit comments

Comments
 (0)