diff options
author | swapnili <swapnil.ingle@nutanix.com> | 2021-01-08 15:30:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-08 15:30:50 +0100 |
commit | d211f2cf4920e7f082bb5e707c672cecb6f52a6c (patch) | |
tree | b9fb13e4fe3e6cec4d44095109d666c431a9878a /lib/dma.h | |
parent | 6ec31642f6253f5c19187c1ffb396d5921138b67 (diff) | |
download | libvfio-user-d211f2cf4920e7f082bb5e707c672cecb6f52a6c.zip libvfio-user-d211f2cf4920e7f082bb5e707c672cecb6f52a6c.tar.gz libvfio-user-d211f2cf4920e7f082bb5e707c672cecb6f52a6c.tar.bz2 |
Use prot flags sent by client to map dma regions (#227)
* Use prot flags sent by client to map dma regions
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'lib/dma.h')
-rw-r--r-- | lib/dma.h | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -83,6 +83,9 @@ struct vfu_ctx; typedef struct { dma_addr_t dma_addr; // DMA address of this region + uint32_t prot; // memory protection of the mapping + // defined in sys/mman.h + size_t size; // Size of this region int fd; // File descriptor to mmap int page_size; // Page size of this fd @@ -116,7 +119,7 @@ dma_controller_destroy(dma_controller_t *dma); int dma_controller_add_region(dma_controller_t *dma, dma_addr_t dma_addr, size_t size, - int fd, off_t offset); + int fd, off_t offset, uint32_t prot); int dma_controller_remove_region(dma_controller_t *dma, |