diff options
author | Xie Yongji <xieyongji@bytedance.com> | 2023-03-23 13:30:40 +0800 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2023-04-21 03:02:32 -0400 |
commit | 5e68470f4e80a4120e9ecec408f6ab4ad386bd4a (patch) | |
tree | 96ef6b18eba82fe988ae0273e4b632cb41b5171e /drivers/vhost | |
parent | 66640f4a6fcc1861d1b1f9b36b65a218064f263f (diff) | |
download | linux-5e68470f4e80a4120e9ecec408f6ab4ad386bd4a.tar.gz linux-5e68470f4e80a4120e9ecec408f6ab4ad386bd4a.tar.bz2 linux-5e68470f4e80a4120e9ecec408f6ab4ad386bd4a.zip |
vdpa: Add eventfd for the vdpa callback
Add eventfd for the vdpa callback so that user
can signal it directly instead of triggering the
callback. It will be used for vhost-vdpa case.
Signed-off-by: Xie Yongji <xieyongji@bytedance.com>
Message-Id: <20230323053043.35-9-xieyongji@bytedance.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'drivers/vhost')
-rw-r--r-- | drivers/vhost/vdpa.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index 7be9d9d8f01c..9cd878e25cff 100644 --- a/drivers/vhost/vdpa.c +++ b/drivers/vhost/vdpa.c @@ -599,9 +599,11 @@ static long vhost_vdpa_vring_ioctl(struct vhost_vdpa *v, unsigned int cmd, if (vq->call_ctx.ctx) { cb.callback = vhost_vdpa_virtqueue_cb; cb.private = vq; + cb.trigger = vq->call_ctx.ctx; } else { cb.callback = NULL; cb.private = NULL; + cb.trigger = NULL; } ops->set_vq_cb(vdpa, idx, &cb); vhost_vdpa_setup_vq_irq(v, idx); |