vfio/pci: Add infrastructure for additional device specific regions
authorAlex Williamson <alex.williamson@redhat.com>
Mon, 22 Feb 2016 23:02:39 +0000 (16:02 -0700)
committerAlex Williamson <alex.williamson@redhat.com>
Mon, 22 Feb 2016 23:10:09 +0000 (16:10 -0700)
commit28541d41c9e04cb2ddbf93facd1e376dd5613360
treebfd5234a1dadc51d7f73cd69f36ebb71e7df224f
parentc7bb4cb40f89224dc55755178343728e30dd583a
vfio/pci: Add infrastructure for additional device specific regions

Add support for additional regions with indexes started after the
already defined fixed regions.  Device specific code can register
these regions with the new vfio_pci_register_dev_region() function.
The ops structure per region currently only includes read/write
access and a release function, allowing automatic cleanup when the
device is closed.  mmap support is only missing here because it's
not needed by the first user queued for this support.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/pci/vfio_pci.c
drivers/vfio/pci/vfio_pci_private.h