diff options
author | Thanos Makatos <thanos.makatos@nutanix.com> | 2020-09-24 11:58:46 -0400 |
---|---|---|
committer | Thanos Makatos <thanos.makatos@nutanix.com> | 2020-09-24 12:14:17 -0400 |
commit | d0634899d7d76872efca35bf79a0e3f31dcc8d74 (patch) | |
tree | 0effbdb6d918304b6b3a21ea2aefaee2ca0d4b42 /samples/gpio-pci-idio-16.c | |
parent | 6d6470ab820212059f108a458ceb9e6e98ab1ef6 (diff) | |
download | libvfio-user-d0634899d7d76872efca35bf79a0e3f31dcc8d74.zip libvfio-user-d0634899d7d76872efca35bf79a0e3f31dcc8d74.tar.gz libvfio-user-d0634899d7d76872efca35bf79a0e3f31dcc8d74.tar.bz2 |
implement VFIO_USER_DMA_MAP
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'samples/gpio-pci-idio-16.c')
-rw-r--r-- | samples/gpio-pci-idio-16.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/samples/gpio-pci-idio-16.c b/samples/gpio-pci-idio-16.c index 3c87103..06320f3 100644 --- a/samples/gpio-pci-idio-16.c +++ b/samples/gpio-pci-idio-16.c @@ -65,6 +65,12 @@ static void _sa_handler(int signum __attribute__((unused))) { } +static int +unmap_dma(void *pvt __attribute__((unused)), + uint64_t iova __attribute__((unused))) +{ +} + int main(int argc, char *argv[]) { int ret; @@ -105,6 +111,13 @@ int main(int argc, char *argv[]) .irq_count[LM_DEV_INTX_IRQ_IDX] = 1, }, .uuid = argv[optind], + + /* + * Not strictly necessary since this device doesn't yet do any DMA. + * By declaring this dummy callback DMA regions get registered, + * otherwise they're ignored. + */ + .unmap_dma = unmap_dma }; sigemptyset(&act.sa_mask); |