vfio/pci: Intel IGD OpRegion support

This is the first consumer of vfio device specific resource support,
providing read-only access to the OpRegion for Intel graphics devices.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
This commit is contained in:
Alex Williamson
2016-02-22 16:02:43 -07:00
parent 345d710491
commit 5846ff54e8
6 changed files with 136 additions and 0 deletions

View File

@@ -169,6 +169,13 @@ static int vfio_pci_enable(struct vfio_pci_device *vdev)
if (!vfio_vga_disabled() && vfio_pci_is_vga(pdev))
vdev->has_vga = true;
if (vfio_pci_is_vga(pdev) && pdev->vendor == PCI_VENDOR_ID_INTEL) {
if (vfio_pci_igd_opregion_init(vdev) == 0)
dev_info(&pdev->dev,
"Intel IGD OpRegion support enabled\n");
}
return 0;
}