aboutsummaryrefslogtreecommitdiff
path: root/stubs
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2015-10-06 10:37:27 +0200
committerMichael S. Tsirkin <mst@redhat.com>2015-10-22 14:34:48 +0300
commit2ce68e4cf5be9b5176a3c3c372948d6340724d2d (patch)
tree1454cb042a4b1ca1280dfda03bcaa1307dadb6f8 /stubs
parent052bd52fa978d3f04bc476137ad6e1b9a697f9bd (diff)
vhost: add vhost_has_free_slot() interface
it will allow for other parts of QEMU check if it's safe to map memory region during hotplug/runtime. That way hotplug path will have a chance to cancel hotplug operation instead of crashing in vhost_commit(). Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'stubs')
-rw-r--r--stubs/Makefile.objs1
-rw-r--r--stubs/vhost.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs
index 85e4e81017..ce6ce11ba2 100644
--- a/stubs/Makefile.objs
+++ b/stubs/Makefile.objs
@@ -39,3 +39,4 @@ stub-obj-y += cpus.o
stub-obj-y += kvm.o
stub-obj-y += qmp_pc_dimm_device_list.o
stub-obj-y += target-monitor-defs.o
+stub-obj-y += vhost.o
diff --git a/stubs/vhost.c b/stubs/vhost.c
new file mode 100644
index 0000000000..d346b856f5
--- /dev/null
+++ b/stubs/vhost.c
@@ -0,0 +1,6 @@
+#include "hw/virtio/vhost.h"
+
+bool vhost_has_free_slot(void)
+{
+ return true;
+}