7f1c5b
From d135303da1187d9f214e520a977fe7c47e5ce1f0 Mon Sep 17 00:00:00 2001
7f1c5b
From: Cindy Lu <lulu@redhat.com>
7f1c5b
Date: Thu, 22 Dec 2022 15:04:45 +0800
7f1c5b
Subject: [PATCH 04/31] vhost: introduce new VhostOps vhost_set_config_call
7f1c5b
MIME-Version: 1.0
7f1c5b
Content-Type: text/plain; charset=UTF-8
7f1c5b
Content-Transfer-Encoding: 8bit
7f1c5b
7f1c5b
RH-Author: Cindy Lu <lulu@redhat.com>
7f1c5b
RH-MergeRequest: 132: vhost-vdpa: support config interrupt in vhost-vdpa
7f1c5b
RH-Bugzilla: 1905805
7f1c5b
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
7f1c5b
RH-Acked-by: Eugenio PĂ©rez <eperezma@redhat.com>
7f1c5b
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
7f1c5b
RH-Commit: [4/10] c2492838d9c1415e42d2507f2956d640a30325f2 (lulu6/qemu-kvm3)
7f1c5b
7f1c5b
https://bugzilla.redhat.com/show_bug.cgi?id=1905805
7f1c5b
This patch introduces new VhostOps vhost_set_config_call.
7f1c5b
This function allows the qemu to set the config
7f1c5b
event fd to kernel driver.
7f1c5b
7f1c5b
Signed-off-by: Cindy Lu <lulu@redhat.com>
7f1c5b
Message-Id: <20221222070451.936503-5-lulu@redhat.com>
7f1c5b
Acked-by: Jason Wang <jasowang@redhat.com>
7f1c5b
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
7f1c5b
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
7f1c5b
(cherry picked from commit 9b30cdf9bbf9524a4f4f8a6eb551eb13cbbd3893)
7f1c5b
Signed-off-by: Cindy Lu <lulu@redhat.com>
7f1c5b
---
7f1c5b
 include/hw/virtio/vhost-backend.h | 3 +++
7f1c5b
 1 file changed, 3 insertions(+)
7f1c5b
7f1c5b
diff --git a/include/hw/virtio/vhost-backend.h b/include/hw/virtio/vhost-backend.h
7f1c5b
index eab46d7f0b..c5ab49051e 100644
7f1c5b
--- a/include/hw/virtio/vhost-backend.h
7f1c5b
+++ b/include/hw/virtio/vhost-backend.h
7f1c5b
@@ -128,6 +128,8 @@ typedef int (*vhost_get_device_id_op)(struct vhost_dev *dev, uint32_t *dev_id);
7f1c5b
 
7f1c5b
 typedef bool (*vhost_force_iommu_op)(struct vhost_dev *dev);
7f1c5b
 
7f1c5b
+typedef int (*vhost_set_config_call_op)(struct vhost_dev *dev,
7f1c5b
+                                       int fd);
7f1c5b
 typedef struct VhostOps {
7f1c5b
     VhostBackendType backend_type;
7f1c5b
     vhost_backend_init vhost_backend_init;
7f1c5b
@@ -174,6 +176,7 @@ typedef struct VhostOps {
7f1c5b
     vhost_vq_get_addr_op  vhost_vq_get_addr;
7f1c5b
     vhost_get_device_id_op vhost_get_device_id;
7f1c5b
     vhost_force_iommu_op vhost_force_iommu;
7f1c5b
+    vhost_set_config_call_op vhost_set_config_call;
7f1c5b
 } VhostOps;
7f1c5b
 
7f1c5b
 int vhost_backend_update_device_iotlb(struct vhost_dev *dev,
7f1c5b
-- 
7f1c5b
2.31.1
7f1c5b