diff options
author | Zhu Lingshan <lingshan.zhu@intel.com> | 2020-07-31 14:55:30 +0800 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2020-08-05 11:08:42 -0400 |
commit | 7164675ab5caf46867d6a5448f4ff3af92d80a30 (patch) | |
tree | 1d0250912b493975a46137d044607ef214148e10 /include/linux/vdpa.h | |
parent | 2edd9cb79fb31b0907c6e0cdce2824780cf9b153 (diff) | |
download | lwn-7164675ab5caf46867d6a5448f4ff3af92d80a30.tar.gz lwn-7164675ab5caf46867d6a5448f4ff3af92d80a30.zip |
vDPA: add get_vq_irq() in vdpa_config_ops
This commit adds a new function get_vq_irq() in struct
vdpa_config_ops, which will return the irq number of a
virtqueue.
Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com>
Suggested-by: Jason Wang <jasowang@redhat.com>
Link: https://lore.kernel.org/r/20200731065533.4144-4-lingshan.zhu@intel.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/linux/vdpa.h')
-rw-r--r-- | include/linux/vdpa.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h index 29b8296f1414..5c530a64aa06 100644 --- a/include/linux/vdpa.h +++ b/include/linux/vdpa.h @@ -89,6 +89,12 @@ struct vdpa_device { * @vdev: vdpa device * @idx: virtqueue index * Returns the notifcation area + * @get_vq_irq: Get the irq number of a virtqueue (optional, + * but must implemented if require vq irq offloading) + * @vdev: vdpa device + * @idx: virtqueue index + * Returns int: irq number of a virtqueue, + * negative number if no irq assigned. * @get_vq_align: Get the virtqueue align requirement * for the device * @vdev: vdpa device @@ -180,6 +186,7 @@ struct vdpa_config_ops { u64 (*get_vq_state)(struct vdpa_device *vdev, u16 idx); struct vdpa_notification_area (*get_vq_notification)(struct vdpa_device *vdev, u16 idx); + int (*get_vq_irq)(struct vdpa_device *vdv, u16 idx); /* Device ops */ u32 (*get_vq_align)(struct vdpa_device *vdev); |