From 9b1d929adb24bc4e613447c0fcc70479154e488f Mon Sep 17 00:00:00 2001 From: Tiberiu Georgescu Date: Mon, 9 Aug 2021 13:40:15 +0000 Subject: 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 Signed-off-by: Tiberiu Georgescu Message-Id: <20210809134015.67941-1-tiberiu.georgescu@nutanix.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/vhost.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/hw/virtio/vhost.h') diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h index 045d0fd9f2..5ee306568b 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]; -- cgit v1.2.3