On 9/12/22 17:10, Cédric Le Goater wrote:
Hello John,
On 11/9/22 00:13, John Johnson wrote:
Used for communication with VFIO driver
(prep work for vfio-user, which will communicate over a socket)
Signed-off-by: John G Johnson <john.g.john...@oracle.com>
---
hw/vfio/common.c | 126
++++++++++++++++++++++++++++--------------
include/hw/vfio/vfio-common.h | 33 +++++++++++
2 files changed, 117 insertions(+), 42 deletions(-)
diff --git a/hw/vfio/common.c b/hw/vfio/common.c
index ace9562..83d69b9 100644
--- a/hw/vfio/common.c
+++ b/hw/vfio/common.c
@@ -432,12 +432,12 @@ static int vfio_dma_unmap_bitmap(VFIOContainer
*container,
goto unmap_exit;
}
- ret = ioctl(container->fd, VFIO_IOMMU_UNMAP_DMA, unmap);
+ ret = CONT_DMA_UNMAP(container, unmap, bitmap);
I am not sure these macros are very useful, compared to :
container->ops->dma_unmap(container, unmap, bitmap);
I was going to report the same.
+/*
+ * The next 2 ops vectors are how Devices and Containers
+ * communicate with the server. The default option is
+ * through ioctl() to the kernel VFIO driver, but vfio-user
+ * can use a socket to a remote process.
+ */
+
+struct VFIOContIO {
VFIOContainerOps seems more adequate with the current VFIO terminology
in QEMU.
Yes please, abbreviated "Cont" is not helpful.