From patchwork Tue May 23 16:35:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 685007 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1825118wrt; Tue, 23 May 2023 09:38:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4FSvm5OP9gP78LvIeVqUl7vjrd3NxsCSuBkIQW1yil2w+/M85jToBxiD5WTF5EFLxlK3XX X-Received: by 2002:a05:622a:134b:b0:3f4:f80b:8ded with SMTP id w11-20020a05622a134b00b003f4f80b8dedmr23348499qtk.50.1684859895046; Tue, 23 May 2023 09:38:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684859895; cv=none; d=google.com; s=arc-20160816; b=oIkMsm4L8zIQc/UqixD5LSAsssCHT47auVgMiNJcB4Hl4DhZaeSn+p8RKx67JSWNOP jR5Lpr8VfYP82z/rpx4ncq+/4pIpQF25b8HEKBrpt74o1/uEX+HPYNMRbfo5ScDdEZ2O 0KPRg7Olqu7IvwrR2wb6UPja1lXVJzjeZHosE2qXQUniubtirr4intfFt3+HtJJ2yg8b TuCZwYcH7dq1Gu/snmt1JQIdpui+LgUS7PO5bJsZgo8puc319n9qR3CEmT6qN2L5BAqL 8dkbr7kruaLHtEAUvRII+94GcEfOy39jPOwAFz/ydUDZQCM5a2vbD3W9B3S7IkJ6wWAn /34A== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=9Gn+HBFJ064NVzM7YmEXvqcvjJjkdoC6PwfC7PPhyMY=; b=pvjcdAKNCsFrodGx3Lv8VQ5WOZfmJQSwhVPhl4AALBGqvBiDBC1FhuNIbHSI71yUXR W+wj02dceDww3MewO2y8aoqCCkNtTN5V+H0bYK+ezlXEwC1W818WM61ZwQLBEAfBZLc6 nO+SqsMu8Tt89eoueAq2XeSdO8fA5B631XLPITKtCGuxcXl3ZOUlC2oxKTDFDmgwN+ce LoHi64KwT4kUxtXeQJEt5gHbrdGzc5FJjOXbNGBdic6W7k6CtLLWJP7oLPuTacN5jFoH g7RNPnONAeN52g7eSYDJhcqhFrrqyIIeOUByg1Qmrjwu3RyZDzhXtcHEW+x3H4RfX8Nc 7G7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SSqzoM0Q; 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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d8-20020a05622a05c800b003ef0551af53si5430585qtb.219.2023.05.23.09.38.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 May 2023 09:38:15 -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=@linaro.org header.s=google header.b=SSqzoM0Q; 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=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q1Uzv-0000fR-9D; Tue, 23 May 2023 12:36:31 -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 1q1Uzs-0000T6-Ri for qemu-devel@nongnu.org; Tue, 23 May 2023 12:36:29 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q1Uzk-0001bZ-H4 for qemu-devel@nongnu.org; Tue, 23 May 2023 12:36:26 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-3f6077660c6so792025e9.0 for ; Tue, 23 May 2023 09:36:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684859777; x=1687451777; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9Gn+HBFJ064NVzM7YmEXvqcvjJjkdoC6PwfC7PPhyMY=; b=SSqzoM0Q/DaDxV78ankhptGCeuezA4AZlLMlhIpKL0OlSZ5n+k8djkali1bO5Nt8rk uqZiG9gXa6mpA7KTCxflsp4VF+tFbojRkhycldXEU0gCrnigaqRNkPqBGW8xbVgw/UwP EC7FwUUgdm4INPzQLoNSb52uM1v3pn900OztBmLnaSd/URgSCVVfYknMld5UEUzBFfBS bo3VZPiJ3wRGyxD+I764aN+5nTkimi6Wf0+x+qS+yHkYIrDYJR4U8VMW5Dhwwo6I4rrb 3E6fdoBH9FzvNgznYby/K2aOWwAZ9Wd8cpTpYJTAJHZoo/MQ657ykBpwsmBLK0UCd39S hG+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684859777; x=1687451777; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9Gn+HBFJ064NVzM7YmEXvqcvjJjkdoC6PwfC7PPhyMY=; b=lcN/HGYwzpq1wIMfj8OGjfRDDnSstM4yqn6/JT5nCsZ0XPraJ9c438ijDgXc44HPAR j58scE+2/xwjsH1BKeoBPt2Cwr4PYxShEyMO4HFTI0y4Lo4KVLIOgqR3w1NcRhndAYY0 VQXFG0RVW42UXT1SfEzPbkm+4uuL3KJUxzRwojqFUmueMIGHJB/8YklE6OSq66oJX0ys cgOtOkiYhQ/A7aG4O+CNPOARrBTZzYb2A66i8g93Q3jGG8TQ9dz8x1uuvc6MGecmw8V6 3vs1hKMZr88FHybOa6gzcxWuuIw8ORkMoIZCHD+ONPsVyySGVgbvEtvO1H5WvQItpim8 D3mQ== X-Gm-Message-State: AC+VfDxQVVuDB/GS0CWqH3DNPS1ha5VmVLmIHUdfHwsbaTjmy83aPLiN XRRJNKKbFehnXHGmidT/a1nOK6vzKf19lObQd7g= X-Received: by 2002:a7b:cd01:0:b0:3f4:2327:53c2 with SMTP id f1-20020a7bcd01000000b003f4232753c2mr11349659wmj.19.1684859777178; Tue, 23 May 2023 09:36:17 -0700 (PDT) Received: from localhost.localdomain (vil69-h02-176-184-48-94.dsl.sta.abo.bbox.fr. [176.184.48.94]) by smtp.gmail.com with ESMTPSA id v16-20020a1cf710000000b003f4fe09aa43sm15572466wmh.8.2023.05.23.09.36.14 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 23 May 2023 09:36:16 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Raphael Norwitz , Peter Xu , Halil Pasic , Thomas Huth , "Gonglei (Arei)" , David Hildenbrand , Christian Borntraeger , Paolo Bonzini , "Michael S. Tsirkin" , Kevin Wolf , qemu-block@nongnu.org, Eric Farman , Fam Zheng , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Stefan Hajnoczi , Hanna Reitz , Cornelia Huck , Eric Auger , Ilya Leoshkevich , qemu-s390x@nongnu.org Subject: [PATCH 02/11] hw/scsi: Introduce VHOST_SCSI_COMMON symbol in Kconfig Date: Tue, 23 May 2023 18:35:51 +0200 Message-Id: <20230523163600.83391-3-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230523163600.83391-1-philmd@linaro.org> References: <20230523163600.83391-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_HELO_TEMPERROR=0.01 autolearn=unavailable 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 Instead of adding 'vhost-scsi-common.c' twice (for VHOST_SCSI and VHOST_USER_SCSI), have it depend on VHOST_SCSI_COMMON, selected by both symbols. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson --- hw/scsi/Kconfig | 6 ++++++ hw/scsi/meson.build | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/hw/scsi/Kconfig b/hw/scsi/Kconfig index e7b34dc8e2..1feab84c4c 100644 --- a/hw/scsi/Kconfig +++ b/hw/scsi/Kconfig @@ -48,13 +48,19 @@ config VIRTIO_SCSI depends on VIRTIO select SCSI +config VHOST_SCSI_COMMON + bool + depends on VIRTIO + config VHOST_SCSI bool default y + select VHOST_SCSI_COMMON depends on VIRTIO && VHOST_KERNEL config VHOST_USER_SCSI bool # Only PCI devices are provided for now default y if VIRTIO_PCI + select VHOST_SCSI_COMMON depends on VIRTIO && VHOST_USER && LINUX diff --git a/hw/scsi/meson.build b/hw/scsi/meson.build index 923a34f344..fa9198e69f 100644 --- a/hw/scsi/meson.build +++ b/hw/scsi/meson.build @@ -17,8 +17,10 @@ specific_scsi_ss = ss.source_set() virtio_scsi_ss = ss.source_set() virtio_scsi_ss.add(files('virtio-scsi.c', 'virtio-scsi-dataplane.c')) -virtio_scsi_ss.add(when: 'CONFIG_VHOST_SCSI', if_true: files('vhost-scsi-common.c', 'vhost-scsi.c')) -virtio_scsi_ss.add(when: 'CONFIG_VHOST_USER_SCSI', if_true: files('vhost-scsi-common.c', 'vhost-user-scsi.c')) + +virtio_scsi_ss.add(when: 'CONFIG_VHOST_SCSI_COMMON', if_true: files('vhost-scsi-common.c')) +virtio_scsi_ss.add(when: 'CONFIG_VHOST_SCSI', if_true: files('vhost-scsi.c')) +virtio_scsi_ss.add(when: 'CONFIG_VHOST_USER_SCSI', if_true: files('vhost-user-scsi.c')) specific_scsi_ss.add_all(when: 'CONFIG_VIRTIO_SCSI', if_true: virtio_scsi_ss) specific_scsi_ss.add(when: 'CONFIG_SPAPR_VSCSI', if_true: files('spapr_vscsi.c'))