[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 05/11] hw/virtio: Introduce VHOST_VSOCK_COMMON symbol in Kconfig
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 05/11] hw/virtio: Introduce VHOST_VSOCK_COMMON symbol in Kconfig |
Date: |
Tue, 23 May 2023 18:35:54 +0200 |
Instead of adding 'vhost-vsock-common.c' twice (for VHOST_VSOCK
and VHOST_USER_VSOCK), have it depend on VHOST_VSOCK_COMMON,
selected by both symbols.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/virtio/Kconfig | 6 ++++++
hw/virtio/meson.build | 5 +++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/hw/virtio/Kconfig b/hw/virtio/Kconfig
index 89e9e426d8..de7a35429a 100644
--- a/hw/virtio/Kconfig
+++ b/hw/virtio/Kconfig
@@ -56,14 +56,20 @@ config VIRTIO_MEM
depends on VIRTIO_MEM_SUPPORTED
select MEM_DEVICE
+config VHOST_VSOCK_COMMON
+ bool
+ depends on VIRTIO
+
config VHOST_VSOCK
bool
default y
+ select VHOST_VSOCK_COMMON
depends on VIRTIO && VHOST_KERNEL
config VHOST_USER_VSOCK
bool
default y
+ select VHOST_VSOCK_COMMON
depends on VIRTIO && VHOST_USER
config VHOST_USER_I2C
diff --git a/hw/virtio/meson.build b/hw/virtio/meson.build
index bdec78bfc6..54c90c24fb 100644
--- a/hw/virtio/meson.build
+++ b/hw/virtio/meson.build
@@ -23,8 +23,9 @@ specific_virtio_ss.add(when: 'CONFIG_VIRTIO_BALLOON',
if_true: files('virtio-bal
specific_virtio_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true:
files('virtio-crypto.c'))
specific_virtio_ss.add(when: 'CONFIG_VHOST_USER_FS', if_true:
files('vhost-user-fs.c'))
specific_virtio_ss.add(when: 'CONFIG_VIRTIO_PMEM', if_true:
files('virtio-pmem.c'))
-specific_virtio_ss.add(when: 'CONFIG_VHOST_VSOCK', if_true:
files('vhost-vsock.c', 'vhost-vsock-common.c'))
-specific_virtio_ss.add(when: 'CONFIG_VHOST_USER_VSOCK', if_true:
files('vhost-user-vsock.c', 'vhost-vsock-common.c'))
+specific_virtio_ss.add(when: 'CONFIG_VHOST_VSOCK_COMMON', if_true:
files('vhost-vsock-common.c'))
+specific_virtio_ss.add(when: 'CONFIG_VHOST_VSOCK', if_true:
files('vhost-vsock.c'))
+specific_virtio_ss.add(when: 'CONFIG_VHOST_USER_VSOCK', if_true:
files('vhost-user-vsock.c'))
specific_virtio_ss.add(when: 'CONFIG_VIRTIO_RNG', if_true:
files('virtio-rng.c'))
specific_virtio_ss.add(when: 'CONFIG_VIRTIO_IOMMU', if_true:
files('virtio-iommu.c'))
specific_virtio_ss.add(when: 'CONFIG_VIRTIO_MEM', if_true:
files('virtio-mem.c'))
--
2.38.1
- [PATCH 00/11] hw/virtio: Build various target-agnostic objects just once, Philippe Mathieu-Daudé, 2023/05/23
- [PATCH 01/11] softmmu: Introduce qemu_target_page_mask/qemu_target_page_align helpers, Philippe Mathieu-Daudé, 2023/05/23
- [PATCH 02/11] hw/scsi: Introduce VHOST_SCSI_COMMON symbol in Kconfig, Philippe Mathieu-Daudé, 2023/05/23
- [PATCH 04/11] hw/scsi: Rename target-specific source set as 'specific_virtio_scsi_ss', Philippe Mathieu-Daudé, 2023/05/23
- [PATCH 03/11] hw/scsi: Rearrange meson.build, Philippe Mathieu-Daudé, 2023/05/23
- [PATCH 05/11] hw/virtio: Introduce VHOST_VSOCK_COMMON symbol in Kconfig,
Philippe Mathieu-Daudé <=
- [PATCH 06/11] hw/virtio/virtio-mem: Use qemu_ram_get_fd() helper, Philippe Mathieu-Daudé, 2023/05/23
- [PATCH 08/11] hw/virtio/virtio-iommu: Use target-agnostic qemu_target_page_mask(), Philippe Mathieu-Daudé, 2023/05/23
- [PATCH 07/11] hw/virtio/vhost-vsock: Include missing 'virtio/virtio-bus.h' header, Philippe Mathieu-Daudé, 2023/05/23
- [PATCH 09/11] hw/virtio: Remove unnecessary 'virtio-access.h' header, Philippe Mathieu-Daudé, 2023/05/23