diff options
author | Antonios Motakis <a.motakis@virtualopensystems.com> | 2015-03-16 23:08:47 +0300 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2015-03-16 23:08:47 +0300 |
commit | 6e3f264560099869f68830cb14b3b3e71e5ac76a (patch) | |
tree | 2b7ee9a62d4f88fd647b1084bd0f3f3353275df3 /drivers/vfio/platform/vfio_platform_private.h | |
parent | e8909e67cac3ad3868dc86cc6b1445f39c71bf63 (diff) | |
download | linux-6e3f264560099869f68830cb14b3b3e71e5ac76a.tar.xz |
vfio/platform: read and write support for the device fd
VFIO returns a file descriptor which we can use to manipulate the memory
regions of the device. Usually, the user will mmap memory regions that are
addressable on page boundaries, however for memory regions where this is
not the case we cannot provide mmap functionality due to security concerns.
For this reason we also allow to use read and write functions to the file
descriptor pointing to the memory regions.
We implement this functionality only for MMIO regions of platform devices;
PIO regions are not being handled at this point.
Signed-off-by: Antonios Motakis <a.motakis@virtualopensystems.com>
Signed-off-by: Baptiste Reynal <b.reynal@virtualopensystems.com>
Reviewed-by: Eric Auger <eric.auger@linaro.org>
Tested-by: Eric Auger <eric.auger@linaro.org>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/vfio/platform/vfio_platform_private.h')
-rw-r--r-- | drivers/vfio/platform/vfio_platform_private.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/vfio/platform/vfio_platform_private.h b/drivers/vfio/platform/vfio_platform_private.h index 3551f6d97fc3..97c78f9791f1 100644 --- a/drivers/vfio/platform/vfio_platform_private.h +++ b/drivers/vfio/platform/vfio_platform_private.h @@ -34,6 +34,7 @@ struct vfio_platform_region { u32 type; #define VFIO_PLATFORM_REGION_TYPE_MMIO 1 #define VFIO_PLATFORM_REGION_TYPE_PIO 2 + void __iomem *ioaddr; }; struct vfio_platform_device { |