thebeanogamer / rpms / qemu-kvm

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