From patchwork Thu Dec 27 06:33:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Zhong X-Patchwork-Id: 10743473 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 6EAB0746 for ; Thu, 27 Dec 2018 06:39:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5C8BE284D2 for ; Thu, 27 Dec 2018 06:39:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4D6F3287C6; Thu, 27 Dec 2018 06:39:42 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EEBE3284D2 for ; Thu, 27 Dec 2018 06:39:36 +0000 (UTC) Received: from localhost ([127.0.0.1]:49729 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gcPKS-0007my-3b for patchwork-qemu-devel@patchwork.kernel.org; Thu, 27 Dec 2018 01:39:36 -0500 Received: from eggs.gnu.org ([208.118.235.92]:54666) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gcPG6-0002kw-Nd for qemu-devel@nongnu.org; Thu, 27 Dec 2018 01:35:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gcPG0-0003w2-V5 for qemu-devel@nongnu.org; Thu, 27 Dec 2018 01:35:06 -0500 Received: from mga11.intel.com ([192.55.52.93]:57843) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gcPG0-0003kp-DU for qemu-devel@nongnu.org; Thu, 27 Dec 2018 01:35:00 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Dec 2018 22:34:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,404,1539673200"; d="scan'208";a="103617217" Received: from he.bj.intel.com ([10.238.157.85]) by orsmga006.jf.intel.com with ESMTP; 26 Dec 2018 22:34:54 -0800 From: Yang Zhong To: qemu-devel@nongnu.org Date: Thu, 27 Dec 2018 14:33:54 +0800 Message-Id: <20181227063419.12981-1-yang.zhong@intel.com> X-Mailer: git-send-email 2.17.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 192.55.52.93 Subject: [Qemu-devel] [RFC PATCH 00/25] Support Kconfig in QEMU 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@intel.com, peter.maydell@linaro.org, thuth@redhat.com, sameo@linux.intel.com, pbonzini@redhat.com, ehabkost@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Happy Christmas && Happy New Year! This Kconfig implementation is rebased from Paolo's branch https://github.com/bonzini/qemu/commits/kconfig I only rebased the x86 platform related arch and extended devices definitions https://github.com/yangzhon/qemu/commits/topic/upstream/Kconfig The current RFC patches only support (*) x86_64 platform Once design is fixed, we can do other archs. (*) defconfig "randconfig" build has some issues, which are mostly related with CONFIG* in Kconfig.host abd configure. In randconfig mode, some CONFIG* has different setting value in config-host.mak and %/config-device.mak, which make QEMU build failure. (*) Kconfig in hw/ directory The current configure and build command are same with previous commands and if we want to disable or enable some features, like "tcg", we still need add "--enable/--disable-tcg" in configure command line. If we want to disable one emulation device, we can disable this in related Kconfig file in hw/ directory. The current build command (*) ./configure --target-list=x86_64-softmmu (*) make Since the Kconfig language replace traditional CONFIG_* in default-config/%-softmmu.mak, the %-softmmu.mak file only define embeded boards or machines, like 440fx and Q35 in x86_64 platform. The Kconfig has already defined dependency topology between different Kconfig files, but there are still some issues (*) Kconfig for configure(config-host.mak) Some CONFIG* in configure need some logic to generate, those are hard to input this CONFIG* in Kconfig.host or Kconfig* file. (*) Kconfig for %config-target.mak The CONFIG* in %/config-target.mak file, this is still related with configure. (*) randconfig support issue. Before this RFC patches, we have talked Kconfig in another thread http://lists.nongnu.org/archive/html/qemu-devel/2018-09/msg02827.html Please give your comments on this RFC thread, many thanks! Paolo Bonzini (18): build: actually use CONFIG_PAM hw/i386/Makefile.objs: Build pc_piix* and pc_q35 boards minikconfig: add parser skeleton minikconfig: add AST minikconfig: add semantic analysis kconfig: introduce kconfig files build: switch to Kconfig ide: express dependencies with Kconfig build: convert pci.mak to Kconfig build: convert sound.mak to Kconfig build: convert usb.mak to Kconfig scsi: express dependencies with Kconfig bluetooth: express dependencies with Kconfig isa: express dependencies with kconfig i386: express dependencies with Kconfig i2c: express dependencies with Kconfig ptimer: express dependencies with Kconfig minikconf: implement allyesconfig, allnoconfig, randconfig, defconfig Yang Zhong (7): hw/display: make edid configurable edid: express dependencies with kconfig hyperv: express dependencies with kconfig virtio: make virtio dependencies with Kconfig i386-softmmu.mak: remove all CONFIG_* except boards definitions x86_64-softmmu.mak: remove i386-softmmu.mak include Makefile: only support defconfig Kconfig.host | 24 + Makefile | 19 +- Makefile.target | 7 +- default-configs/hyperv.mak | 2 - default-configs/i386-softmmu.mak | 72 +-- default-configs/pci.mak | 49 --- default-configs/sound.mak | 4 - default-configs/usb.mak | 11 - default-configs/x86_64-softmmu.mak | 6 +- hw/9pfs/Kconfig | 4 + hw/Kconfig | 50 +++ hw/Makefile.objs | 4 +- hw/acpi/Kconfig | 26 ++ hw/adc/Kconfig | 2 + hw/audio/Kconfig | 52 +++ hw/block/Kconfig | 37 ++ hw/bt/Kconfig | 2 + hw/char/Kconfig | 41 ++ hw/core/Kconfig | 11 + hw/cpu/Kconfig | 8 + hw/display/Kconfig | 106 +++++ hw/display/Makefile.objs | 4 +- hw/dma/Kconfig | 20 + hw/gpio/Kconfig | 9 + hw/hyperv/Kconfig | 6 + hw/i2c/Kconfig | 27 ++ hw/i2c/Makefile.objs | 7 +- hw/i386/Kconfig | 99 +++++ hw/i386/Makefile.objs | 4 +- hw/ide/Kconfig | 53 +++ hw/input/Kconfig | 28 ++ hw/intc/Kconfig | 55 +++ hw/ipack/Kconfig | 4 + hw/ipmi/Kconfig | 14 + hw/isa/Kconfig | 30 ++ hw/mem/Kconfig | 8 + hw/misc/Kconfig | 106 +++++ hw/misc/macio/Kconfig | 11 + hw/net/Kconfig | 120 +++++ hw/nvram/Kconfig | 8 + hw/pci-bridge/Kconfig | 20 + hw/pci-host/Kconfig | 44 ++ hw/pci-host/Makefile.objs | 2 +- hw/pci/Kconfig | 2 + hw/pcmcia/Kconfig | 2 + hw/scsi/Kconfig | 51 +++ hw/scsi/Makefile.objs | 2 +- hw/sd/Kconfig | 14 + hw/smbios/Kconfig | 2 + hw/ssi/Kconfig | 14 + hw/timer/Kconfig | 62 +++ hw/tpm/Kconfig | 20 + hw/usb/Kconfig | 90 ++++ hw/vfio/Kconfig | 11 + hw/virtio/Kconfig | 28 ++ hw/watchdog/Kconfig | 15 + rules.mak | 2 +- scripts/make_device_config.sh | 30 -- scripts/minikconf.py | 682 +++++++++++++++++++++++++++++ 59 files changed, 2064 insertions(+), 179 deletions(-) create mode 100644 Kconfig.host delete mode 100644 default-configs/hyperv.mak delete mode 100644 default-configs/pci.mak delete mode 100644 default-configs/sound.mak delete mode 100644 default-configs/usb.mak create mode 100644 hw/9pfs/Kconfig create mode 100644 hw/Kconfig create mode 100644 hw/acpi/Kconfig create mode 100644 hw/adc/Kconfig create mode 100644 hw/audio/Kconfig create mode 100644 hw/block/Kconfig create mode 100644 hw/bt/Kconfig create mode 100644 hw/char/Kconfig create mode 100644 hw/core/Kconfig create mode 100644 hw/cpu/Kconfig create mode 100644 hw/display/Kconfig create mode 100644 hw/dma/Kconfig create mode 100644 hw/gpio/Kconfig create mode 100644 hw/hyperv/Kconfig create mode 100644 hw/i2c/Kconfig create mode 100644 hw/i386/Kconfig create mode 100644 hw/ide/Kconfig create mode 100644 hw/input/Kconfig create mode 100644 hw/intc/Kconfig create mode 100644 hw/ipack/Kconfig create mode 100644 hw/ipmi/Kconfig create mode 100644 hw/isa/Kconfig create mode 100644 hw/mem/Kconfig create mode 100644 hw/misc/Kconfig create mode 100644 hw/misc/macio/Kconfig create mode 100644 hw/net/Kconfig create mode 100644 hw/nvram/Kconfig create mode 100644 hw/pci-bridge/Kconfig create mode 100644 hw/pci-host/Kconfig create mode 100644 hw/pci/Kconfig create mode 100644 hw/pcmcia/Kconfig create mode 100644 hw/scsi/Kconfig create mode 100644 hw/sd/Kconfig create mode 100644 hw/smbios/Kconfig create mode 100644 hw/ssi/Kconfig create mode 100644 hw/timer/Kconfig create mode 100644 hw/tpm/Kconfig create mode 100644 hw/usb/Kconfig create mode 100644 hw/vfio/Kconfig create mode 100644 hw/virtio/Kconfig create mode 100644 hw/watchdog/Kconfig delete mode 100644 scripts/make_device_config.sh create mode 100644 scripts/minikconf.py