From 2ce68e4cf5be9b5176a3c3c372948d6340724d2d Mon Sep 17 00:00:00 2001 From: Igor Mammedov Date: Tue, 6 Oct 2015 10:37:27 +0200 Subject: 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 Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- stubs/Makefile.objs | 1 + stubs/vhost.c | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 stubs/vhost.c (limited to 'stubs') 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; +} -- cgit v1.2.3-55-g7522