diff options
author | Thanos Makatos <thanos.makatos@nutanix.com> | 2021-06-09 11:15:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-09 11:15:34 +0100 |
commit | 1abe697341061a6c16e4a5d28b20b5efa7035a81 (patch) | |
tree | d034333d573cf5228a03cb9466540a822a60ee20 /samples/client.c | |
parent | 57684de8240fce4a277301a86a803842338762af (diff) | |
download | libvfio-user-1abe697341061a6c16e4a5d28b20b5efa7035a81.zip libvfio-user-1abe697341061a6c16e4a5d28b20b5efa7035a81.tar.gz libvfio-user-1abe697341061a6c16e4a5d28b20b5efa7035a81.tar.bz2 |
drop mappable flag from DMA map (#553)
The flags field belongs to VFIO and it's not a good idea to reuse as new
VFIO flags can break things. Instead, we derive whether or not a region
is mappable if a file descriptor is passed.
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
Reviewed-by: John Levon <john.levon@nutanix.com>
Diffstat (limited to 'samples/client.c')
-rw-r--r-- | samples/client.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/samples/client.c b/samples/client.c index 13880c5..ef3202c 100644 --- a/samples/client.c +++ b/samples/client.c @@ -1175,7 +1175,7 @@ int main(int argc, char *argv[]) dma_regions[i].addr = i * sysconf(_SC_PAGESIZE); dma_regions[i].size = sysconf(_SC_PAGESIZE); dma_regions[i].offset = dma_regions[i].addr; - dma_regions[i].flags = VFIO_USER_F_DMA_REGION_READ | VFIO_USER_F_DMA_REGION_WRITE | VFIO_USER_F_DMA_REGION_MAPPABLE; + dma_regions[i].flags = VFIO_USER_F_DMA_REGION_READ | VFIO_USER_F_DMA_REGION_WRITE; dma_region_fds[i] = fileno(fp); } |