All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] vfio/pci: Refine Intel IGD OpRegion support
@ 2020-09-29 16:10 ` Fred Gao
  0 siblings, 0 replies; 13+ messages in thread
From: Fred Gao @ 2020-09-29 16:10 UTC (permalink / raw)
  To: kvm, intel-gfx
  Cc: Fred Gao, Zhenyu Wang, Xiong Zhang, Hang Yuan, Stuart Summers,
	Lucas De Marchi

Bypass the IGD initialization for Intel's dgfx devices with own expansion
ROM and the host/LPC bridge config space are no longer accessed.

v2: simply test if discrete or integrated gfx device
    with root bus. (Alex Williamson)

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: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Fred Gao <fred.gao@intel.com>
---
 drivers/vfio/pci/vfio_pci.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c
index f634c81998bb..9258ccfadb79 100644
--- a/drivers/vfio/pci/vfio_pci.c
+++ b/drivers/vfio/pci/vfio_pci.c
@@ -336,10 +336,11 @@ static int vfio_pci_enable(struct vfio_pci_device *vdev)
 	if (!vfio_vga_disabled() && vfio_pci_is_vga(pdev))
 		vdev->has_vga = true;
 
-
+	/* Intel's dgfx should not appear on root bus */
 	if (vfio_pci_is_vga(pdev) &&
 	    pdev->vendor == PCI_VENDOR_ID_INTEL &&
-	    IS_ENABLED(CONFIG_VFIO_PCI_IGD)) {
+	    IS_ENABLED(CONFIG_VFIO_PCI_IGD) &&
+	    pci_is_root_bus(pdev->bus)) {
 		ret = vfio_pci_igd_init(vdev);
 		if (ret) {
 			pci_warn(pdev, "Failed to setup Intel IGD regions\n");
-- 
2.24.1.1.gb6d4d82bd5


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-11-03 18:21 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-29 16:10 [PATCH v2] vfio/pci: Refine Intel IGD OpRegion support Fred Gao
2020-09-29 16:10 ` [Intel-gfx] " Fred Gao
2020-09-29  8:49 ` Zhenyu Wang
2020-09-29  8:49   ` [Intel-gfx] " Zhenyu Wang
2020-09-29 19:19 ` [Intel-gfx] ✓ Fi.CI.IGT: success for vfio/pci: Refine Intel IGD OpRegion support (rev2) Patchwork
2020-09-29 22:06 ` [PATCH v2] vfio/pci: Refine Intel IGD OpRegion support Alex Williamson
2020-09-29 22:06   ` [Intel-gfx] " Alex Williamson
2020-11-02 11:48 ` [Intel-gfx] ✓ Fi.CI.BAT: success for vfio/pci: Refine Intel IGD OpRegion support (rev3) Patchwork
2020-11-02 16:13 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2020-11-02 18:01 ` [PATCH v3] vfio/pci: Bypass IGD init in case of -ENODEV Fred Gao
2020-11-02 18:01   ` [Intel-gfx] " Fred Gao
2020-11-03 18:21   ` Alex Williamson
2020-11-03 18:21     ` [Intel-gfx] " Alex Williamson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.