diff options
author | Alex Williamson <alex.williamson@redhat.com> | 2016-02-22 16:02:43 -0700 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2016-02-22 16:10:09 -0700 |
commit | 5846ff54e87d8bab4f1e330af0b5407747a0a57e (patch) | |
tree | fbd2cf55f626b90db3440238387c14fa36de262c /drivers/vfio/pci/vfio_pci.c | |
parent | 345d710491e2d2c4a9406c1d530adb37cc0429c1 (diff) | |
download | linux-5846ff54e87d8bab4f1e330af0b5407747a0a57e.tar.gz |
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>
Diffstat (limited to 'drivers/vfio/pci/vfio_pci.c')
-rw-r--r-- | drivers/vfio/pci/vfio_pci.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c index 813a2e67aa0c..cb2624db37d8 100644 --- a/drivers/vfio/pci/vfio_pci.c +++ b/drivers/vfio/pci/vfio_pci.c @@ -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; } |