aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2016-10-24 11:13:49 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2017-01-16 17:52:35 +0100
commita0f80010b37afc18030d43f2b96cc1e0b7588b73 (patch)
treec61bd5cf429ec11524f97ae895644e223b4d4a44 /hw
parent858d436665519095eb593081f8efd68ddc579b45 (diff)
downloadqemu-a0f80010b37afc18030d43f2b96cc1e0b7588b73.zip
qemu-a0f80010b37afc18030d43f2b96cc1e0b7588b73.tar.gz
qemu-a0f80010b37afc18030d43f2b96cc1e0b7588b73.tar.bz2
stubs: move vhost stubs to stubs/vhost.o
No need to include them in libqemustub.a, since only system emulators need them. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/Makefile.objs2
-rw-r--r--hw/virtio/Makefile.objs6
-rw-r--r--hw/virtio/vhost-stub.c7
3 files changed, 13 insertions, 2 deletions
diff --git a/hw/Makefile.objs b/hw/Makefile.objs
index 2a73ae5..7be399e 100644
--- a/hw/Makefile.objs
+++ b/hw/Makefile.objs
@@ -29,7 +29,7 @@ devices-dirs-$(CONFIG_SOFTMMU) += timer/
devices-dirs-$(CONFIG_TPM) += tpm/
devices-dirs-$(CONFIG_SOFTMMU) += usb/
devices-dirs-$(CONFIG_SOFTMMU) += vfio/
-devices-dirs-$(CONFIG_VIRTIO) += virtio/
+devices-dirs-$(CONFIG_SOFTMMU) += virtio/
devices-dirs-$(CONFIG_SOFTMMU) += watchdog/
devices-dirs-$(CONFIG_SOFTMMU) += xen/
devices-dirs-$(CONFIG_MEM_HOTPLUG) += mem/
diff --git a/hw/virtio/Makefile.objs b/hw/virtio/Makefile.objs
index 95c4c30..765d363 100644
--- a/hw/virtio/Makefile.objs
+++ b/hw/virtio/Makefile.objs
@@ -1,3 +1,4 @@
+ifeq ($(CONFIG_VIRTIO),y)
common-obj-y += virtio-rng.o
common-obj-$(CONFIG_VIRTIO_PCI) += virtio-pci.o
common-obj-y += virtio-bus.o
@@ -5,7 +6,10 @@ common-obj-y += virtio-mmio.o
obj-y += virtio.o virtio-balloon.o
obj-$(CONFIG_LINUX) += vhost.o vhost-backend.o vhost-user.o
-
obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock.o
obj-y += virtio-crypto.o
obj-$(CONFIG_VIRTIO_PCI) += virtio-crypto-pci.o
+endif
+
+common-obj-$(call lnot,$(CONFIG_LINUX)) += vhost-stub.o
+common-obj-$(CONFIG_ALL) += vhost-stub.o
diff --git a/hw/virtio/vhost-stub.c b/hw/virtio/vhost-stub.c
new file mode 100644
index 0000000..2d76cde
--- /dev/null
+++ b/hw/virtio/vhost-stub.c
@@ -0,0 +1,7 @@
+#include "qemu/osdep.h"
+#include "hw/virtio/vhost.h"
+
+bool vhost_has_free_slot(void)
+{
+ return true;
+}