bus/fslmc: support memory event callbacks for VFIO
authorAnatoly Burakov <anatoly.burakov@intel.com>
Wed, 11 Apr 2018 12:30:41 +0000 (13:30 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 11 Apr 2018 19:45:56 +0000 (21:45 +0200)
commitc2c167fdb3bd1182e29cbf095527550c5f372bad
tree29f4c501a187566f1e875f2915240aa2908be05b
parenta6cdf375bc0864df1bf6595ed6d82643bf67d20c
bus/fslmc: support memory event callbacks for VFIO

VFIO needs to map and unmap segments for DMA whenever they
become available or unavailable, so register a callback for
memory events, and provide map/unmap functions.

Remove unneeded check for number of segments, as in non-legacy
mode this now becomes a valid scenario.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Tested-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Tested-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Tested-by: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
drivers/bus/fslmc/fslmc_vfio.c