diff options
author | Tiberiu Georgescu <tiberiu.georgescu@nutanix.com> | 2021-08-09 13:40:15 +0000 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2021-09-04 09:07:46 -0400 |
commit | 9b1d929adb24bc4e613447c0fcc70479154e488f (patch) | |
tree | 989f9c59d41761f569f7a72485fdd959943aa720 /include | |
parent | fe8adae3455c3e43473bc23b00d257f6d41d24c3 (diff) | |
download | qemu-9b1d929adb24bc4e613447c0fcc70479154e488f.zip qemu-9b1d929adb24bc4e613447c0fcc70479154e488f.tar.gz qemu-9b1d929adb24bc4e613447c0fcc70479154e488f.tar.bz2 |
hw/virtio: move vhost_set_backend_type() to vhost.c
Just a small refactor patch.
vhost_set_backend_type() gets called only in vhost.c, so we can move the
function there and make it static. We can then extern the visibility of
kernel_ops, to match the other VhostOps in vhost-backend.h.
The VhostOps constants now make more sense in vhost.h
Suggested-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Signed-off-by: Tiberiu Georgescu <tiberiu.georgescu@nutanix.com>
Message-Id: <20210809134015.67941-1-tiberiu.georgescu@nutanix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/virtio/vhost-backend.h | 6 | ||||
-rw-r--r-- | include/hw/virtio/vhost.h | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/include/hw/virtio/vhost-backend.h b/include/hw/virtio/vhost-backend.h index 8475c5a..81bf310 100644 --- a/include/hw/virtio/vhost-backend.h +++ b/include/hw/virtio/vhost-backend.h @@ -173,12 +173,6 @@ typedef struct VhostOps { vhost_force_iommu_op vhost_force_iommu; } VhostOps; -extern const VhostOps user_ops; -extern const VhostOps vdpa_ops; - -int vhost_set_backend_type(struct vhost_dev *dev, - VhostBackendType backend_type); - int vhost_backend_update_device_iotlb(struct vhost_dev *dev, uint64_t iova, uint64_t uaddr, uint64_t len, diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h index 045d0fd..5ee3065 100644 --- a/include/hw/virtio/vhost.h +++ b/include/hw/virtio/vhost.h @@ -95,6 +95,10 @@ struct vhost_dev { const VhostDevConfigOps *config_ops; }; +extern const VhostOps kernel_ops; +extern const VhostOps user_ops; +extern const VhostOps vdpa_ops; + struct vhost_net { struct vhost_dev dev; struct vhost_virtqueue vqs[2]; |