Skip to contentSkip to conversation

configure: simplify vhost condition with Kconfig

PATCH Superseded Paolo Bonzini 2 participants 3 messages Dec 11, 2019 – Dec 12, 2019

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure: simplify vhost condition with Kconfig

From: Marc-André Lureau <[email protected]>

---
 Kconfig.host            | 5 +++++
 hw/virtio/Kconfig       | 3 +++
 hw/virtio/Makefile.objs | 4 ++--
 3 files changed, 10 insertions(+), 2 deletions(-)
Kconfig.host +5 -0
index bb6e116..55136e0 100644
@@ -25,6 +25,11 @@ config TPM
 
 config VHOST_USER
     bool
+    select VHOST
+
+config VHOST_KERNEL
+    bool
+    select VHOST
 
 config XEN
     bool
hw/virtio/Kconfig +3 -0
index 3724ff8..f87def2 100644
@@ -1,3 +1,6 @@
+config VHOST
+    bool
+
 config VIRTIO
     bool
 
hw/virtio/Makefile.objs +2 -2
index e2f70fb..de0f5fc 100644
@@ -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
Signature · 1 line
1.8.3.1
#1 lore raw
Quoted 15 lines · Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 Kconfig.host            | 5 +++++
 hw/virtio/Kconfig       | 3 +++
 hw/virtio/Makefile.objs | 4 ++--
 3 files changed, 10 insertions(+), 2 deletions(-)
Kconfig.host +0 -0
index bb6e116..55136e0 100644

Kconfig.host config TPM · line 32

Quoted 8 lines
Kconfig.host +5 -0
@@ -25,6 +25,11 @@ config TPM
 
 config VHOST_USER
     bool
+    select VHOST
+
+config VHOST_KERNEL
+    bool
+    select VHOST

Don't you also have to add it to MINIKCONF_ARGS in the main Makefile??

Thomas

#2 lore raw
Quoted 17 lines · Thomas Huth
Quoted 16 lines · Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 Kconfig.host            | 5 +++++
 hw/virtio/Kconfig       | 3 +++
 hw/virtio/Makefile.objs | 4 ++--
 3 files changed, 10 insertions(+), 2 deletions(-)
Kconfig.host +0 -0
index bb6e116..55136e0 100644
@@ -25,6 +25,11 @@ config TPM
 
Quoted 9 lines

Kconfig.host config TPM · line 32

Quoted 7 lines
Kconfig.host +5 -0
 config VHOST_USER
     bool
+    select VHOST
+
+config VHOST_KERNEL
+    bool
+    select VHOST

Don't you also have to add it to MINIKCONF_ARGS in the main Makefile??

Yes, I do.

Paolo