From nobody Fri Nov 7 15:25:58 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1548755045635797.1636719460281; Tue, 29 Jan 2019 01:44:05 -0800 (PST) Received: from localhost ([127.0.0.1]:46142 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goPw4-0000mp-7G for importer@patchew.org; Tue, 29 Jan 2019 04:44:04 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42591) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goPuZ-0008Pc-RA for qemu-devel@nongnu.org; Tue, 29 Jan 2019 04:42:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1goPuR-0002ee-NF for qemu-devel@nongnu.org; Tue, 29 Jan 2019 04:42:25 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35016) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1goPuQ-0002cp-G6; Tue, 29 Jan 2019 04:42:22 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4ECCF89AF1; Tue, 29 Jan 2019 09:42:21 +0000 (UTC) Received: from thuth.com (ovpn-116-120.ams2.redhat.com [10.36.116.120]) by smtp.corp.redhat.com (Postfix) with ESMTP id 581F15D97A; Tue, 29 Jan 2019 09:42:18 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org, yang.zhong@intel.com Date: Tue, 29 Jan 2019 10:42:14 +0100 Message-Id: <1548754934-6031-1-git-send-email-thuth@redhat.com> In-Reply-To: <20190128170819.4998232d.cohuck@redhat.com> References: <20190128170819.4998232d.cohuck@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 29 Jan 2019 09:42:21 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2] s390x: express dependencies with Kconfig X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pbonzini@redhat.com, qemu-s390x@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Instead of hard-coding all config switches in the config file default-configs/s390x-softmmu.mak, let's use the new Kconfig files to express the necessary dependencies: The S390_CCW_VIRTIO config switch for the "s390-ccw-virtio" machine now selects all non-optional devices. And since we already have the VIRTIO_PCI and VIRTIO_MMIO config switches for the other two virtio transports, this patch also introduces a new config switch VIRTIO_CCW for the third, s390x-specific virtio transport, so that all three virtio transports are now handled in the same way. Signed-off-by: Thomas Huth Acked-by: Cornelia Huck --- v2: - Use CONFIG_TERMINAL3270 for 3270-ccw.o - Use CONFIG_VIRTIO_CCW for all related devices in the Makefile default-configs/s390x-softmmu.mak | 12 ++++++++---- hw/s390x/Kconfig | 4 ++++ hw/s390x/Makefile.objs | 4 +++- hw/virtio/Kconfig | 4 ++++ 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/default-configs/s390x-softmmu.mak b/default-configs/s390x-soft= mmu.mak index 2be5059..08b1683 100644 --- a/default-configs/s390x-softmmu.mak +++ b/default-configs/s390x-softmmu.mak @@ -1,9 +1,13 @@ -CONFIG_PCI=3Dy +# Default configuration for s390x-softmmu + +# Optional devices: +# CONFIG_VIRTIO_PCI=3Dy -CONFIG_SCLPCONSOLE=3Dy CONFIG_TERMINAL3270=3Dy -CONFIG_S390_FLIC=3Dy CONFIG_WDT_DIAG288=3Dy -CONFIG_S390_CCW_VIRTIO=3Dy CONFIG_VFIO_CCW=3Dy CONFIG_VFIO_AP=3Dy + +# Boards: +# +CONFIG_S390_CCW_VIRTIO=3Dy diff --git a/hw/s390x/Kconfig b/hw/s390x/Kconfig index 303db7f..9a36c39 100644 --- a/hw/s390x/Kconfig +++ b/hw/s390x/Kconfig @@ -1,2 +1,6 @@ config S390_CCW_VIRTIO bool + select PCI + select S390_FLIC + select SCLPCONSOLE + select VIRTIO_CCW diff --git a/hw/s390x/Makefile.objs b/hw/s390x/Makefile.objs index a884aae..ac56a63 100644 --- a/hw/s390x/Makefile.objs +++ b/hw/s390x/Makefile.objs @@ -7,7 +7,8 @@ obj-y +=3D sclpcpu.o obj-y +=3D ipl.o obj-y +=3D css.o obj-y +=3D s390-virtio-ccw.o -obj-y +=3D 3270-ccw.o +obj-$(CONFIG_TERMINAL3270) +=3D 3270-ccw.o +ifeq ($(CONFIG_VIRTIO_CCW),y) obj-y +=3D virtio-ccw.o obj-$(CONFIG_VIRTIO_SERIAL) +=3D virtio-ccw-serial.o obj-$(CONFIG_VIRTIO_BALLOON) +=3D virtio-ccw-balloon.o @@ -20,6 +21,7 @@ obj-$(CONFIG_VIRTIO_NET) +=3D virtio-ccw-net.o obj-$(CONFIG_VIRTIO_BLK) +=3D virtio-ccw-blk.o obj-$(call land,$(CONFIG_VIRTIO_9P),$(CONFIG_VIRTFS)) +=3D virtio-ccw-9p.o obj-$(CONFIG_VHOST_VSOCK) +=3D vhost-vsock-ccw.o +endif obj-y +=3D css-bridge.o obj-y +=3D ccw-device.o obj-$(CONFIG_PCI) +=3D s390-pci-bus.o s390-pci-inst.o diff --git a/hw/virtio/Kconfig b/hw/virtio/Kconfig index 74f4573..e0452de 100644 --- a/hw/virtio/Kconfig +++ b/hw/virtio/Kconfig @@ -16,6 +16,10 @@ config VIRTIO_MMIO bool select VIRTIO =20 +config VIRTIO_CCW + bool + select VIRTIO + config VIRTIO_BALLOON bool default y --=20 1.8.3.1