From patchwork Mon Jun 26 12:28:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 696442 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp3204422wrm; Mon, 26 Jun 2023 05:42:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6hKYQARi5vXxbqYPVBCRJYUUbPcdBoq5qL3gbXTyfVIb7fm7mZ7xW0y5odzwi4DboyHZ0W X-Received: by 2002:adf:e408:0:b0:313:ec90:ac23 with SMTP id g8-20020adfe408000000b00313ec90ac23mr3925485wrm.13.1687783337032; Mon, 26 Jun 2023 05:42:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687783337; cv=none; d=google.com; s=arc-20160816; b=nD+yt0HGZ9QBMfGt1kRFH95Cz0YObQafmVRsQqQuqCilc7ijeEs+BMoE3YACjkD3Lu aFt07mV5zUv6mYEe1Ly45K1flvLj7WSn4fbB11uWyzQA+Tx+kMiDuR7Hdg1WS5U00lzv xnNHQQRoIVB8728xT8xdyPM0mbdx9Ggqk4AT76od/RhyNt8BPaZXZcPMKf1wmObYNDtu RcX2FGDVB1Vrp5SkQvhDIDJr2z1UxVmqTaSKP1z/E0xzV2I+1NwSCLRvF6Sj2RnsCf/W 4xJkVrTEZSMAqU4lsP75AtKLyb4WFTFDKtyUFSfH5fVf8zvwMMGSX7mT6r/Os5rQgorf JXaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=UxG3vkztDABFKvGFJuiCrBUuGxHDzYPIW6GxfE8K+J0=; fh=PE4Ozx9cgVTQCTEz70X0bwdgh0Ur8aBFfKMT4qfNRzk=; b=kuXJlBsouuCmujGPe5oj1AN1ZCGNDxRNX5n/aZRKffQfMYoaz/RGgALha50Eadp5+x paDQb+lzVR73+pF7qluHE4WBYvyMhkZPuVEHdVTUUVSPJPlYYsu+0cuS2atjqbnLneJo GcXq8cefR8b7q8laMRy4fU52tKN4JIvPwl3ckc95M/ZHokohmvEvU74knm5wQTEAoWh/ Ciy4L7EhKfvlcCW2Sab6VmONMCC/trcIIldp9ijqgPkec05ZqHv8fAqHokIDX6oMZwOJ eItAsUzxhpGjogHbwX+WKbdLYpSEdjdMRPOjyxccttLQx5JDhEQvquXrq6YLAs0026Gb Bu6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TSddZMnL; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a10-20020a5d508a000000b003111a9a8dc0si3462730wrt.796.2023.06.26.05.42.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 26 Jun 2023 05:42:17 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TSddZMnL; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDlND-00066D-L5; Mon, 26 Jun 2023 08:31:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qDlKr-0002CF-Of for qemu-devel@nongnu.org; Mon, 26 Jun 2023 08:28:50 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qDlKo-0002zV-Se for qemu-devel@nongnu.org; Mon, 26 Jun 2023 08:28:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687782526; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UxG3vkztDABFKvGFJuiCrBUuGxHDzYPIW6GxfE8K+J0=; b=TSddZMnLu+YXOfm0ut1JT1NL8EXkJ3etaMr3/9iUvTbueLxo0nfkbH1S8wd0+SYYo6BpCq PLPJZb9zlvk/mqfS3sFvG91K1fa/0Z7gJ9FUt5iOJ7MSlRRDlKYRiPNCvfqJh6vJE6bqyI vYT+t4lBKghNqBvGlxwbVWhXXlUlQWU= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-635-6TMIWX7CNlqdtwGEamHPFw-1; Mon, 26 Jun 2023 08:28:44 -0400 X-MC-Unique: 6TMIWX7CNlqdtwGEamHPFw-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-3f810b4903fso19812955e9.2 for ; Mon, 26 Jun 2023 05:28:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687782523; x=1690374523; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=UxG3vkztDABFKvGFJuiCrBUuGxHDzYPIW6GxfE8K+J0=; b=TZmxz6xNrAaFgGURWi9tyu+uZUM0UtX2bhb1vZKrkaZYnqYgConPxz2EczsxfBu2+h zHV9DXOz8yQmpqAKMIKNGDSvFIMpEiDra6Q8rP64+lyBQ3CZb5318Xb6Q7Sa3gPf9EXj cQH8CK7av9JmB1cbVVu+Zdwx2uIYq5O7tqf5HHTSgHFitCrjXAs4qLXcF8hBZyFv9m3M G4vVDAUhcLRwzOPcNGhDLRIJEQZat5fygqTRujnn5VGziHHU20ulIeTLWQ0B8O5jogeL 0IdhcIMWAnIU05aQdwMGbiZsHd5dLd5a9Jow+ZILP9Xo3ZQRKikTGb8Uz8j7uHfMFeTg XDow== X-Gm-Message-State: AC+VfDzXtT1aKZWvh7W91sMkFmqlmD1kua96Yu6/Gd62csNd9Ic/DMoW vSx5ccQMfPqtcDVAJgtGQbMadmUuq4mLvjUUt0GrawHlyeQif+wpnODQSM1sbeORElj2Z/oUGKg hfnxPqHE1dQmx2cJjJOZvBLOausCQ4N2PYyD4r3qH5LQ1qCadlf9kKXtL/Ql37opq6KWH X-Received: by 2002:a05:600c:21c5:b0:3fa:1af8:6ebf with SMTP id x5-20020a05600c21c500b003fa1af86ebfmr10093464wmj.0.1687782523429; Mon, 26 Jun 2023 05:28:43 -0700 (PDT) X-Received: by 2002:a05:600c:21c5:b0:3fa:1af8:6ebf with SMTP id x5-20020a05600c21c500b003fa1af86ebfmr10093447wmj.0.1687782523203; Mon, 26 Jun 2023 05:28:43 -0700 (PDT) Received: from redhat.com ([2.52.156.102]) by smtp.gmail.com with ESMTPSA id a10-20020a1cf00a000000b003f8fb02c413sm7601442wmb.8.2023.06.26.05.28.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 05:28:42 -0700 (PDT) Date: Mon, 26 Jun 2023 08:28:40 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Philippe =?utf-8?q?Mathieu-Dau?= =?utf-8?q?d=C3=A9?= , Richard Henderson , Thomas Huth , Alex =?utf-8?q?Benn=C3=A9e?= , Stefano Garzarella , Paolo Bonzini Subject: [PULL 17/53] hw/virtio: Introduce VHOST_VSOCK_COMMON symbol in Kconfig Message-ID: <6df956299a751c1eff03a8ea791a0182a688a7cc.1687782442.git.mst@redhat.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Received-SPF: pass client-ip=170.10.129.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé 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é Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Message-Id: <20230524093744.88442-6-philmd@linaro.org> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Alex Bennée Reviewed-by: Stefano Garzarella --- 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 e83c37fffd..a6ea5beae7 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'))