diff options
author | Xie Yongji <xieyongji@bytedance.com> | 2023-03-23 08:30:40 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2023-04-21 10:02:32 +0300 |
commit | 5e68470f4e80a4120e9ecec408f6ab4ad386bd4a (patch) | |
tree | 96ef6b18eba82fe988ae0273e4b632cb41b5171e /include/linux/vdpa.h | |
parent | 66640f4a6fcc1861d1b1f9b36b65a218064f263f (diff) | |
download | linux-5e68470f4e80a4120e9ecec408f6ab4ad386bd4a.tar.xz |
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 'include/linux/vdpa.h')
-rw-r--r-- | include/linux/vdpa.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h index 2313db735773..f2064fa2d2da 100644 --- a/include/linux/vdpa.h +++ b/include/linux/vdpa.h @@ -13,10 +13,16 @@ * struct vdpa_calllback - vDPA callback definition. * @callback: interrupt callback function * @private: the data passed to the callback function + * @trigger: the eventfd for the callback (Optional). + * When it is set, the vDPA driver must guarantee that + * signaling it is functional equivalent to triggering + * the callback. Then vDPA parent can signal it directly + * instead of triggering the callback. */ struct vdpa_callback { irqreturn_t (*callback)(void *data); void *private; + struct eventfd_ctx *trigger; }; /** |