qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v1 03/24] vfio-user: add container IO ops vector


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v1 03/24] vfio-user: add container IO ops vector
Date: Mon, 12 Dec 2022 10:40:02 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.5.1

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.johnson@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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]