From patchwork Mon Mar 4 18:20:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 10838509 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DBC3313B5 for ; Mon, 4 Mar 2019 20:10:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C7EBA2B33F for ; Mon, 4 Mar 2019 20:10:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C634B2B398; Mon, 4 Mar 2019 20:10:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4DDCE2B4BB for ; Mon, 4 Mar 2019 20:10:18 +0000 (UTC) Received: from localhost ([127.0.0.1]:60267 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h0tuj-0001wT-A8 for patchwork-qemu-devel@patchwork.kernel.org; Mon, 04 Mar 2019 15:10:17 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46381) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h0sD7-0002UB-FI for qemu-devel@nongnu.org; Mon, 04 Mar 2019 13:21:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h0sD5-00059i-Tw for qemu-devel@nongnu.org; Mon, 04 Mar 2019 13:21:09 -0500 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:43410) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h0sD4-0004vA-JZ for qemu-devel@nongnu.org; Mon, 04 Mar 2019 13:21:07 -0500 Received: by mail-wr1-x441.google.com with SMTP id d17so6638313wre.10 for ; Mon, 04 Mar 2019 10:21:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=SRwyIvW+u5c0BibQ8SjXniAV6J1NU4E+SgBz35m2GG0=; b=iPATjdsKBNgXKUj/zWul5OwPP2JqC1Kf+Hy5S4hXprghq3/OyCYMfFW0VBuLavjz5a TgeDvSt0UTjrWuJ7BvtoPQIAwcOrJTtazNOYk8ziiXubak77Z+BWjDqn5PmDDAaagsZ1 n8j0CCMJ1XdUzCqzJOoqtvFUk5GrcqlTSv5mke2B4k9E37MzdhMlAbF0OxJLeY6tPMZU 5Ms/9zNZBH5g+zXUKaNbiD0Ror929Z4fZmXvEOJnoaUO6FyW1ebdedEOlyLGgbEpK9ok EM85Gvjl23n37wUprxPgDId04QrIS30Mr0Bt3b+qI2VPKN37BugX7joGBgVDO5y8FT3A ydVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=SRwyIvW+u5c0BibQ8SjXniAV6J1NU4E+SgBz35m2GG0=; b=kcR2Klw2pxmfPLM6UFjd5zZ08BP7ej8eLGjNbjbevMDdzwqpmiLbmrVt2rNbQnRvpr 9igw/M5W+xnvCoCLm0a53ugse1/zD5N0jw7suQHWiisYzHbR+acBSTx/ZZrDvPmigB8C B/xIY0GSCX6KDZIonsmKaUIZfNbE1kr+/MDbW3iUEq1nE/F3lX/iN0MRy4pLib6jGLR4 /R+cuywoaALrnWTUNMrA5qIrKxNvMgB4j5Qv+BRBgOoPAYVf4qGWReDSEWBne4QxQmu+ SVG8KVwT390B6YwdMFgHxl02p0/eWRMPlLZTIVtiQCQ1vEI+00+OsjwGNoollTUFRNeM RQKw== X-Gm-Message-State: APjAAAU7rhQWU3pDGN0xKVv92mS0as8bMiwA/I7eEU9vibZOWO/9U/0p RTETL2a495aeClc+G44tv8Ur6hjq X-Google-Smtp-Source: APXvYqxIdaun9kC+UVxlAonqC7tP++nMo22XupqXycVT54l8DnZaMl7fqlFOOtcR/l9YlZ6jlnu7uQ== X-Received: by 2002:a5d:570a:: with SMTP id a10mr10094947wrv.85.1551723660562; Mon, 04 Mar 2019 10:21:00 -0800 (PST) Received: from 640k.lan ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id q5sm8371364wrn.43.2019.03.04.10.20.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Mar 2019 10:21:00 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Mon, 4 Mar 2019 19:20:07 +0100 Message-Id: <1551723614-1823-48-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1551723614-1823-1-git-send-email-pbonzini@redhat.com> References: <1551723614-1823-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::441 Subject: [Qemu-devel] [PULL 47/54] 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: Yang Zhong , thuth@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Thomas Huth 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 Signed-off-by: Paolo Bonzini --- default-configs/s390x-softmmu.mak | 20 ++++++++++++-------- hw/s390x/Kconfig | 9 +++++++++ hw/s390x/Makefile.objs | 4 +++- hw/virtio/Kconfig | 4 ++++ 4 files changed, 28 insertions(+), 9 deletions(-) diff --git a/default-configs/s390x-softmmu.mak b/default-configs/s390x-softmmu.mak index 2be5059..f2287a1 100644 --- a/default-configs/s390x-softmmu.mak +++ b/default-configs/s390x-softmmu.mak @@ -1,9 +1,13 @@ -CONFIG_PCI=y -CONFIG_VIRTIO_PCI=y -CONFIG_SCLPCONSOLE=y -CONFIG_TERMINAL3270=y -CONFIG_S390_FLIC=y -CONFIG_WDT_DIAG288=y +# Default configuration for s390x-softmmu + +# Uncomment the following lines to disable these optional devices: +# +#CONFIG_TERMINAL3270=n +#CONFIG_VFIO_AP=n +#CONFIG_VFIO_CCW=n +#CONFIG_VIRTIO_PCI=n +#CONFIG_WDT_DIAG288=n + +# Boards: +# CONFIG_S390_CCW_VIRTIO=y -CONFIG_VFIO_CCW=y -CONFIG_VFIO_AP=y diff --git a/hw/s390x/Kconfig b/hw/s390x/Kconfig index 303db7f..a7046ea 100644 --- a/hw/s390x/Kconfig +++ b/hw/s390x/Kconfig @@ -1,2 +1,11 @@ config S390_CCW_VIRTIO bool + imply VIRTIO_PCI + imply TERMINAL3270 + imply VFIO_AP + imply VFIO_CCW + imply WDT_DIAG288 + select PCI + select S390_FLIC + select SCLPCONSOLE + select VIRTIO_CCW diff --git a/hw/s390x/Makefile.objs b/hw/s390x/Makefile.objs index bfd5326..e02ed80 100644 --- a/hw/s390x/Makefile.objs +++ b/hw/s390x/Makefile.objs @@ -6,7 +6,8 @@ obj-y += sclpcpu.o obj-y += ipl.o obj-y += css.o obj-$(CONFIG_S390_CCW_VIRTIO) += s390-virtio-ccw.o -obj-y += 3270-ccw.o +obj-$(CONFIG_TERMINAL3270) += 3270-ccw.o +ifeq ($(CONFIG_VIRTIO_CCW),y) obj-y += virtio-ccw.o obj-$(CONFIG_VIRTIO_SERIAL) += virtio-ccw-serial.o obj-$(CONFIG_VIRTIO_BALLOON) += virtio-ccw-balloon.o @@ -19,6 +20,7 @@ obj-$(CONFIG_VIRTIO_NET) += virtio-ccw-net.o obj-$(CONFIG_VIRTIO_BLK) += virtio-ccw-blk.o obj-$(call land,$(CONFIG_VIRTIO_9P),$(CONFIG_VIRTFS)) += virtio-ccw-9p.o obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock-ccw.o +endif obj-y += css-bridge.o obj-y += ccw-device.o obj-y += 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 +config VIRTIO_CCW + bool + select VIRTIO + config VIRTIO_BALLOON bool default y