summaryrefslogtreecommitdiffstats
path: root/hw/virtio/vhost-backend.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/virtio/vhost-backend.c')
-rw-r--r--hw/virtio/vhost-backend.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/virtio/vhost-backend.c b/hw/virtio/vhost-backend.c
index 48905383f8..782b1d67d9 100644
--- a/hw/virtio/vhost-backend.c
+++ b/hw/virtio/vhost-backend.c
@@ -15,6 +15,7 @@
#include "qemu/main-loop.h"
#include "standard-headers/linux/vhost_types.h"
+#include "hw/virtio/vhost-vdpa.h"
#ifdef CONFIG_VHOST_KERNEL
#include <linux/vhost.h>
#include <sys/ioctl.h>
@@ -286,6 +287,11 @@ int vhost_set_backend_type(struct vhost_dev *dev, VhostBackendType backend_type)
dev->vhost_ops = &user_ops;
break;
#endif
+#ifdef CONFIG_VHOST_VDPA
+ case VHOST_BACKEND_TYPE_VDPA:
+ dev->vhost_ops = &vdpa_ops;
+ break;
+#endif
default:
error_report("Unknown vhost backend type");
r = -1;