]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
vfio/pci: Bypass IGD init in case of -ENODEV
authorFred Gao <fred.gao@intel.com>
Mon, 2 Nov 2020 18:01:20 +0000 (02:01 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Nov 2020 18:22:13 +0000 (19:22 +0100)
commitfdcbd5e015f9b654abb1cf9805f824e067016c7f
tree11c8c5afc30e8264014ba497a9cd23c9d9a65922
parent0fa7baa5092263f4c8aea0ae4a5239008049a523
vfio/pci: Bypass IGD init in case of -ENODEV

[ Upstream commit e4eccb853664de7bcf9518fb658f35e748bf1f68 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/vfio/pci/vfio_pci.c