Skip to content

Commit

Permalink
configure: simplify vhost condition with Kconfig
Browse files Browse the repository at this point in the history
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
elmarco authored and bonzini committed Dec 17, 2019
1 parent 95c5f2d commit 21c6b0c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions Kconfig.host
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ config TPM

config VHOST_USER
bool
select VHOST

config VHOST_KERNEL
bool
select VHOST

config XEN
bool
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,7 @@ MINIKCONF_ARGS = \
CONFIG_OPENGL=$(CONFIG_OPENGL) \
CONFIG_X11=$(CONFIG_X11) \
CONFIG_VHOST_USER=$(CONFIG_VHOST_USER) \
CONFIG_VHOST_KERNEL=$(CONFIG_VHOST_KERNEL) \
CONFIG_VIRTFS=$(CONFIG_VIRTFS) \
CONFIG_LINUX=$(CONFIG_LINUX) \
CONFIG_PVRDMA=$(CONFIG_PVRDMA)
Expand Down
3 changes: 3 additions & 0 deletions hw/virtio/Kconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
config VHOST
bool

config VIRTIO
bool

Expand Down
4 changes: 2 additions & 2 deletions hw/virtio/Makefile.objs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ ifeq ($(CONFIG_VIRTIO),y)
common-obj-y += virtio-bus.o
obj-y += virtio.o

obj-$(call lor,$(CONFIG_VHOST_USER),$(CONFIG_VHOST_KERNEL)) += vhost.o vhost-backend.o
common-obj-$(call lnot,$(call lor,$(CONFIG_VHOST_USER),$(CONFIG_VHOST_KERNEL))) += vhost-stub.o
obj-$(CONFIG_VHOST) += vhost.o vhost-backend.o
common-obj-$(call lnot,$(CONFIG_VHOST)) += vhost-stub.o
obj-$(CONFIG_VHOST_USER) += vhost-user.o

common-obj-$(CONFIG_VIRTIO_RNG) += virtio-rng.o
Expand Down

0 comments on commit 21c6b0c

Please sign in to comment.