diff options
| author | Cindy Lu <lulu@redhat.com> | 2021-11-05 00:48:22 +0800 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2022-01-06 06:11:39 -0500 |
| commit | 634f7c89fbd78f57d00d5d6b39c0ade9df1fe27f (patch) | |
| tree | 6104168d6b802e69aceafe34247d06a856face11 /hw/virtio/vhost-vdpa.c | |
| parent | 88062372340d33090b7f089ed3b1a00f530a8914 (diff) | |
| download | focaccia-qemu-634f7c89fbd78f57d00d5d6b39c0ade9df1fe27f.tar.gz focaccia-qemu-634f7c89fbd78f57d00d5d6b39c0ade9df1fe27f.zip | |
vhost-vdpa: add support for config interrupt
Add new call back function in vhost-vdpa, this function will set the event fd to kernel. This function will be called in the vhost_dev_start and vhost_dev_stop Signed-off-by: Cindy Lu <lulu@redhat.com> Message-Id: <20211104164827.21911-6-lulu@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/virtio/vhost-vdpa.c')
| -rw-r--r-- | hw/virtio/vhost-vdpa.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index bcaf00e09f..0a4a83713c 100644 --- a/hw/virtio/vhost-vdpa.c +++ b/hw/virtio/vhost-vdpa.c @@ -725,6 +725,12 @@ static int vhost_vdpa_set_vring_call(struct vhost_dev *dev, trace_vhost_vdpa_set_vring_call(dev, file->index, file->fd); return vhost_vdpa_call(dev, VHOST_SET_VRING_CALL, file); } +static int vhost_vdpa_set_config_call(struct vhost_dev *dev, + int fd) +{ + trace_vhost_vdpa_set_config_call(dev, fd); + return vhost_vdpa_call(dev, VHOST_VDPA_SET_CONFIG_CALL, &fd); +} static int vhost_vdpa_get_features(struct vhost_dev *dev, uint64_t *features) @@ -795,4 +801,5 @@ const VhostOps vdpa_ops = { .vhost_get_device_id = vhost_vdpa_get_device_id, .vhost_vq_get_addr = vhost_vdpa_vq_get_addr, .vhost_force_iommu = vhost_vdpa_force_iommu, + .vhost_set_config_call = vhost_vdpa_set_config_call, }; |