]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
vfio: Define device specific region type capability
authorAlex Williamson <alex.williamson@redhat.com>
Mon, 22 Feb 2016 23:02:38 +0000 (16:02 -0700)
committerAlex Williamson <alex.williamson@redhat.com>
Mon, 22 Feb 2016 23:10:09 +0000 (16:10 -0700)
commitc7bb4cb40f89224dc55755178343728e30dd583a
tree99d037e32ee7bffb546d10558bcacca5724e2443
parent188ad9d6cbbce4a1d322ac208914a1dea34b30b6
vfio: Define device specific region type capability

To this point vfio has only provided an interface to the user that
allows them to determine the number of regions and specifics about
each region.  What the region represents is left to the vfio bus
driver.  vfio-pci chooses to use fixed indexes for fixed resources,
index 0 is BAR0, 1 is BAR1,... 7 is config space, etc.  This works
pretty well since all PCI devices have these regions, even if they
don't necessarily populate all of them.  Then we start to add things
like VGA, which only certain device even support.  We added this the
same way, but now we've wasted a region index, and due to our offset
implementation the corresponding address space, for all devices.

Rather than continuing that process, let's try to make regions self
describing by including a capability that defines their type.  For
vfio-pci we'll make the current VFIO_PCI_NUM_REGIONS fixed, defining
the end of the static indexes and the beginning of self describing
regions.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
include/uapi/linux/vfio.h