mirror of https://gitee.com/openkylin/qemu.git
vhost: introduce new VhostOps vhost_vq_get_addr
This patch introduces new VhostOps vhost_vq_get_addr_op callback to get the vring addr from the backend Signed-off-by: Cindy Lu <lulu@redhat.com> Message-Id: <20200701145538.22333-9-lulu@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com>
This commit is contained in:
parent
ca71db438b
commit
35f20bb769
|
@ -34,6 +34,7 @@ struct vhost_vring_state;
|
|||
struct vhost_vring_addr;
|
||||
struct vhost_scsi_target;
|
||||
struct vhost_iotlb_msg;
|
||||
struct vhost_virtqueue;
|
||||
|
||||
typedef int (*vhost_backend_init)(struct vhost_dev *dev, void *opaque);
|
||||
typedef int (*vhost_backend_cleanup)(struct vhost_dev *dev);
|
||||
|
@ -113,6 +114,10 @@ typedef int (*vhost_set_inflight_fd_op)(struct vhost_dev *dev,
|
|||
struct vhost_inflight *inflight);
|
||||
|
||||
typedef int (*vhost_dev_start_op)(struct vhost_dev *dev, bool started);
|
||||
|
||||
typedef int (*vhost_vq_get_addr_op)(struct vhost_dev *dev,
|
||||
struct vhost_vring_addr *addr,
|
||||
struct vhost_virtqueue *vq);
|
||||
typedef struct VhostOps {
|
||||
VhostBackendType backend_type;
|
||||
vhost_backend_init vhost_backend_init;
|
||||
|
@ -154,6 +159,7 @@ typedef struct VhostOps {
|
|||
vhost_get_inflight_fd_op vhost_get_inflight_fd;
|
||||
vhost_set_inflight_fd_op vhost_set_inflight_fd;
|
||||
vhost_dev_start_op vhost_dev_start;
|
||||
vhost_vq_get_addr_op vhost_vq_get_addr;
|
||||
} VhostOps;
|
||||
|
||||
extern const VhostOps user_ops;
|
||||
|
|
Loading…
Reference in New Issue