qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU
@ 2019-01-25 10:06 Paolo Bonzini
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 01/52] arm: disable CONFIG_SERIAL_ISA Paolo Bonzini
                   ` (61 more replies)
  0 siblings, 62 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

(I'm only momentarily at the helm and will give control back to Yang after
this iteration.)

This is still RFC mostly because of the lack of documentation, and because
only x86 is fully converted, but it's converging.  Other targets still
enable embedded devices in default-configs/ instead of using "select"
directives.  For many targets, the conversion will be trivial because
they only support one board.  The complex ones are ARM, MIPS and PPC
of course.  s390 as usual is just different in some respects, but all
of its issues are sorted out already in this series and so it's just
yet another single-board target.

It supports defconfig (default-configs file chooses boards only)
and allnoconfig (default-configs file chooses devices too) and builds
all targets.  I haven't yet checked that the configuration is the same
before and after the conversion, but at least device-introspection-test
and other qtests all pass, which did catch some errors.

As mentioned in the previous versions, this is only a replacement
for default-configs, in order to simplify configuration and remove
the need to track dependencies between configuration symbols.  In
fact, even with the current incomplete conversion the diffstat
for default-configs is already

 31 files changed, 108 insertions(+), 241 deletions(-)

Devices can be disabled by adding for example

   CONFIG_HPET=n

to default-configs/i386-softmmu.mak.  If you prefer they can be
listed manually and "make allnoconfig" can be executed before
building.  This probably should become a configure option
"--without-default-devices" instead.

For the previous discussions on the Kconfig design, see
http://lists.nongnu.org/archive/html/qemu-devel/2018-09/msg02827.html

Patches 1-27 should probably be committed now, so please review!  Yang,
once they are reviewed you can extract them and post them to the
mailing list as non-RFC!

As to the rest, you're welcome to try them, post conversions for the
simple targets, suggest usability improvements, and whatever.  Thanks to
everyone for the work on the previous iterations.  It's great to see
the work on this GSoC project come back to life after five years!

v4->v5: new patches 1, 2, 3, 13, 26, 27, 47, 49, 50, 52
	Removed CONFIG_TYPHOON (patch 20)
	Removed CONFIG_DINO (patch 22)
	ported minikconf to python 3
	improved some minikconf error messages
	added missing symbols in patch 32
	added CONFIG_VHOST_USER and CONFIG_LINUX, made CONFIG_KVM per target (patch 33)
	removed $(...) assignments from default-configs/ (patch 33)
	moved allnoconfig patch earlier, removed allyesconfig/randconfig
	add CONFIG_PCI_EXPRESS to non-x86 targets (patch 36)
	added CONFIG_PCI_DEVICES in patch 37 to support s390x
	virtio-mmio does not support vhost-user yet (patches 40 and 48)
	fix PCSPK for platforms that lack an i8254 (patch 41)
	add "select ISA_BUS" to I82378 and SUN4U (patch 41)
	changed QXL/VTD/AMD_IOMMU from "select" to "default y if ..." (patch 42)
	moved "select PAM" and "select ISA_BUS" from board to device (patch 42)
	brought patch 44 up to date
	fixed MILKYMIST_TMU2 to only apply to MILKYMIST (patch 45)
	new config symbol VIRTIO_INPUT_HOST
	fixed select/depends for virtio (patch 48)
	moved some ACPI dependencies from board to devices (patch 51)

Paolo Bonzini (27):
  arm: disable CONFIG_SERIAL_ISA
  ide: split ioport registration to a separate file
  vfio: move conditional up to hw/Makefile.objs
  build: actually use CONFIG_PAM
  hw/i386/Makefile.objs: Build pc_piix* and pc_q35 boards
  hw/s390/Makefile.objs: Create new CONFIG_* variables for s390x boards and devices
  hw/i2c/Makefile.objs: Create new CONFIG_* variables for EEPROM and ACPI controller
  hw/vfio/Makefile.objs: Create new CONFIG_* variables for VFIO core and PCI
  minikconfig: add parser skeleton
  minikconfig: add AST
  minikconfig: add semantic analysis
  kconfig: introduce kconfig files
  build: switch to Kconfig
  minikconf: implement allnoconfig and defconfig
  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
  isa: express dependencies with kconfig
  i386: express dependencies with Kconfig
  i2c: express dependencies with Kconfig
  ptimer: express dependencies with Kconfig
  vfio: express vfio dependencies with Kconfig
  tpm: express dependencies with Kconfig
  isa: express SuperIO dependencies with Kconfig
  kconfig: introduce CONFIG_TEST_DEVICES

Yang Zhong (17):
  hw/pci-host/Makefile.objs: make CONFIGS clear for PCI EXPRESS
  hw/arm/Makefile.objs: CONFIG_VIRT created for virt board
  hw/nios2/Makefile.objs: Conditionally build nios2
  hw/riscv/Makefile.objs: Create CONFIG_* for riscv boards
  hw/sparc64/Makefile.objs: Create CONFIG_* for sparc64
  hw/alpha/Makefile.objs: Create CONFIG_* for alpha
  hw/cris/Makefile.objs: Create CONFIG_* for cris
  hw/hppa/Makefile.objs: Create CONFIG_* for hppa
  hw/moxie/Makefile.objs: Conditionally build moxie
  hw/openrisc/Makefile.objs: Create CONFIG_* for openrisc
  hw/tricore/Makefile.objs: Create CONFIG_* for tricore
  hw/display: make edid configurable
  hw/pci/Makefile.objs: make pcie configurable
  display: express dependencies with kconfig
  hyperv: express dependencies with kconfig
  virtio: express virtio dependencies with Kconfig
  i386-softmmu.mak: remove all CONFIG_* except boards definitions

Ákos Kovács (8):
  hw/m68k/Makefile.objs: Conditionally build boards
  hw/microblaze/Makefile.objs: Create configs for petalogix and xilinx
    boards
  hw/mips/Makefile.objs: Create CONFIG_* for r4k, malta, mipssim boards
  hw/ppc/Makefile.objs: Build all boards conditinally with CONFIG_*
  hw/sh4/Makefile.objs: New CONFIG_* varibales created for sh4 boards
    and device
  hw/sparc/Makefile.objs: CONFIG_* for sun4m and leon3 created
  hw/lm32/Makefile.objs: Conditionally build lm32 and milkmyst
  hw/xtensa/Makefile.objs: Build xtensa_sim and xtensa_fpga
    conditionally

 Kconfig.host                            |  24 ++
 Makefile                                |  27 +-
 Makefile.target                         |   7 +-
 configure                               |   3 +
 default-configs/alpha-softmmu.mak       |  14 +-
 default-configs/arm-softmmu.mak         |  16 +-
 default-configs/cris-softmmu.mak        |   2 +-
 default-configs/hppa-softmmu.mak        |   6 +-
 default-configs/hyperv.mak              |   2 -
 default-configs/i386-softmmu.mak        |  77 +---
 default-configs/lm32-softmmu.mak        |   2 -
 default-configs/m68k-softmmu.mak        |   3 +-
 default-configs/microblaze-softmmu.mak  |   4 +-
 default-configs/mips-softmmu-common.mak |  13 +-
 default-configs/mips64el-softmmu.mak    |   3 +-
 default-configs/moxie-softmmu.mak       |   1 +
 default-configs/nios2-softmmu.mak       |   2 +-
 default-configs/or1k-softmmu.mak        |   1 +
 default-configs/pci.mak                 |  49 ---
 default-configs/ppc-softmmu.mak         |  28 +-
 default-configs/ppc64-softmmu.mak       |   5 -
 default-configs/riscv32-softmmu.mak     |  15 +-
 default-configs/riscv64-softmmu.mak     |  15 +-
 default-configs/s390x-softmmu.mak       |   9 +-
 default-configs/sh4-softmmu.mak         |  17 +-
 default-configs/sh4eb-softmmu.mak       |  15 +-
 default-configs/sound.mak               |   4 -
 default-configs/sparc-softmmu.mak       |   3 +-
 default-configs/sparc64-softmmu.mak     |   9 +-
 default-configs/tricore-softmmu.mak     |   1 +
 default-configs/unicore32-softmmu.mak   |   1 -
 default-configs/usb.mak                 |  11 -
 default-configs/virtio.mak              |  15 -
 default-configs/xtensa-softmmu.mak      |   3 +
 default-configs/xtensaeb-softmmu.mak    |   3 +
 docs/devel/build-system.txt             |   1 -
 hw/9pfs/Kconfig                         |   6 +
 hw/Kconfig                              |  73 ++++
 hw/Makefile.objs                        |   4 +-
 hw/acpi/Kconfig                         |  29 ++
 hw/adc/Kconfig                          |   2 +
 hw/alpha/Kconfig                        |   2 +
 hw/alpha/Makefile.objs                  |   2 +-
 hw/arm/Kconfig                          | 117 ++++++
 hw/arm/Makefile.objs                    |   3 +-
 hw/audio/Kconfig                        |  52 +++
 hw/block/Kconfig                        |  38 ++
 hw/bt/Kconfig                           |   2 +
 hw/char/Kconfig                         |  42 ++
 hw/core/Kconfig                         |  11 +
 hw/cpu/Kconfig                          |   8 +
 hw/cris/Kconfig                         |   6 +
 hw/cris/Makefile.objs                   |   2 +-
 hw/display/Kconfig                      | 107 +++++
 hw/display/Makefile.objs                |   4 +-
 hw/dma/Kconfig                          |  21 +
 hw/gpio/Kconfig                         |   9 +
 hw/hppa/Kconfig                         |   5 +
 hw/hppa/Makefile.objs                   |   2 +-
 hw/hyperv/Kconfig                       |   9 +
 hw/i2c/Kconfig                          |  27 ++
 hw/i2c/Makefile.objs                    |   7 +-
 hw/i386/Kconfig                         |  88 ++++
 hw/i386/Makefile.objs                   |   4 +-
 hw/ide/Kconfig                          |  54 +++
 hw/ide/Makefile.objs                    |   6 +-
 hw/ide/core.c                           |  25 --
 hw/ide/ioport.c                         |  67 ++++
 hw/input/Kconfig                        |  33 ++
 hw/intc/Kconfig                         |  59 +++
 hw/ipack/Kconfig                        |   4 +
 hw/ipmi/Kconfig                         |  22 +
 hw/isa/Kconfig                          |  53 +++
 hw/lm32/Kconfig                         |   7 +
 hw/lm32/Makefile.objs                   |   4 +-
 hw/m68k/Kconfig                         |  10 +
 hw/m68k/Makefile.objs                   |   4 +-
 hw/mem/Kconfig                          |  10 +
 hw/microblaze/Kconfig                   |   8 +
 hw/microblaze/Makefile.objs             |   6 +-
 hw/mips/Kconfig                         |  21 +
 hw/mips/Makefile.objs                   |   5 +-
 hw/misc/Kconfig                         | 112 ++++++
 hw/misc/macio/Kconfig                   |  11 +
 hw/moxie/Kconfig                        |   2 +
 hw/moxie/Makefile.objs                  |   2 +-
 hw/net/Kconfig                          | 122 ++++++
 hw/net/Makefile.objs                    |   4 +-
 hw/nios2/Kconfig                        |   5 +
 hw/nios2/Makefile.objs                  |   3 +-
 hw/nvram/Kconfig                        |   8 +
 hw/openrisc/Kconfig                     |   2 +
 hw/openrisc/Makefile.objs               |   2 +-
 hw/pci-bridge/Kconfig                   |  29 ++
 hw/pci-host/Kconfig                     |  49 +++
 hw/pci-host/Makefile.objs               |  10 +-
 hw/pci/Kconfig                          |   9 +
 hw/pci/Makefile.objs                    |   9 +-
 hw/pcmcia/Kconfig                       |   2 +
 hw/ppc/Kconfig                          |  60 +++
 hw/ppc/Makefile.objs                    |  11 +-
 hw/riscv/Kconfig                        |  19 +
 hw/riscv/Makefile.objs                  |  22 +-
 hw/s390x/Kconfig                        |   2 +
 hw/s390x/Makefile.objs                  |   2 +
 hw/scsi/Kconfig                         |  54 +++
 hw/scsi/Makefile.objs                   |   2 +-
 hw/sd/Kconfig                           |  14 +
 hw/sh4/Kconfig                          |  12 +
 hw/sh4/Makefile.objs                    |   4 +-
 hw/smbios/Kconfig                       |   2 +
 hw/sparc/Kconfig                        |  13 +
 hw/sparc/Makefile.objs                  |   4 +-
 hw/sparc64/Kconfig                      |   6 +
 hw/sparc64/Makefile.objs                |   6 +-
 hw/ssi/Kconfig                          |  14 +
 hw/timer/Kconfig                        |  63 +++
 hw/tpm/Kconfig                          |  27 ++
 hw/tricore/Kconfig                      |   2 +
 hw/tricore/Makefile.objs                |   2 +-
 hw/unicore32/Kconfig                    |   3 +
 hw/usb/Kconfig                          |  91 +++++
 hw/vfio/Kconfig                         |  36 ++
 hw/vfio/Makefile.objs                   |   9 +-
 hw/virtio/Kconfig                       |  27 ++
 hw/watchdog/Kconfig                     |  16 +
 hw/xtensa/Kconfig                       |   5 +
 hw/xtensa/Makefile.objs                 |   4 +-
 rules.mak                               |   2 +-
 scripts/make_device_config.sh           |  30 --
 scripts/minikconf.py                    | 687 ++++++++++++++++++++++++++++++++
 131 files changed, 2749 insertions(+), 374 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
 delete mode 100644 default-configs/virtio.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/alpha/Kconfig
 create mode 100644 hw/arm/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/cris/Kconfig
 create mode 100644 hw/display/Kconfig
 create mode 100644 hw/dma/Kconfig
 create mode 100644 hw/gpio/Kconfig
 create mode 100644 hw/hppa/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/ide/ioport.c
 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/lm32/Kconfig
 create mode 100644 hw/m68k/Kconfig
 create mode 100644 hw/mem/Kconfig
 create mode 100644 hw/microblaze/Kconfig
 create mode 100644 hw/mips/Kconfig
 create mode 100644 hw/misc/Kconfig
 create mode 100644 hw/misc/macio/Kconfig
 create mode 100644 hw/moxie/Kconfig
 create mode 100644 hw/net/Kconfig
 create mode 100644 hw/nios2/Kconfig
 create mode 100644 hw/nvram/Kconfig
 create mode 100644 hw/openrisc/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/ppc/Kconfig
 create mode 100644 hw/riscv/Kconfig
 create mode 100644 hw/s390x/Kconfig
 create mode 100644 hw/scsi/Kconfig
 create mode 100644 hw/sd/Kconfig
 create mode 100644 hw/sh4/Kconfig
 create mode 100644 hw/smbios/Kconfig
 create mode 100644 hw/sparc/Kconfig
 create mode 100644 hw/sparc64/Kconfig
 create mode 100644 hw/ssi/Kconfig
 create mode 100644 hw/timer/Kconfig
 create mode 100644 hw/tpm/Kconfig
 create mode 100644 hw/tricore/Kconfig
 create mode 100644 hw/unicore32/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
 create mode 100644 hw/xtensa/Kconfig
 delete mode 100644 scripts/make_device_config.sh
 create mode 100644 scripts/minikconf.py

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 01/52] arm: disable CONFIG_SERIAL_ISA
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
@ 2019-01-25 10:06 ` Paolo Bonzini
  2019-01-25 14:49   ` Thomas Huth
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 02/52] ide: split ioport registration to a separate file Paolo Bonzini
                   ` (60 subsequent siblings)
  61 siblings, 1 reply; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

ARM does not have an ISA bus, this device should not be enabled.  Kconfig
catches the contradiction because ARM does not define CONFIG_ISA_BUS.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/arm-softmmu.mak | 1 -
 1 file changed, 1 deletion(-)

diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index 2420491..3c9351f 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -6,7 +6,6 @@ CONFIG_VGA=y
 CONFIG_NAND=y
 CONFIG_ECC=y
 CONFIG_SERIAL=y
-CONFIG_SERIAL_ISA=y
 CONFIG_PTIMER=y
 CONFIG_SD=y
 CONFIG_MAX7310=y
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 02/52] ide: split ioport registration to a separate file
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 01/52] arm: disable CONFIG_SERIAL_ISA Paolo Bonzini
@ 2019-01-25 10:06 ` Paolo Bonzini
  2019-01-25 14:53   ` Thomas Huth
  2019-01-30 12:07   ` Thomas Huth
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 03/52] vfio: move conditional up to hw/Makefile.objs Paolo Bonzini
                   ` (59 subsequent siblings)
  61 siblings, 2 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

This is not needed on ARM, and brings in ISA bus code which is otherwise not
necessary.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/ide/Makefile.objs |  6 ++---
 hw/ide/core.c        | 25 --------------------
 hw/ide/ioport.c      | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 70 insertions(+), 28 deletions(-)
 create mode 100644 hw/ide/ioport.c

diff --git a/hw/ide/Makefile.objs b/hw/ide/Makefile.objs
index fc328ff..3f3edd10 100644
--- a/hw/ide/Makefile.objs
+++ b/hw/ide/Makefile.objs
@@ -1,12 +1,12 @@
 common-obj-$(CONFIG_IDE_CORE) += core.o atapi.o
 common-obj-$(CONFIG_IDE_QDEV) += qdev.o
-common-obj-$(CONFIG_IDE_PCI) += pci.o
-common-obj-$(CONFIG_IDE_ISA) += isa.o
+common-obj-$(CONFIG_IDE_PCI) += pci.o ioport.o
+common-obj-$(CONFIG_IDE_ISA) += isa.o ioport.o
 common-obj-$(CONFIG_IDE_PIIX) += piix.o
 common-obj-$(CONFIG_IDE_CMD646) += cmd646.o
 common-obj-$(CONFIG_IDE_MACIO) += macio.o
 common-obj-$(CONFIG_IDE_MMIO) += mmio.o
-common-obj-$(CONFIG_IDE_VIA) += via.o
+common-obj-$(CONFIG_IDE_VIA) += via.o ioport.o
 common-obj-$(CONFIG_MICRODRIVE) += microdrive.o
 common-obj-$(CONFIG_AHCI) += ahci.o
 common-obj-$(CONFIG_AHCI) += ich.o
diff --git a/hw/ide/core.c b/hw/ide/core.c
index c3d779d..8483200 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -2686,31 +2686,6 @@ void ide_exit(IDEState *s)
     qemu_vfree(s->io_buffer);
 }
 
-static const MemoryRegionPortio ide_portio_list[] = {
-    { 0, 8, 1, .read = ide_ioport_read, .write = ide_ioport_write },
-    { 0, 1, 2, .read = ide_data_readw, .write = ide_data_writew },
-    { 0, 1, 4, .read = ide_data_readl, .write = ide_data_writel },
-    PORTIO_END_OF_LIST(),
-};
-
-static const MemoryRegionPortio ide_portio2_list[] = {
-    { 0, 1, 1, .read = ide_status_read, .write = ide_cmd_write },
-    PORTIO_END_OF_LIST(),
-};
-
-void ide_init_ioport(IDEBus *bus, ISADevice *dev, int iobase, int iobase2)
-{
-    /* ??? Assume only ISA and PCI configurations, and that the PCI-ISA
-       bridge has been setup properly to always register with ISA.  */
-    isa_register_portio_list(dev, &bus->portio_list,
-                             iobase, ide_portio_list, bus, "ide");
-
-    if (iobase2) {
-        isa_register_portio_list(dev, &bus->portio2_list,
-                                 iobase2, ide_portio2_list, bus, "ide");
-    }
-}
-
 static bool is_identify_set(void *opaque, int version_id)
 {
     IDEState *s = opaque;
diff --git a/hw/ide/ioport.c b/hw/ide/ioport.c
new file mode 100644
index 0000000..b8f1b3f
--- /dev/null
+++ b/hw/ide/ioport.c
@@ -0,0 +1,67 @@
+/*
+ * QEMU IDE disk and CD/DVD-ROM Emulator
+ *
+ * Copyright (c) 2003 Fabrice Bellard
+ * Copyright (c) 2006 Openedhand Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#include "qemu/osdep.h"
+#include "hw/hw.h"
+#include "hw/isa/isa.h"
+#include "qemu/error-report.h"
+#include "qemu/timer.h"
+#include "sysemu/sysemu.h"
+#include "sysemu/blockdev.h"
+#include "sysemu/dma.h"
+#include "hw/block/block.h"
+#include "sysemu/block-backend.h"
+#include "qapi/error.h"
+#include "qemu/cutils.h"
+#include "sysemu/replay.h"
+
+#include "hw/ide/internal.h"
+#include "trace.h"
+
+static const MemoryRegionPortio ide_portio_list[] = {
+    { 0, 8, 1, .read = ide_ioport_read, .write = ide_ioport_write },
+    { 0, 1, 2, .read = ide_data_readw, .write = ide_data_writew },
+    { 0, 1, 4, .read = ide_data_readl, .write = ide_data_writel },
+    PORTIO_END_OF_LIST(),
+};
+
+static const MemoryRegionPortio ide_portio2_list[] = {
+    { 0, 1, 1, .read = ide_status_read, .write = ide_cmd_write },
+    PORTIO_END_OF_LIST(),
+};
+
+void ide_init_ioport(IDEBus *bus, ISADevice *dev, int iobase, int iobase2)
+{
+    /* ??? Assume only ISA and PCI configurations, and that the PCI-ISA
+       bridge has been setup properly to always register with ISA.  */
+    isa_register_portio_list(dev, &bus->portio_list,
+                             iobase, ide_portio_list, bus, "ide");
+
+    if (iobase2) {
+        isa_register_portio_list(dev, &bus->portio2_list,
+                                 iobase2, ide_portio2_list, bus, "ide");
+    }
+}
+
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 03/52] vfio: move conditional up to hw/Makefile.objs
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 01/52] arm: disable CONFIG_SERIAL_ISA Paolo Bonzini
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 02/52] ide: split ioport registration to a separate file Paolo Bonzini
@ 2019-01-25 10:06 ` Paolo Bonzini
  2019-01-25 15:04   ` Thomas Huth
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 04/52] hw/pci-host/Makefile.objs: make CONFIGS clear for PCI EXPRESS Paolo Bonzini
                   ` (58 subsequent siblings)
  61 siblings, 1 reply; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

Instead of wrapping the entire Makefile.objs with an ifeq/endif, just
include the directory only for Linux.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/Makefile.objs      | 2 +-
 hw/vfio/Makefile.objs | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/hw/Makefile.objs b/hw/Makefile.objs
index 39d882a..22dd211 100644
--- a/hw/Makefile.objs
+++ b/hw/Makefile.objs
@@ -30,7 +30,7 @@ devices-dirs-$(CONFIG_SOFTMMU) += ssi/
 devices-dirs-$(CONFIG_SOFTMMU) += timer/
 devices-dirs-$(CONFIG_TPM) += tpm/
 devices-dirs-$(CONFIG_SOFTMMU) += usb/
-devices-dirs-$(CONFIG_SOFTMMU) += vfio/
+devices-dirs-$(CONFIG_LINUX) += vfio/
 devices-dirs-$(CONFIG_SOFTMMU) += virtio/
 devices-dirs-$(CONFIG_SOFTMMU) += watchdog/
 devices-dirs-$(CONFIG_SOFTMMU) += xen/
diff --git a/hw/vfio/Makefile.objs b/hw/vfio/Makefile.objs
index 8b3f664..9180589 100644
--- a/hw/vfio/Makefile.objs
+++ b/hw/vfio/Makefile.objs
@@ -1,4 +1,3 @@
-ifeq ($(CONFIG_LINUX), y)
 obj-$(CONFIG_SOFTMMU) += common.o
 obj-$(CONFIG_PCI) += pci.o pci-quirks.o display.o
 obj-$(CONFIG_VFIO_CCW) += ccw.o
@@ -7,4 +6,3 @@ obj-$(CONFIG_VFIO_XGMAC) += calxeda-xgmac.o
 obj-$(CONFIG_VFIO_AMD_XGBE) += amd-xgbe.o
 obj-$(CONFIG_SOFTMMU) += spapr.o
 obj-$(CONFIG_VFIO_AP) += ap.o
-endif
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 04/52] hw/pci-host/Makefile.objs: make CONFIGS clear for PCI EXPRESS
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (2 preceding siblings ...)
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 03/52] vfio: move conditional up to hw/Makefile.objs Paolo Bonzini
@ 2019-01-25 10:06 ` Paolo Bonzini
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 05/52] build: actually use CONFIG_PAM Paolo Bonzini
                   ` (57 subsequent siblings)
  61 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth, Michael S. Tsirkin

From: Yang Zhong <yang.zhong@intel.com>

Change the CONFIGs for PCI EXPRESS and make module name more
clear for code files.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20190123065618.3520-2-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/arm-softmmu.mak      | 4 ++--
 default-configs/i386-softmmu.mak     | 2 +-
 default-configs/mips64el-softmmu.mak | 2 +-
 default-configs/pci.mak              | 2 +-
 default-configs/riscv32-softmmu.mak  | 2 +-
 default-configs/riscv64-softmmu.mak  | 2 +-
 hw/net/Makefile.objs                 | 4 ++--
 hw/pci-host/Makefile.objs            | 8 ++++----
 8 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index 3c9351f..107f801 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -122,7 +122,7 @@ CONFIG_VERSATILE=y
 CONFIG_VERSATILE_PCI=y
 CONFIG_VERSATILE_I2C=y
 
-CONFIG_PCI_GENERIC=y
+CONFIG_PCI_EXPRESS_GENERIC_BRIDGE=y
 CONFIG_VFIO_XGMAC=y
 CONFIG_VFIO_AMD_XGBE=y
 
@@ -153,7 +153,7 @@ CONFIG_GPIO_KEY=y
 CONFIG_MSF2=y
 CONFIG_FW_CFG_DMA=y
 CONFIG_XILINX_AXI=y
-CONFIG_PCI_DESIGNWARE=y
+CONFIG_PCI_EXPRESS_DESIGNWARE=y
 
 CONFIG_STRONGARM=y
 CONFIG_HIGHBANK=y
diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmmu.mak
index 64c998c..2f919df 100644
--- a/default-configs/i386-softmmu.mak
+++ b/default-configs/i386-softmmu.mak
@@ -47,7 +47,7 @@ CONFIG_ISA_TESTDEV=y
 CONFIG_VMPORT=y
 CONFIG_SGA=y
 CONFIG_LPC_ICH9=y
-CONFIG_PCI_Q35=y
+CONFIG_PCI_EXPRESS_Q35=y
 CONFIG_APIC=y
 CONFIG_IOAPIC=y
 CONFIG_PVPANIC=y
diff --git a/default-configs/mips64el-softmmu.mak b/default-configs/mips64el-softmmu.mak
index c2ae313..9eb1208 100644
--- a/default-configs/mips64el-softmmu.mak
+++ b/default-configs/mips64el-softmmu.mak
@@ -12,4 +12,4 @@ CONFIG_JAZZ_LED=y
 CONFIG_VT82C686=y
 CONFIG_MIPS_BOSTON=y
 CONFIG_FITLOADER=y
-CONFIG_PCI_XILINX=y
+CONFIG_PCI_EXPRESS_XILINX=y
diff --git a/default-configs/pci.mak b/default-configs/pci.mak
index 6c7be12..83738cb 100644
--- a/default-configs/pci.mak
+++ b/default-configs/pci.mak
@@ -22,7 +22,7 @@ CONFIG_MEGASAS_SCSI_PCI=y
 CONFIG_MPTSAS_SCSI_PCI=y
 CONFIG_RTL8139_PCI=y
 CONFIG_E1000_PCI=y
-CONFIG_E1000E_PCI=y
+CONFIG_E1000E_PCI_EXPRESS=y
 CONFIG_IDE_CORE=y
 CONFIG_IDE_QDEV=y
 CONFIG_IDE_PCI=y
diff --git a/default-configs/riscv32-softmmu.mak b/default-configs/riscv32-softmmu.mak
index c9c5971..fbfd1d4 100644
--- a/default-configs/riscv32-softmmu.mak
+++ b/default-configs/riscv32-softmmu.mak
@@ -8,7 +8,7 @@ CONFIG_VIRTIO_MMIO=y
 
 CONFIG_CADENCE=y
 
-CONFIG_PCI_GENERIC=y
+CONFIG_PCI_EXPRESS_GENERIC_BRIDGE=y
 
 CONFIG_VGA=y
 CONFIG_VGA_PCI=y
diff --git a/default-configs/riscv64-softmmu.mak b/default-configs/riscv64-softmmu.mak
index c9c5971..fbfd1d4 100644
--- a/default-configs/riscv64-softmmu.mak
+++ b/default-configs/riscv64-softmmu.mak
@@ -8,7 +8,7 @@ CONFIG_VIRTIO_MMIO=y
 
 CONFIG_CADENCE=y
 
-CONFIG_PCI_GENERIC=y
+CONFIG_PCI_EXPRESS_GENERIC_BRIDGE=y
 
 CONFIG_VGA=y
 CONFIG_VGA_PCI=y
diff --git a/hw/net/Makefile.objs b/hw/net/Makefile.objs
index fa461d4..a43351a 100644
--- a/hw/net/Makefile.objs
+++ b/hw/net/Makefile.objs
@@ -7,8 +7,8 @@ common-obj-$(CONFIG_EEPRO100_PCI) += eepro100.o
 common-obj-$(CONFIG_PCNET_PCI) += pcnet-pci.o
 common-obj-$(CONFIG_PCNET_COMMON) += pcnet.o
 common-obj-$(CONFIG_E1000_PCI) += e1000.o e1000x_common.o
-common-obj-$(CONFIG_E1000E_PCI) += net_tx_pkt.o net_rx_pkt.o
-common-obj-$(CONFIG_E1000E_PCI) += e1000e.o e1000e_core.o e1000x_common.o
+common-obj-$(CONFIG_E1000E_PCI_EXPRESS) += net_tx_pkt.o net_rx_pkt.o
+common-obj-$(CONFIG_E1000E_PCI_EXPRESS) += e1000e.o e1000e_core.o e1000x_common.o
 common-obj-$(CONFIG_RTL8139_PCI) += rtl8139.o
 common-obj-$(CONFIG_VMXNET3_PCI) += net_tx_pkt.o net_rx_pkt.o
 common-obj-$(CONFIG_VMXNET3_PCI) += vmxnet3.o
diff --git a/hw/pci-host/Makefile.objs b/hw/pci-host/Makefile.objs
index 6d6597c..073d512 100644
--- a/hw/pci-host/Makefile.objs
+++ b/hw/pci-host/Makefile.objs
@@ -14,8 +14,8 @@ common-obj-$(CONFIG_VERSATILE_PCI) += versatile.o
 common-obj-$(CONFIG_PCI_SABRE) += sabre.o
 common-obj-$(CONFIG_FULONG) += bonito.o
 common-obj-$(CONFIG_PCI_PIIX) += piix.o
-common-obj-$(CONFIG_PCI_Q35) += q35.o
-common-obj-$(CONFIG_PCI_GENERIC) += gpex.o
-common-obj-$(CONFIG_PCI_XILINX) += xilinx-pcie.o
+common-obj-$(CONFIG_PCI_EXPRESS_Q35) += q35.o
+common-obj-$(CONFIG_PCI_EXPRESS_GENERIC_BRIDGE) += gpex.o
+common-obj-$(CONFIG_PCI_EXPRESS_XILINX) += xilinx-pcie.o
 
-common-obj-$(CONFIG_PCI_DESIGNWARE) += designware.o
+common-obj-$(CONFIG_PCI_EXPRESS_DESIGNWARE) += designware.o
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 05/52] build: actually use CONFIG_PAM
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (3 preceding siblings ...)
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 04/52] hw/pci-host/Makefile.objs: make CONFIGS clear for PCI EXPRESS Paolo Bonzini
@ 2019-01-25 10:06 ` Paolo Bonzini
  2019-01-31 21:50   ` Philippe Mathieu-Daudé
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 06/52] hw/i386/Makefile.objs: Build pc_piix* and pc_q35 boards Paolo Bonzini
                   ` (56 subsequent siblings)
  61 siblings, 1 reply; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

Do not link it unconditionally into all binaries.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20190123065618.3520-3-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/i386-softmmu.mak | 1 +
 hw/pci-host/Makefile.objs        | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmmu.mak
index 2f919df..48da996 100644
--- a/default-configs/i386-softmmu.mak
+++ b/default-configs/i386-softmmu.mak
@@ -67,3 +67,4 @@ CONFIG_I2C=y
 CONFIG_SEV=$(CONFIG_KVM)
 CONFIG_VTD=y
 CONFIG_AMD_IOMMU=y
+CONFIG_PAM=y
diff --git a/hw/pci-host/Makefile.objs b/hw/pci-host/Makefile.objs
index 073d512..a9cd3e0 100644
--- a/hw/pci-host/Makefile.objs
+++ b/hw/pci-host/Makefile.objs
@@ -1,4 +1,4 @@
-common-obj-y += pam.o
+common-obj-$(CONFIG_PAM) += pam.o
 
 # PPC devices
 common-obj-$(CONFIG_PREP_PCI) += prep.o
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 06/52] hw/i386/Makefile.objs: Build pc_piix* and pc_q35 boards
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (4 preceding siblings ...)
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 05/52] build: actually use CONFIG_PAM Paolo Bonzini
@ 2019-01-25 10:06 ` Paolo Bonzini
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 07/52] hw/arm/Makefile.objs: CONFIG_VIRT created for virt board Paolo Bonzini
                   ` (55 subsequent siblings)
  61 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth, Ákos Kovács

CONFIG_PIIX and CONFIG_Q35 created for the pc board object files. These
are enabled automatically at default-configs/i386-softmmu.mak and
default-configs/x86_64-softmmu.mak

Signed-off-by: Ákos Kovács <akoskovacs@gmx.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20190123065618.3520-4-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/i386-softmmu.mak | 2 ++
 hw/i386/Makefile.objs            | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmmu.mak
index 48da996..71c9f6f 100644
--- a/default-configs/i386-softmmu.mak
+++ b/default-configs/i386-softmmu.mak
@@ -68,3 +68,5 @@ CONFIG_SEV=$(CONFIG_KVM)
 CONFIG_VTD=y
 CONFIG_AMD_IOMMU=y
 CONFIG_PAM=y
+CONFIG_I440FX=y
+CONFIG_Q35=y
diff --git a/hw/i386/Makefile.objs b/hw/i386/Makefile.objs
index fa87a14..3de7ca2 100644
--- a/hw/i386/Makefile.objs
+++ b/hw/i386/Makefile.objs
@@ -1,6 +1,8 @@
 obj-$(CONFIG_KVM) += kvm/
 obj-y += multiboot.o
-obj-y += pc.o pc_piix.o pc_q35.o
+obj-y += pc.o
+obj-$(CONFIG_I440FX) += pc_piix.o
+obj-$(CONFIG_Q35) += pc_q35.o
 obj-y += pc_sysfw.o
 obj-$(CONFIG_VTD) += x86-iommu.o intel_iommu.o
 obj-$(CONFIG_AMD_IOMMU) += x86-iommu.o amd_iommu.o
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 07/52] hw/arm/Makefile.objs: CONFIG_VIRT created for virt board
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (5 preceding siblings ...)
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 06/52] hw/i386/Makefile.objs: Build pc_piix* and pc_q35 boards Paolo Bonzini
@ 2019-01-25 10:06 ` Paolo Bonzini
  2019-01-25 15:06   ` Thomas Huth
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 08/52] hw/m68k/Makefile.objs: Conditionally build boards Paolo Bonzini
                   ` (54 subsequent siblings)
  61 siblings, 1 reply; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

From: Yang Zhong <yang.zhong@intel.com>

make virt code configurable and the new CONFIG_VIRT definitions
added to the default-configs/arm-softmmu.mak to replace CONFIG_ACPI
in arm board.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20190123065618.3520-5-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/arm-softmmu.mak | 1 +
 hw/arm/Makefile.objs            | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index 107f801..68deb1c 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -147,6 +147,7 @@ CONFIG_XIO3130=y
 CONFIG_IOH3420=y
 CONFIG_I82801B11=y
 CONFIG_ACPI=y
+CONFIG_VIRT=y
 CONFIG_SMBIOS=y
 CONFIG_ASPEED_SOC=y
 CONFIG_GPIO_KEY=y
diff --git a/hw/arm/Makefile.objs b/hw/arm/Makefile.objs
index 50c7b4a..41dab8a 100644
--- a/hw/arm/Makefile.objs
+++ b/hw/arm/Makefile.objs
@@ -1,4 +1,5 @@
-obj-y += boot.o virt.o sysbus-fdt.o
+obj-y += boot.o sysbus-fdt.o
+obj-$(CONFIG_VIRT) += virt.o
 obj-$(CONFIG_ACPI) += virt-acpi-build.o
 obj-$(CONFIG_DIGIC) += digic_boards.o
 obj-$(CONFIG_EXYNOS4) += exynos4_boards.o
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 08/52] hw/m68k/Makefile.objs: Conditionally build boards
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (6 preceding siblings ...)
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 07/52] hw/arm/Makefile.objs: CONFIG_VIRT created for virt board Paolo Bonzini
@ 2019-01-25 10:06 ` Paolo Bonzini
  2019-01-25 15:08   ` Thomas Huth
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 09/52] hw/microblaze/Makefile.objs: Create configs for petalogix and xilinx boards Paolo Bonzini
                   ` (53 subsequent siblings)
  61 siblings, 1 reply; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth, Ákos Kovács

From: Ákos Kovács <akoskovacs@gmx.com>

CONFIG_AN5206, CONFIG_MCF5206 and CONFIG_MCF5208 make
variables created for m68k boards, and added to
default-configs/m86k-softmmu.mak.

Signed-off-by: Ákos Kovács <akoskovacs@gmx.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20190123065618.3520-6-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/m68k-softmmu.mak | 2 ++
 hw/m68k/Makefile.objs            | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/default-configs/m68k-softmmu.mak b/default-configs/m68k-softmmu.mak
index 60f7cdf..27f5274 100644
--- a/default-configs/m68k-softmmu.mak
+++ b/default-configs/m68k-softmmu.mak
@@ -2,3 +2,5 @@
 
 CONFIG_COLDFIRE=y
 CONFIG_PTIMER=y
+CONFIG_AN5206=y
+CONFIG_MCF5208=y
diff --git a/hw/m68k/Makefile.objs b/hw/m68k/Makefile.objs
index d1f089c..482f847 100644
--- a/hw/m68k/Makefile.objs
+++ b/hw/m68k/Makefile.objs
@@ -1,2 +1,2 @@
-obj-y += an5206.o mcf5208.o
-obj-y += mcf5206.o mcf_intc.o
+obj-$(CONFIG_AN5206) += an5206.o mcf5206.o
+obj-$(CONFIG_MCF5208) += mcf5208.o mcf_intc.o
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 09/52] hw/microblaze/Makefile.objs: Create configs for petalogix and xilinx boards
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (7 preceding siblings ...)
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 08/52] hw/m68k/Makefile.objs: Conditionally build boards Paolo Bonzini
@ 2019-01-25 10:06 ` Paolo Bonzini
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 10/52] hw/mips/Makefile.objs: Create CONFIG_* for r4k, malta, mipssim boards Paolo Bonzini
                   ` (52 subsequent siblings)
  61 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth, Ákos Kovács

From: Ákos Kovács <akoskovacs@gmx.com>

CONFIG_PETALOGIX_* and CONFIG_XLNX_*  configs added to
default-configs/microblaze-softmmu.mak and
default-configs/microblazeel-softmmu.mak.

Signed-off-by: Ákos Kovács <akoskovacs@gmx.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20190123065618.3520-7-yang.zhong@intel.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/microblaze-softmmu.mak | 3 +++
 hw/microblaze/Makefile.objs            | 6 +++---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/default-configs/microblaze-softmmu.mak b/default-configs/microblaze-softmmu.mak
index 7fca8e4..14837cf 100644
--- a/default-configs/microblaze-softmmu.mak
+++ b/default-configs/microblaze-softmmu.mak
@@ -10,3 +10,6 @@ CONFIG_XILINX_ETHLITE=y
 CONFIG_SSI=y
 CONFIG_SSI_M25P80=y
 CONFIG_XLNX_ZYNQMP=y
+CONFIG_PETALOGIX_S3ADSP1800=y
+CONFIG_PETALOGIX_ML605=y
+CONFIG_XLNX_ZYNQMP_PMU=y
diff --git a/hw/microblaze/Makefile.objs b/hw/microblaze/Makefile.objs
index ae9fd40..8595a62 100644
--- a/hw/microblaze/Makefile.objs
+++ b/hw/microblaze/Makefile.objs
@@ -1,4 +1,4 @@
-obj-y += petalogix_s3adsp1800_mmu.o
-obj-y += petalogix_ml605_mmu.o
-obj-y += xlnx-zynqmp-pmu.o
+obj-$(CONFIG_PETALOGIX_S3ADSP1800) += petalogix_s3adsp1800_mmu.o
+obj-$(CONFIG_PETALOGIX_ML605) += petalogix_ml605_mmu.o
+obj-$(CONFIG_XLNX_ZYNQMP_PMU) += xlnx-zynqmp-pmu.o
 obj-y += boot.o
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 10/52] hw/mips/Makefile.objs: Create CONFIG_* for r4k, malta, mipssim boards
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (8 preceding siblings ...)
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 09/52] hw/microblaze/Makefile.objs: Create configs for petalogix and xilinx boards Paolo Bonzini
@ 2019-01-25 10:06 ` Paolo Bonzini
  2019-01-31 21:50   ` Philippe Mathieu-Daudé
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 11/52] hw/ppc/Makefile.objs: Build all boards conditinally with CONFIG_* Paolo Bonzini
                   ` (51 subsequent siblings)
  61 siblings, 1 reply; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth, Ákos Kovács

From: Ákos Kovács <akoskovacs@gmx.com>

Add the new configs to default-configs/mips*-sofmmu.mak.

Signed-off-by: Ákos Kovács <akoskovacs@gmx.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <20190123065618.3520-8-yang.zhong@intel.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/mips-softmmu-common.mak | 3 +++
 hw/mips/Makefile.objs                   | 5 +++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/default-configs/mips-softmmu-common.mak b/default-configs/mips-softmmu-common.mak
index fae2347..479fb4d 100644
--- a/default-configs/mips-softmmu-common.mak
+++ b/default-configs/mips-softmmu-common.mak
@@ -36,3 +36,6 @@ CONFIG_EMPTY_SLOT=y
 CONFIG_MIPS_CPS=y
 CONFIG_MIPS_ITU=y
 CONFIG_I2C=y
+CONFIG_R4K=y
+CONFIG_MALTA=y
+CONFIG_MIPSSIM=y
diff --git a/hw/mips/Makefile.objs b/hw/mips/Makefile.objs
index 17a311a..525809a 100644
--- a/hw/mips/Makefile.objs
+++ b/hw/mips/Makefile.objs
@@ -1,7 +1,8 @@
-obj-y += mips_r4k.o mips_malta.o mips_mipssim.o
 obj-y += addr.o mips_int.o
+obj-$(CONFIG_R4K) += mips_r4k.o
+obj-$(CONFIG_MALTA) += gt64xxx_pci.o mips_malta.o
+obj-$(CONFIG_MIPSSIM) += mips_mipssim.o
 obj-$(CONFIG_JAZZ) += mips_jazz.o
 obj-$(CONFIG_FULONG) += mips_fulong2e.o
-obj-y += gt64xxx_pci.o
 obj-$(CONFIG_MIPS_CPS) += cps.o
 obj-$(CONFIG_MIPS_BOSTON) += boston.o
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 11/52] hw/ppc/Makefile.objs: Build all boards conditinally with CONFIG_*
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (9 preceding siblings ...)
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 10/52] hw/mips/Makefile.objs: Create CONFIG_* for r4k, malta, mipssim boards Paolo Bonzini
@ 2019-01-25 10:06 ` Paolo Bonzini
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 12/52] hw/sh4/Makefile.objs: New CONFIG_* varibales created for sh4 boards and device Paolo Bonzini
                   ` (50 subsequent siblings)
  61 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth, Ákos Kovács

From: Ákos Kovács <akoskovacs@gmx.com>

CONFIG_PPC405, CONFIG_PPC440, CONFIG_MAC_OLDWORLD, CONFIG_MAX_NEWWORLD
and CONFIG_VIRTEX configuration options created for
default-configs/ppc*-softmmu.mak.

Signed-off-by: Ákos Kovács <akoskovacs@gmx.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <20190123065618.3520-9-yang.zhong@intel.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/ppc-softmmu.mak |  7 ++++++-
 hw/ppc/Makefile.objs            | 11 ++++++-----
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
index 23d871f..7f80f0c 100644
--- a/default-configs/ppc-softmmu.mak
+++ b/default-configs/ppc-softmmu.mak
@@ -21,6 +21,10 @@ CONFIG_E500=y
 CONFIG_OPENPIC_KVM=$(call land,$(CONFIG_E500),$(CONFIG_KVM))
 CONFIG_PLATFORM_BUS=y
 CONFIG_ETSEC=y
+CONFIG_PPC405=y
+CONFIG_PPC440=y
+CONFIG_VIRTEX=y
+
 # For Sam460ex
 CONFIG_SAM460EX=y
 CONFIG_USB_EHCI_SYSBUS=y
@@ -34,7 +38,6 @@ CONFIG_M41T80=y
 CONFIG_VGA_CIRRUS=y
 
 # For Macs
-CONFIG_MAC=y
 CONFIG_ESCC=y
 CONFIG_MACIO=y
 CONFIG_MACIO_GPIO=y
@@ -50,6 +53,8 @@ CONFIG_GRACKLE_PCI=y
 CONFIG_UNIN_PCI=y
 CONFIG_DEC_PCI=y
 CONFIG_IDE_MACIO=y
+CONFIG_MAC_OLDWORLD=y
+CONFIG_MAC_NEWWORLD=y
 
 # For PReP
 CONFIG_PREP=y
diff --git a/hw/ppc/Makefile.objs b/hw/ppc/Makefile.objs
index 4e0c1c0..7d815b7 100644
--- a/hw/ppc/Makefile.objs
+++ b/hw/ppc/Makefile.objs
@@ -14,19 +14,20 @@ endif
 obj-$(CONFIG_PSERIES) += spapr_rtas_ddw.o
 # PowerPC 4xx boards
 obj-y += ppc4xx_devs.o ppc405_uc.o
-obj-$(CONFIG_PPC4XX) += ppc4xx_pci.o ppc405_boards.o
-obj-$(CONFIG_PPC4XX) += ppc440_bamboo.o ppc440_pcix.o ppc440_uc.o
+obj-$(CONFIG_PPC405) += ppc405_boards.o
+obj-$(CONFIG_PPC440) += ppc440_bamboo.o ppc440_pcix.o ppc440_uc.o
+obj-$(CONFIG_PPC4XX) += ppc4xx_pci.o
 obj-$(CONFIG_SAM460EX) += sam460ex.o
 # PReP
 obj-$(CONFIG_PREP) += prep.o
 obj-$(CONFIG_PREP) += prep_systemio.o
 obj-${CONFIG_RS6000_MC} += rs6000_mc.o
 # OldWorld PowerMac
-obj-$(CONFIG_MAC) += mac_oldworld.o
+obj-$(CONFIG_MAC_OLDWORLD) += mac_oldworld.o
 # NewWorld PowerMac
-obj-$(CONFIG_MAC) += mac_newworld.o
+obj-$(CONFIG_MAC_NEWWORLD) += mac_newworld.o
 # e500
 obj-$(CONFIG_E500) += e500.o mpc8544ds.o e500plat.o
 obj-$(CONFIG_E500) += mpc8544_guts.o ppce500_spin.o
 # PowerPC 440 Xilinx ML507 reference board.
-obj-$(CONFIG_XILINX) += virtex_ml507.o
+obj-$(CONFIG_VIRTEX) += virtex_ml507.o
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 12/52] hw/sh4/Makefile.objs: New CONFIG_* varibales created for sh4 boards and device
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (10 preceding siblings ...)
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 11/52] hw/ppc/Makefile.objs: Build all boards conditinally with CONFIG_* Paolo Bonzini
@ 2019-01-25 10:06 ` Paolo Bonzini
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 13/52] hw/s390/Makefile.objs: Create new CONFIG_* variables for s390x boards and devices Paolo Bonzini
                   ` (49 subsequent siblings)
  61 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth, Ákos Kovács

From: Ákos Kovács <akoskovacs@gmx.com>

Make hw/sh4 configurable and add new CONFIG_* to the default-configs/sh4*-softmmu.mak.

Signed-off-by: Ákos Kovács <akoskovacs@gmx.com>
Message-Id: <20190123065618.3520-10-yang.zhong@intel.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/sh4-softmmu.mak   | 2 ++
 default-configs/sh4eb-softmmu.mak | 2 ++
 hw/sh4/Makefile.objs              | 4 ++--
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/default-configs/sh4-softmmu.mak b/default-configs/sh4-softmmu.mak
index caeccd5..1fdb009 100644
--- a/default-configs/sh4-softmmu.mak
+++ b/default-configs/sh4-softmmu.mak
@@ -19,3 +19,5 @@ CONFIG_PCSPK=y
 CONFIG_I82374=y
 CONFIG_I8257=y
 CONFIG_MC146818RTC=y
+CONFIG_R2D=y
+CONFIG_SHIX=y
diff --git a/default-configs/sh4eb-softmmu.mak b/default-configs/sh4eb-softmmu.mak
index 53b9cd7..3b550a5 100644
--- a/default-configs/sh4eb-softmmu.mak
+++ b/default-configs/sh4eb-softmmu.mak
@@ -19,3 +19,5 @@ CONFIG_PCSPK=y
 CONFIG_I82374=y
 CONFIG_I8257=y
 CONFIG_MC146818RTC=y
+CONFIG_R2D=y
+CONFIG_SHIX=y
diff --git a/hw/sh4/Makefile.objs b/hw/sh4/Makefile.objs
index 2393702..2a707f9 100644
--- a/hw/sh4/Makefile.objs
+++ b/hw/sh4/Makefile.objs
@@ -1,4 +1,4 @@
-obj-y += shix.o r2d.o
-
 obj-y += sh7750.o sh7750_regnames.o
 obj-y += sh_pci.o
+obj-$(CONFIG_R2D) +=  r2d.o
+obj-$(CONFIG_SHIX) += shix.o
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 13/52] hw/s390/Makefile.objs: Create new CONFIG_* variables for s390x boards and devices
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (11 preceding siblings ...)
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 12/52] hw/sh4/Makefile.objs: New CONFIG_* varibales created for sh4 boards and device Paolo Bonzini
@ 2019-01-25 10:06 ` Paolo Bonzini
  2019-01-25 15:17   ` Thomas Huth
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 14/52] hw/sparc/Makefile.objs: CONFIG_* for sun4m and leon3 created Paolo Bonzini
                   ` (48 subsequent siblings)
  61 siblings, 1 reply; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

Make hw/s390x configurable and add new CONFIG_* to the default-configs/s390x*-softmmu.mak.
This will be used to enable/disable vfio-ccw.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20190123065618.3520-10-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/s390x-softmmu.mak | 1 +
 hw/s390x/Makefile.objs            | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/default-configs/s390x-softmmu.mak b/default-configs/s390x-softmmu.mak
index 5eef375..8bb7e43 100644
--- a/default-configs/s390x-softmmu.mak
+++ b/default-configs/s390x-softmmu.mak
@@ -8,3 +8,4 @@ CONFIG_S390_FLIC_KVM=$(CONFIG_KVM)
 CONFIG_VFIO_CCW=$(CONFIG_LINUX)
 CONFIG_WDT_DIAG288=y
 CONFIG_VFIO_AP=$(CONFIG_LINUX)
+CONFIG_S390_CCW_VIRTIO=y
diff --git a/hw/s390x/Makefile.objs b/hw/s390x/Makefile.objs
index ca68806..a884aae 100644
--- a/hw/s390x/Makefile.objs
+++ b/hw/s390x/Makefile.objs
@@ -1,3 +1,4 @@
+ifeq ($(CONFIG_S390_CCW_VIRTIO),y)
 obj-y += s390-virtio-hcall.o
 obj-y += sclp.o
 obj-y += event-facility.o
@@ -33,3 +34,4 @@ obj-$(CONFIG_KVM) += s390-stattrib-kvm.o
 obj-y += s390-ccw.o
 obj-y += ap-device.o
 obj-y += ap-bridge.o
+endif
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 14/52] hw/sparc/Makefile.objs: CONFIG_* for sun4m and leon3 created
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (12 preceding siblings ...)
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 13/52] hw/s390/Makefile.objs: Create new CONFIG_* variables for s390x boards and devices Paolo Bonzini
@ 2019-01-25 10:06 ` Paolo Bonzini
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 15/52] hw/lm32/Makefile.objs: Conditionally build lm32 and milkmyst Paolo Bonzini
                   ` (47 subsequent siblings)
  61 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth, Ákos Kovács

From: Ákos Kovács <akoskovacs@gmx.com>

CONFIG_LEON3 added to default-configs/sparc-softmmu.mak.

Signed-off-by: Ákos Kovács <akoskovacs@gmx.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20190123065618.3520-11-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/sparc-softmmu.mak | 2 ++
 hw/sparc/Makefile.objs            | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/default-configs/sparc-softmmu.mak b/default-configs/sparc-softmmu.mak
index 12f97ee..59a4a3d 100644
--- a/default-configs/sparc-softmmu.mak
+++ b/default-configs/sparc-softmmu.mak
@@ -18,4 +18,6 @@ CONFIG_CS4231=y
 CONFIG_GRLIB=y
 CONFIG_STP2000=y
 CONFIG_ECCMEMCTL=y
+
 CONFIG_SUN4M=y
+CONFIG_LEON3=y
diff --git a/hw/sparc/Makefile.objs b/hw/sparc/Makefile.objs
index e2d0828..d57e33f 100644
--- a/hw/sparc/Makefile.objs
+++ b/hw/sparc/Makefile.objs
@@ -1 +1,3 @@
-obj-y += sun4m_iommu.o sun4m.o leon3.o
+obj-$(CONFIG_SUN4M) += sun4m_iommu.o
+obj-$(CONFIG_SUN4M) += sun4m.o
+obj-$(CONFIG_LEON3) += leon3.o
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 15/52] hw/lm32/Makefile.objs: Conditionally build lm32 and milkmyst
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (13 preceding siblings ...)
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 14/52] hw/sparc/Makefile.objs: CONFIG_* for sun4m and leon3 created Paolo Bonzini
@ 2019-01-25 10:06 ` Paolo Bonzini
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 16/52] hw/xtensa/Makefile.objs: Build xtensa_sim and xtensa_fpga conditionally Paolo Bonzini
                   ` (46 subsequent siblings)
  61 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth, Ákos Kovács

From: Ákos Kovács <akoskovacs@gmx.com>

CONFIG_LM32 and CONFIG_MILKYMIST added for lm32 and milkmyst build.

Signed-off-by: Ákos Kovács <akoskovacs@gmx.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20190123065618.3520-12-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/lm32/Makefile.objs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/lm32/Makefile.objs b/hw/lm32/Makefile.objs
index ea6418a..c394186 100644
--- a/hw/lm32/Makefile.objs
+++ b/hw/lm32/Makefile.objs
@@ -1,3 +1,3 @@
 # LM32 boards
-obj-y += lm32_boards.o
-obj-y += milkymist.o
+obj-$(CONFIG_LM32) += lm32_boards.o
+obj-$(CONFIG_MILKYMIST) += milkymist.o
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 16/52] hw/xtensa/Makefile.objs: Build xtensa_sim and xtensa_fpga conditionally
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (14 preceding siblings ...)
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 15/52] hw/lm32/Makefile.objs: Conditionally build lm32 and milkmyst Paolo Bonzini
@ 2019-01-25 10:06 ` Paolo Bonzini
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 17/52] hw/nios2/Makefile.objs: Conditionally build nios2 Paolo Bonzini
                   ` (45 subsequent siblings)
  61 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth, Ákos Kovács

From: Ákos Kovács <akoskovacs@gmx.com>

Add the new CONFIG_* values to default-config/xtensa*-softmmu.mak.

Signed-off-by: Ákos Kovács <akoskovacs@gmx.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Acked-by: Max Filippov <jcmvbkbc@gmail.com>
Message-Id: <20190123065618.3520-13-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/xtensa-softmmu.mak   | 3 +++
 default-configs/xtensaeb-softmmu.mak | 3 +++
 hw/xtensa/Makefile.objs              | 4 ++--
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/default-configs/xtensa-softmmu.mak b/default-configs/xtensa-softmmu.mak
index 9d8899c..baf90ca 100644
--- a/default-configs/xtensa-softmmu.mak
+++ b/default-configs/xtensa-softmmu.mak
@@ -3,3 +3,6 @@
 CONFIG_SERIAL=y
 CONFIG_OPENCORES_ETH=y
 CONFIG_PFLASH_CFI01=y
+
+CONFIG_XTENSA_SIM=y
+CONFIG_XTENSA_FPGA=y
diff --git a/default-configs/xtensaeb-softmmu.mak b/default-configs/xtensaeb-softmmu.mak
index 9d8899c..baf90ca 100644
--- a/default-configs/xtensaeb-softmmu.mak
+++ b/default-configs/xtensaeb-softmmu.mak
@@ -3,3 +3,6 @@
 CONFIG_SERIAL=y
 CONFIG_OPENCORES_ETH=y
 CONFIG_PFLASH_CFI01=y
+
+CONFIG_XTENSA_SIM=y
+CONFIG_XTENSA_FPGA=y
diff --git a/hw/xtensa/Makefile.objs b/hw/xtensa/Makefile.objs
index cb4998d..62e244f 100644
--- a/hw/xtensa/Makefile.objs
+++ b/hw/xtensa/Makefile.objs
@@ -1,4 +1,4 @@
 obj-y += pic_cpu.o
-obj-y += sim.o
 obj-y += xtensa_memory.o
-obj-y += xtfpga.o
+obj-$(CONFIG_XTENSA_SIM) += sim.o
+obj-$(CONFIG_XTENSA_FPGA) += xtfpga.o
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 17/52] hw/nios2/Makefile.objs: Conditionally build nios2
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (15 preceding siblings ...)
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 16/52] hw/xtensa/Makefile.objs: Build xtensa_sim and xtensa_fpga conditionally Paolo Bonzini
@ 2019-01-25 10:06 ` Paolo Bonzini
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 18/52] hw/riscv/Makefile.objs: Create CONFIG_* for riscv boards Paolo Bonzini
                   ` (44 subsequent siblings)
  61 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

From: Yang Zhong <yang.zhong@intel.com>

CONFIG_NIOS2_10M50 added for 10m50 dev board.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20190123065618.3520-14-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/nios2-softmmu.mak | 1 +
 hw/nios2/Makefile.objs            | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/default-configs/nios2-softmmu.mak b/default-configs/nios2-softmmu.mak
index 74dc70c..ab42d0f 100644
--- a/default-configs/nios2-softmmu.mak
+++ b/default-configs/nios2-softmmu.mak
@@ -4,3 +4,4 @@ CONFIG_NIOS2=y
 CONFIG_SERIAL=y
 CONFIG_PTIMER=y
 CONFIG_ALTERA_TIMER=y
+CONFIG_NIOS2_10M50=y
diff --git a/hw/nios2/Makefile.objs b/hw/nios2/Makefile.objs
index 6b5c421..89a419a 100644
--- a/hw/nios2/Makefile.objs
+++ b/hw/nios2/Makefile.objs
@@ -1 +1,2 @@
-obj-y = boot.o cpu_pic.o 10m50_devboard.o
+obj-y = boot.o cpu_pic.o
+obj-$(CONFIG_NIOS2_10M50) += 10m50_devboard.o
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 18/52] hw/riscv/Makefile.objs: Create CONFIG_* for riscv boards
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (16 preceding siblings ...)
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 17/52] hw/nios2/Makefile.objs: Conditionally build nios2 Paolo Bonzini
@ 2019-01-25 10:06 ` Paolo Bonzini
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 19/52] hw/sparc64/Makefile.objs: Create CONFIG_* for sparc64 Paolo Bonzini
                   ` (43 subsequent siblings)
  61 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

From: Yang Zhong <yang.zhong@intel.com>

Add the new configs to default-configs/riscv*-sofmmu.mak.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <20190123065618.3520-15-yang.zhong@intel.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/riscv32-softmmu.mak |  7 +++++++
 default-configs/riscv64-softmmu.mak |  7 +++++++
 hw/riscv/Makefile.objs              | 22 +++++++++++-----------
 3 files changed, 25 insertions(+), 11 deletions(-)

diff --git a/default-configs/riscv32-softmmu.mak b/default-configs/riscv32-softmmu.mak
index fbfd1d4..6533716 100644
--- a/default-configs/riscv32-softmmu.mak
+++ b/default-configs/riscv32-softmmu.mak
@@ -12,3 +12,10 @@ CONFIG_PCI_EXPRESS_GENERIC_BRIDGE=y
 
 CONFIG_VGA=y
 CONFIG_VGA_PCI=y
+
+CONFIG_SPIKE=y
+CONFIG_HART=y
+CONFIG_SIFIVE_E=y
+CONFIG_SIFIVE=y
+CONFIG_SIFIVE_U=y
+CONFIG_RISCV_VIRT=y
diff --git a/default-configs/riscv64-softmmu.mak b/default-configs/riscv64-softmmu.mak
index fbfd1d4..6533716 100644
--- a/default-configs/riscv64-softmmu.mak
+++ b/default-configs/riscv64-softmmu.mak
@@ -12,3 +12,10 @@ CONFIG_PCI_EXPRESS_GENERIC_BRIDGE=y
 
 CONFIG_VGA=y
 CONFIG_VGA_PCI=y
+
+CONFIG_SPIKE=y
+CONFIG_HART=y
+CONFIG_SIFIVE_E=y
+CONFIG_SIFIVE=y
+CONFIG_SIFIVE_U=y
+CONFIG_RISCV_VIRT=y
diff --git a/hw/riscv/Makefile.objs b/hw/riscv/Makefile.objs
index 1dde01d..79bfb3a 100644
--- a/hw/riscv/Makefile.objs
+++ b/hw/riscv/Makefile.objs
@@ -1,11 +1,11 @@
-obj-y += riscv_htif.o
-obj-y += riscv_hart.o
-obj-y += sifive_e.o
-obj-y += sifive_clint.o
-obj-y += sifive_prci.o
-obj-y += sifive_plic.o
-obj-y += sifive_test.o
-obj-y += sifive_u.o
-obj-y += sifive_uart.o
-obj-y += spike.o
-obj-y += virt.o
+obj-$(CONFIG_SPIKE) += riscv_htif.o
+obj-$(CONFIG_HART) += riscv_hart.o
+obj-$(CONFIG_SIFIVE_E) += sifive_e.o
+obj-$(CONFIG_SIFIVE) += sifive_clint.o
+obj-$(CONFIG_SIFIVE) += sifive_prci.o
+obj-$(CONFIG_SIFIVE) += sifive_plic.o
+obj-$(CONFIG_SIFIVE) += sifive_test.o
+obj-$(CONFIG_SIFIVE_U) += sifive_u.o
+obj-$(CONFIG_SIFIVE) += sifive_uart.o
+obj-$(CONFIG_SPIKE) += spike.o
+obj-$(CONFIG_RISCV_VIRT) += virt.o
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 19/52] hw/sparc64/Makefile.objs: Create CONFIG_* for sparc64
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (17 preceding siblings ...)
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 18/52] hw/riscv/Makefile.objs: Create CONFIG_* for riscv boards Paolo Bonzini
@ 2019-01-25 10:06 ` Paolo Bonzini
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 20/52] hw/alpha/Makefile.objs: Create CONFIG_* for alpha Paolo Bonzini
                   ` (42 subsequent siblings)
  61 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

From: Yang Zhong <yang.zhong@intel.com>

Add the new configs to default-configs/sparc64-sofmmu.mak.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20190123065618.3520-16-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/sparc64-softmmu.mak | 2 ++
 hw/sparc64/Makefile.objs            | 6 +++---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/default-configs/sparc64-softmmu.mak b/default-configs/sparc64-softmmu.mak
index ce63d47..1fae488 100644
--- a/default-configs/sparc64-softmmu.mak
+++ b/default-configs/sparc64-softmmu.mak
@@ -17,3 +17,5 @@ CONFIG_SUNHME=y
 CONFIG_MC146818RTC=y
 CONFIG_ISA_TESTDEV=y
 CONFIG_SUN4V_RTC=y
+CONFIG_SUN4U=y
+CONFIG_NIAGARA=y
diff --git a/hw/sparc64/Makefile.objs b/hw/sparc64/Makefile.objs
index 117e0ff..af0525c 100644
--- a/hw/sparc64/Makefile.objs
+++ b/hw/sparc64/Makefile.objs
@@ -1,4 +1,4 @@
 obj-y += sparc64.o
-obj-y += sun4u_iommu.o
-obj-y += sun4u.o
-obj-y += niagara.o
\ No newline at end of file
+obj-$(CONFIG_SUN4U) += sun4u_iommu.o
+obj-$(CONFIG_SUN4U) += sun4u.o
+obj-$(CONFIG_NIAGARA) += niagara.o
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 20/52] hw/alpha/Makefile.objs: Create CONFIG_* for alpha
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (18 preceding siblings ...)
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 19/52] hw/sparc64/Makefile.objs: Create CONFIG_* for sparc64 Paolo Bonzini
@ 2019-01-25 10:06 ` Paolo Bonzini
  2019-01-25 15:29   ` Thomas Huth
  2019-01-25 20:04   ` Richard Henderson
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 21/52] hw/cris/Makefile.objs: Create CONFIG_* for cris Paolo Bonzini
                   ` (41 subsequent siblings)
  61 siblings, 2 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

From: Yang Zhong <yang.zhong@intel.com>

Add the new configs to default-configs/alpha-sofmmu.mak.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <20190123065618.3520-17-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/alpha-softmmu.mak | 1 +
 hw/alpha/Makefile.objs            | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/default-configs/alpha-softmmu.mak b/default-configs/alpha-softmmu.mak
index 4d654ea..49cb7ce 100644
--- a/default-configs/alpha-softmmu.mak
+++ b/default-configs/alpha-softmmu.mak
@@ -19,3 +19,4 @@ CONFIG_I8259=y
 CONFIG_MC146818RTC=y
 CONFIG_ISA_TESTDEV=y
 CONFIG_SMC37C669=y
+CONFIG_DP264=y
diff --git a/hw/alpha/Makefile.objs b/hw/alpha/Makefile.objs
index 5c74275..62fdf3e 100644
--- a/hw/alpha/Makefile.objs
+++ b/hw/alpha/Makefile.objs
@@ -1 +1 @@
-obj-y += dp264.o pci.o typhoon.o
+obj-$(CONFIG_DP264) += dp264.o pci.o typhoon.o
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 21/52] hw/cris/Makefile.objs: Create CONFIG_* for cris
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (19 preceding siblings ...)
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 20/52] hw/alpha/Makefile.objs: Create CONFIG_* for alpha Paolo Bonzini
@ 2019-01-25 10:06 ` Paolo Bonzini
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 22/52] hw/hppa/Makefile.objs: Create CONFIG_* for hppa Paolo Bonzini
                   ` (40 subsequent siblings)
  61 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

From: Yang Zhong <yang.zhong@intel.com>

Add the new configs to default-configs/cris-sofmmu.mak.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <20190123065618.3520-18-yang.zhong@intel.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/cris-softmmu.mak | 1 +
 hw/cris/Makefile.objs            | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/default-configs/cris-softmmu.mak b/default-configs/cris-softmmu.mak
index d970d50..a637c4b 100644
--- a/default-configs/cris-softmmu.mak
+++ b/default-configs/cris-softmmu.mak
@@ -4,3 +4,4 @@ CONFIG_ETRAXFS=y
 CONFIG_NAND=y
 CONFIG_PTIMER=y
 CONFIG_PFLASH_CFI02=y
+CONFIG_AXIS=y
diff --git a/hw/cris/Makefile.objs b/hw/cris/Makefile.objs
index 7624173..a4a27b3 100644
--- a/hw/cris/Makefile.objs
+++ b/hw/cris/Makefile.objs
@@ -1,2 +1,2 @@
 obj-y += boot.o
-obj-y += axis_dev88.o
+obj-$(CONFIG_AXIS) += axis_dev88.o
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 22/52] hw/hppa/Makefile.objs: Create CONFIG_* for hppa
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (20 preceding siblings ...)
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 21/52] hw/cris/Makefile.objs: Create CONFIG_* for cris Paolo Bonzini
@ 2019-01-25 10:06 ` Paolo Bonzini
  2019-01-25 20:05   ` Richard Henderson
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 23/52] hw/moxie/Makefile.objs: Conditionally build moxie Paolo Bonzini
                   ` (39 subsequent siblings)
  61 siblings, 1 reply; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

From: Yang Zhong <yang.zhong@intel.com>

Add the new configs to default-configs/hppa-sofmmu.mak.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <20190123065618.3520-19-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/hppa-softmmu.mak | 1 +
 hw/hppa/Makefile.objs            | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/default-configs/hppa-softmmu.mak b/default-configs/hppa-softmmu.mak
index 4badc05..b594a6d 100644
--- a/default-configs/hppa-softmmu.mak
+++ b/default-configs/hppa-softmmu.mak
@@ -10,3 +10,4 @@ CONFIG_IDE_CMD646=y
 # CONFIG_IDE_MMIO=y
 CONFIG_VIRTIO_VGA=y
 CONFIG_MC146818RTC=y
+CONFIG_DINO=y
diff --git a/hw/hppa/Makefile.objs b/hw/hppa/Makefile.objs
index bef241e..67838f5 100644
--- a/hw/hppa/Makefile.objs
+++ b/hw/hppa/Makefile.objs
@@ -1 +1 @@
-obj-y += machine.o pci.o dino.o
+obj-$(CONFIG_DINO) += pci.o machine.o dino.o
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 23/52] hw/moxie/Makefile.objs: Conditionally build moxie
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (21 preceding siblings ...)
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 22/52] hw/hppa/Makefile.objs: Create CONFIG_* for hppa Paolo Bonzini
@ 2019-01-25 10:06 ` Paolo Bonzini
  2019-01-25 15:33   ` Thomas Huth
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 24/52] hw/openrisc/Makefile.objs: Create CONFIG_* for openrisc Paolo Bonzini
                   ` (38 subsequent siblings)
  61 siblings, 1 reply; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

From: Yang Zhong <yang.zhong@intel.com>

CONFIG_MOXIE added for moxiesim board.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <20190123065618.3520-20-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/moxie-softmmu.mak | 1 +
 hw/moxie/Makefile.objs            | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/default-configs/moxie-softmmu.mak b/default-configs/moxie-softmmu.mak
index e00d099..b176563 100644
--- a/default-configs/moxie-softmmu.mak
+++ b/default-configs/moxie-softmmu.mak
@@ -5,3 +5,4 @@ CONFIG_MC146818RTC=y
 CONFIG_SERIAL=y
 CONFIG_SERIAL_ISA=y
 CONFIG_VGA=y
+CONFIG_MOXIE=y
diff --git a/hw/moxie/Makefile.objs b/hw/moxie/Makefile.objs
index bfc9001..cb575ef 100644
--- a/hw/moxie/Makefile.objs
+++ b/hw/moxie/Makefile.objs
@@ -1,2 +1,2 @@
 # moxie boards
-obj-y += moxiesim.o
+obj-$(CONFIG_MOXIE) += moxiesim.o
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 24/52] hw/openrisc/Makefile.objs: Create CONFIG_* for openrisc
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (22 preceding siblings ...)
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 23/52] hw/moxie/Makefile.objs: Conditionally build moxie Paolo Bonzini
@ 2019-01-25 10:06 ` Paolo Bonzini
  2019-01-25 15:35   ` Thomas Huth
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 25/52] hw/tricore/Makefile.objs: Create CONFIG_* for tricore Paolo Bonzini
                   ` (37 subsequent siblings)
  61 siblings, 1 reply; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

From: Yang Zhong <yang.zhong@intel.com>

Add the new configs to default-configs/or1k-sofmmu.mak.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <20190123065618.3520-21-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/or1k-softmmu.mak | 1 +
 hw/openrisc/Makefile.objs        | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/default-configs/or1k-softmmu.mak b/default-configs/or1k-softmmu.mak
index 6f5824f..85a7e69 100644
--- a/default-configs/or1k-softmmu.mak
+++ b/default-configs/or1k-softmmu.mak
@@ -3,3 +3,4 @@
 CONFIG_SERIAL=y
 CONFIG_OPENCORES_ETH=y
 CONFIG_OMPIC=y
+CONFIG_OPENRISC=y
diff --git a/hw/openrisc/Makefile.objs b/hw/openrisc/Makefile.objs
index 61246b1..8dc413c 100644
--- a/hw/openrisc/Makefile.objs
+++ b/hw/openrisc/Makefile.objs
@@ -1,2 +1,2 @@
 obj-y = pic_cpu.o cputimer.o
-obj-y += openrisc_sim.o 
+obj-$(CONFIG_OPENRISC) += openrisc_sim.o
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 25/52] hw/tricore/Makefile.objs: Create CONFIG_* for tricore
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (23 preceding siblings ...)
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 24/52] hw/openrisc/Makefile.objs: Create CONFIG_* for openrisc Paolo Bonzini
@ 2019-01-25 10:06 ` Paolo Bonzini
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 26/52] hw/i2c/Makefile.objs: Create new CONFIG_* variables for EEPROM and ACPI controller Paolo Bonzini
                   ` (36 subsequent siblings)
  61 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

From: Yang Zhong <yang.zhong@intel.com>

Add the new configs to default-configs/tricore-sofmmu.mak.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <20190123065618.3520-22-yang.zhong@intel.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/tricore-softmmu.mak | 1 +
 hw/tricore/Makefile.objs            | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/default-configs/tricore-softmmu.mak b/default-configs/tricore-softmmu.mak
index e69de29..c397cff 100644
--- a/default-configs/tricore-softmmu.mak
+++ b/default-configs/tricore-softmmu.mak
@@ -0,0 +1 @@
+CONFIG_TRICORE=y
diff --git a/hw/tricore/Makefile.objs b/hw/tricore/Makefile.objs
index 435e095..5501f6c 100644
--- a/hw/tricore/Makefile.objs
+++ b/hw/tricore/Makefile.objs
@@ -1 +1 @@
-obj-y += tricore_testboard.o
+obj-$(CONFIG_TRICORE) += tricore_testboard.o
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 26/52] hw/i2c/Makefile.objs: Create new CONFIG_* variables for EEPROM and ACPI controller
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (24 preceding siblings ...)
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 25/52] hw/tricore/Makefile.objs: Create CONFIG_* for tricore Paolo Bonzini
@ 2019-01-25 10:06 ` Paolo Bonzini
  2019-01-25 15:42   ` Thomas Huth
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 27/52] hw/vfio/Makefile.objs: Create new CONFIG_* variables for VFIO core and PCI Paolo Bonzini
                   ` (35 subsequent siblings)
  61 siblings, 1 reply; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

Create separate variables for these components, they are used in many boards
but not all.  This allows finer-grain selection of the included code with
default-configs/*.mak.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20190123065618.3520-10-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/arm-softmmu.mak         | 1 +
 default-configs/i386-softmmu.mak        | 2 ++
 default-configs/mips-softmmu-common.mak | 2 ++
 default-configs/ppc-softmmu.mak         | 1 +
 hw/i2c/Makefile.objs                    | 5 +++--
 5 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index 68deb1c..caf7d7e 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -150,6 +150,7 @@ CONFIG_ACPI=y
 CONFIG_VIRT=y
 CONFIG_SMBIOS=y
 CONFIG_ASPEED_SOC=y
+CONFIG_SMBUS_EEPROM=y
 CONFIG_GPIO_KEY=y
 CONFIG_MSF2=y
 CONFIG_FW_CFG_DMA=y
diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmmu.mak
index 71c9f6f..15b6287 100644
--- a/default-configs/i386-softmmu.mak
+++ b/default-configs/i386-softmmu.mak
@@ -62,6 +62,8 @@ CONFIG_I82801B11=y
 CONFIG_SMBIOS=y
 CONFIG_PXB=y
 CONFIG_ACPI_VMGENID=y
+CONFIG_ACPI_SMBUS=y
+CONFIG_SMBUS_EEPROM=y
 CONFIG_FW_CFG_DMA=y
 CONFIG_I2C=y
 CONFIG_SEV=$(CONFIG_KVM)
diff --git a/default-configs/mips-softmmu-common.mak b/default-configs/mips-softmmu-common.mak
index 479fb4d..ded7498 100644
--- a/default-configs/mips-softmmu-common.mak
+++ b/default-configs/mips-softmmu-common.mak
@@ -39,3 +39,5 @@ CONFIG_I2C=y
 CONFIG_R4K=y
 CONFIG_MALTA=y
 CONFIG_MIPSSIM=y
+CONFIG_ACPI_SMBUS=y
+CONFIG_SMBUS_EEPROM=y
diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
index 7f80f0c..52acb7c 100644
--- a/default-configs/ppc-softmmu.mak
+++ b/default-configs/ppc-softmmu.mak
@@ -36,6 +36,7 @@ CONFIG_AT24C=y
 CONFIG_BITBANG_I2C=y
 CONFIG_M41T80=y
 CONFIG_VGA_CIRRUS=y
+CONFIG_SMBUS_EEPROM=y
 
 # For Macs
 CONFIG_ESCC=y
diff --git a/hw/i2c/Makefile.objs b/hw/i2c/Makefile.objs
index 37cacde..61ac50a 100644
--- a/hw/i2c/Makefile.objs
+++ b/hw/i2c/Makefile.objs
@@ -1,8 +1,9 @@
-common-obj-$(CONFIG_I2C) += core.o smbus.o smbus_eeprom.o
+common-obj-$(CONFIG_I2C) += core.o smbus.o
+common-obj-$(CONFIG_SMBUS_EEPROM) += smbus_eeprom.o
 common-obj-$(CONFIG_DDC) += i2c-ddc.o
 common-obj-$(CONFIG_VERSATILE_I2C) += versatile_i2c.o
 common-obj-$(CONFIG_ACPI_X86) += smbus_ich9.o
-common-obj-$(CONFIG_APM) += pm_smbus.o
+common-obj-$(CONFIG_ACPI_SMBUS) += pm_smbus.o
 common-obj-$(CONFIG_BITBANG_I2C) += bitbang_i2c.o
 common-obj-$(CONFIG_EXYNOS4) += exynos4210_i2c.o
 common-obj-$(CONFIG_IMX_I2C) += imx_i2c.o
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 27/52] hw/vfio/Makefile.objs: Create new CONFIG_* variables for VFIO core and PCI
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (25 preceding siblings ...)
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 26/52] hw/i2c/Makefile.objs: Create new CONFIG_* variables for EEPROM and ACPI controller Paolo Bonzini
@ 2019-01-25 10:06 ` Paolo Bonzini
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 28/52] minikconfig: add parser skeleton Paolo Bonzini
                   ` (34 subsequent siblings)
  61 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

Make hw/vfio configurable and add new CONFIG_VFIO_* to the
default-configs/s390x*-softmmu.mak.  This allow a finer-grain selection
of the various VFIO backends.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20190123065618.3520-10-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/arm-softmmu.mak   | 2 ++
 default-configs/pci.mak           | 2 ++
 default-configs/ppc64-softmmu.mak | 1 +
 default-configs/s390x-softmmu.mak | 5 +++--
 hw/Makefile.objs                  | 2 +-
 hw/vfio/Makefile.objs             | 7 +++----
 6 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index caf7d7e..4f0ecba 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -123,6 +123,8 @@ CONFIG_VERSATILE_PCI=y
 CONFIG_VERSATILE_I2C=y
 
 CONFIG_PCI_EXPRESS_GENERIC_BRIDGE=y
+CONFIG_VFIO=$(CONFIG_LINUX)
+CONFIG_VFIO_PLATFORM=y
 CONFIG_VFIO_XGMAC=y
 CONFIG_VFIO_AMD_XGBE=y
 
diff --git a/default-configs/pci.mak b/default-configs/pci.mak
index 83738cb..037636f 100644
--- a/default-configs/pci.mak
+++ b/default-configs/pci.mak
@@ -47,3 +47,5 @@ CONFIG_VGA_PCI=y
 CONFIG_BOCHS_DISPLAY=y
 CONFIG_IVSHMEM_DEVICE=$(CONFIG_IVSHMEM)
 CONFIG_ROCKER=y
+CONFIG_VFIO=$(CONFIG_LINUX)
+CONFIG_VFIO_PCI=y
diff --git a/default-configs/ppc64-softmmu.mak b/default-configs/ppc64-softmmu.mak
index 7f34ad0..ccd7b17 100644
--- a/default-configs/ppc64-softmmu.mak
+++ b/default-configs/ppc64-softmmu.mak
@@ -18,6 +18,7 @@ CONFIG_XICS_SPAPR=$(CONFIG_PSERIES)
 CONFIG_XICS_KVM=$(call land,$(CONFIG_PSERIES),$(CONFIG_KVM))
 CONFIG_XIVE=$(CONFIG_PSERIES)
 CONFIG_XIVE_SPAPR=$(CONFIG_PSERIES)
+CONFIG_VFIO_SPAPR=$(CONFIG_PSERIES)
 CONFIG_MEM_DEVICE=y
 CONFIG_DIMM=y
 CONFIG_SPAPR_RNG=y
diff --git a/default-configs/s390x-softmmu.mak b/default-configs/s390x-softmmu.mak
index 8bb7e43..6f2c6ce 100644
--- a/default-configs/s390x-softmmu.mak
+++ b/default-configs/s390x-softmmu.mak
@@ -5,7 +5,8 @@ CONFIG_SCLPCONSOLE=y
 CONFIG_TERMINAL3270=y
 CONFIG_S390_FLIC=y
 CONFIG_S390_FLIC_KVM=$(CONFIG_KVM)
-CONFIG_VFIO_CCW=$(CONFIG_LINUX)
 CONFIG_WDT_DIAG288=y
-CONFIG_VFIO_AP=$(CONFIG_LINUX)
 CONFIG_S390_CCW_VIRTIO=y
+CONFIG_VFIO=$(CONFIG_LINUX)
+CONFIG_VFIO_CCW=y
+CONFIG_VFIO_AP=y
diff --git a/hw/Makefile.objs b/hw/Makefile.objs
index 22dd211..e2fcd6a 100644
--- a/hw/Makefile.objs
+++ b/hw/Makefile.objs
@@ -30,7 +30,7 @@ devices-dirs-$(CONFIG_SOFTMMU) += ssi/
 devices-dirs-$(CONFIG_SOFTMMU) += timer/
 devices-dirs-$(CONFIG_TPM) += tpm/
 devices-dirs-$(CONFIG_SOFTMMU) += usb/
-devices-dirs-$(CONFIG_LINUX) += vfio/
+devices-dirs-$(CONFIG_VFIO) += vfio/
 devices-dirs-$(CONFIG_SOFTMMU) += virtio/
 devices-dirs-$(CONFIG_SOFTMMU) += watchdog/
 devices-dirs-$(CONFIG_SOFTMMU) += xen/
diff --git a/hw/vfio/Makefile.objs b/hw/vfio/Makefile.objs
index 9180589..abad8b8 100644
--- a/hw/vfio/Makefile.objs
+++ b/hw/vfio/Makefile.objs
@@ -1,8 +1,7 @@
-obj-$(CONFIG_SOFTMMU) += common.o
-obj-$(CONFIG_PCI) += pci.o pci-quirks.o display.o
+obj-y += common.o spapr.o
+obj-$(CONFIG_VFIO_PCI) += pci.o pci-quirks.o display.o
 obj-$(CONFIG_VFIO_CCW) += ccw.o
-obj-$(CONFIG_SOFTMMU) += platform.o
+obj-$(CONFIG_VFIO_PLATFORM) += platform.o
 obj-$(CONFIG_VFIO_XGMAC) += calxeda-xgmac.o
 obj-$(CONFIG_VFIO_AMD_XGBE) += amd-xgbe.o
-obj-$(CONFIG_SOFTMMU) += spapr.o
 obj-$(CONFIG_VFIO_AP) += ap.o
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 28/52] minikconfig: add parser skeleton
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (26 preceding siblings ...)
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 27/52] hw/vfio/Makefile.objs: Create new CONFIG_* variables for VFIO core and PCI Paolo Bonzini
@ 2019-01-25 10:06 ` Paolo Bonzini
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 29/52] minikconfig: add AST Paolo Bonzini
                   ` (33 subsequent siblings)
  61 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

This implements a scanner and recursive descent parser for Kconfig-like
configuration files.  The only "action" of the parser is for now to
detect undefined variables and process include files.

The main differences between Kconfig and this are:

* only the "bool" type is supported

* variables can only be defined once

* choices are not supported (but they could be added as syntactic
sugar for multiple Boolean values)

* menus and other graphical concepts (prompts, help text) are not
supported

* assignments ("CONFIG_FOO=y", "CONFIG_FOO=n") are parsed as part
of the Kconfig language, not as a separate file.

The idea was originally by Ákos Kovács, but I could not find his
implementation so I had to redo it.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20190123065618.3520-23-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 scripts/minikconf.py | 425 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 425 insertions(+)
 create mode 100644 scripts/minikconf.py

diff --git a/scripts/minikconf.py b/scripts/minikconf.py
new file mode 100644
index 0000000..4a1fe09
--- /dev/null
+++ b/scripts/minikconf.py
@@ -0,0 +1,425 @@
+#
+# Mini-Kconfig parser
+#
+# Copyright (c) 2015 Red Hat Inc.
+#
+# Authors:
+#  Paolo Bonzini <pbonzini@redhat.com>
+#
+# This work is licensed under the terms of the GNU GPL, version 2
+# or, at your option, any later version.  See the COPYING file in
+# the top-level directory.
+
+from __future__ import print_function
+import os
+import sys
+
+__all__ = [ 'KconfigParserError', 'KconfigData', 'KconfigParser' ]
+
+# -------------------------------------------
+# KconfigData implements the Kconfig semantics.  For now it can only
+# detect undefined symbols, i.e. symbols that were referenced in
+# assignments or dependencies but were not declared with "config FOO".
+#
+# Semantic actions are represented by methods called do_*.  The do_var
+# method return the semantic value of a variable (which right now is
+# just its name).
+# -------------------------------------------
+
+class KconfigData:
+    def __init__(self):
+        self.previously_included = []
+        self.incl_info = None
+        self.defined_vars = set()
+        self.referenced_vars = set()
+
+    # semantic analysis -------------
+
+    def check_undefined(self):
+        undef = False
+        for i in self.referenced_vars:
+            if not (i in self.defined_vars):
+                print("undefined symbol %s" % (i), file=sys.stderr)
+                undef = True
+        return undef
+
+    # semantic actions -------------
+
+    def do_declaration(self, var):
+        if (var in self.defined_vars):
+            raise Exception('variable "' + var + '" defined twice')
+
+        self.defined_vars.add(var)
+
+    # var is a string with the variable's name.
+    #
+    # For now this just returns the variable's name itself.
+    def do_var(self, var):
+        self.referenced_vars.add(var)
+        return var
+
+    def do_assignment(self, var, val):
+        pass
+
+    def do_default(self, var, val, cond=None):
+        pass
+
+    def do_depends_on(self, var, expr):
+        pass
+
+    def do_select(self, var, symbol, cond=None):
+        pass
+
+# -------------------------------------------
+# KconfigParser implements a recursive descent parser for (simplified)
+# Kconfig syntax.
+# -------------------------------------------
+
+# tokens table
+TOKENS = {}
+TOK_NONE = -1
+TOK_LPAREN = 0;   TOKENS[TOK_LPAREN] = '"("';
+TOK_RPAREN = 1;   TOKENS[TOK_RPAREN] = '")"';
+TOK_EQUAL = 2;    TOKENS[TOK_EQUAL] = '"="';
+TOK_AND = 3;      TOKENS[TOK_AND] = '"&&"';
+TOK_OR = 4;       TOKENS[TOK_OR] = '"||"';
+TOK_NOT = 5;      TOKENS[TOK_NOT] = '"!"';
+TOK_DEPENDS = 6;  TOKENS[TOK_DEPENDS] = '"depends"';
+TOK_ON = 7;       TOKENS[TOK_ON] = '"on"';
+TOK_SELECT = 8;   TOKENS[TOK_SELECT] = '"select"';
+TOK_CONFIG = 9;   TOKENS[TOK_CONFIG] = '"config"';
+TOK_DEFAULT = 10; TOKENS[TOK_DEFAULT] = '"default"';
+TOK_Y = 11;       TOKENS[TOK_Y] = '"y"';
+TOK_N = 12;       TOKENS[TOK_N] = '"n"';
+TOK_SOURCE = 13;  TOKENS[TOK_SOURCE] = '"source"';
+TOK_BOOL = 14;    TOKENS[TOK_BOOL] = '"bool"';
+TOK_IF = 15;      TOKENS[TOK_IF] = '"if"';
+TOK_ID = 16;      TOKENS[TOK_ID] = 'identifier';
+TOK_EOF = 17;     TOKENS[TOK_EOF] = 'end of file';
+
+class KconfigParserError(Exception):
+    def __init__(self, parser, msg, tok=None):
+        self.loc = parser.location()
+        tok = tok or parser.tok
+        if tok != TOK_NONE:
+            location = TOKENS.get(tok, None) or ('"%s"' % tok)
+            msg = '%s before %s' % (msg, location)
+        self.msg = msg
+
+    def __str__(self):
+        return "%s: %s" % (self.loc, self.msg)
+
+class KconfigParser:
+    @classmethod
+    def parse(self, fp):
+        data = KconfigData()
+        parser = KconfigParser(data)
+        parser.parse_file(fp)
+        if data.check_undefined():
+            raise KconfigParserError(parser, "there were undefined symbols")
+
+        return data
+
+    def __init__(self, data):
+        self.data = data
+
+    def parse_file(self, fp):
+        self.abs_fname = os.path.abspath(fp.name)
+        self.fname = fp.name
+        self.data.previously_included.append(self.abs_fname)
+        self.src = fp.read()
+        if self.src == '' or self.src[-1] != '\n':
+            self.src += '\n'
+        self.cursor = 0
+        self.line = 1
+        self.line_pos = 0
+        self.get_token()
+        self.parse_config()
+
+    # file management -----
+
+    def error_path(self):
+        inf = self.data.incl_info
+        res = ""
+        while inf:
+            res = ("In file included from %s:%d:\n" % (inf['file'],
+                                                       inf['line'])) + res
+            inf = inf['parent']
+        return res
+
+    def location(self):
+        col = 1
+        for ch in self.src[self.line_pos:self.pos]:
+            if ch == '\t':
+                col += 8 - ((col - 1) % 8)
+            else:
+                col += 1
+        return '%s%s:%d:%d' %(self.error_path(), self.fname, self.line, col)
+
+    def do_include(self, include):
+        incl_abs_fname = os.path.join(os.path.dirname(self.abs_fname),
+                                      include)
+        # catch inclusion cycle
+        inf = self.data.incl_info
+        while inf:
+            if incl_abs_fname == os.path.abspath(inf['file']):
+                raise KconfigParserError(self, "Inclusion loop for %s"
+                                    % include)
+            inf = inf['parent']
+
+        # skip multiple include of the same file
+        if incl_abs_fname in self.data.previously_included:
+            return
+        try:
+            fp = open(incl_abs_fname, 'r')
+        except IOError as e:
+            raise KconfigParserError(self,
+                                '%s: %s' % (e.strerror, include))
+
+        inf = self.data.incl_info
+        self.data.incl_info = { 'file': self.fname, 'line': self.line,
+                'parent': inf }
+        KconfigParser(self.data).parse_file(fp)
+        self.data.incl_info = inf
+
+    # recursive descent parser -----
+
+    # y_or_n: Y | N
+    def parse_y_or_n(self):
+        if self.tok == TOK_Y:
+            self.get_token()
+            return True
+        if self.tok == TOK_N:
+            self.get_token()
+            return False
+        raise KconfigParserError(self, 'Expected "y" or "n"')
+
+    # var: ID
+    def parse_var(self):
+        if self.tok == TOK_ID:
+            val = self.val
+            self.get_token()
+            return self.data.do_var(val)
+        else:
+            raise KconfigParserError(self, 'Expected identifier')
+
+    # assignment_var: ID (starting with "CONFIG_")
+    def parse_assignment_var(self):
+        if self.tok == TOK_ID:
+            val = self.val
+            if not val.startswith("CONFIG_"):
+                raise KconfigParserError(self,
+                           'Expected identifier starting with "CONFIG_"', TOK_NONE)
+            self.get_token()
+            return self.data.do_var(val[7:])
+        else:
+            raise KconfigParserError(self, 'Expected identifier')
+
+    # assignment: var EQUAL y_or_n
+    def parse_assignment(self):
+        var = self.parse_assignment_var()
+        if self.tok != TOK_EQUAL:
+            raise KconfigParserError(self, 'Expected "="')
+        self.get_token()
+        self.data.do_assignment(var, self.parse_y_or_n())
+
+    # primary: NOT primary
+    #       | LPAREN expr RPAREN
+    #       | var
+    def parse_primary(self):
+        if self.tok == TOK_NOT:
+            self.get_token()
+            self.parse_primary()
+        elif self.tok == TOK_LPAREN:
+            self.get_token()
+            self.parse_expr()
+            if self.tok != TOK_RPAREN:
+                raise KconfigParserError(self, 'Expected ")"')
+            self.get_token()
+        elif self.tok == TOK_ID:
+            self.parse_var()
+        else:
+            raise KconfigParserError(self, 'Expected "!" or "(" or identifier')
+
+    # disj: primary (OR primary)*
+    def parse_disj(self):
+        self.parse_primary()
+        while self.tok == TOK_OR:
+            self.get_token()
+            self.parse_primary()
+
+    # expr: disj (AND disj)*
+    def parse_expr(self):
+        self.parse_disj()
+        while self.tok == TOK_AND:
+            self.get_token()
+            self.parse_disj()
+
+    # condition: IF expr
+    #       | empty
+    def parse_condition(self):
+        if self.tok == TOK_IF:
+            self.get_token()
+            return self.parse_expr()
+        else:
+            return None
+
+    # property: DEFAULT y_or_n condition
+    #       | DEPENDS ON expr
+    #       | SELECT var condition
+    #       | BOOL
+    def parse_property(self, var):
+        if self.tok == TOK_DEFAULT:
+            self.get_token()
+            val = self.parse_y_or_n()
+            cond = self.parse_condition()
+            self.data.do_default(var, val, cond)
+        elif self.tok == TOK_DEPENDS:
+            self.get_token()
+            if self.tok != TOK_ON:
+                raise KconfigParserError(self, 'Expected "on"')
+            self.get_token()
+            self.data.do_depends_on(var, self.parse_expr())
+        elif self.tok == TOK_SELECT:
+            self.get_token()
+            symbol = self.parse_var()
+            cond = self.parse_condition()
+            self.data.do_select(var, symbol, cond)
+        elif self.tok == TOK_BOOL:
+            self.get_token()
+        else:
+            raise KconfigParserError(self, 'Error in recursive descent?')
+
+    # properties: properties property
+    #       | /* empty */
+    def parse_properties(self, var):
+        had_default = False
+        while self.tok == TOK_DEFAULT or self.tok == TOK_DEPENDS or \
+              self.tok == TOK_SELECT or self.tok == TOK_BOOL:
+            self.parse_property(var)
+        self.data.do_default(var, False)
+
+        # for nicer error message
+        if self.tok != TOK_SOURCE and self.tok != TOK_CONFIG and \
+           self.tok != TOK_ID and self.tok != TOK_EOF:
+            raise KconfigParserError(self, 'expected "source", "config", identifier, '
+                    + '"default", "depends on" or "select"')
+
+    # declaration: config var properties
+    def parse_declaration(self):
+        if self.tok == TOK_CONFIG:
+            self.get_token()
+            var = self.parse_var()
+            self.data.do_declaration(var)
+            self.parse_properties(var)
+        else:
+            raise KconfigParserError(self, 'Error in recursive descent?')
+
+    # clause: SOURCE
+    #       | declaration
+    #       | assignment
+    def parse_clause(self):
+        if self.tok == TOK_SOURCE:
+            val = self.val
+            self.get_token()
+            self.do_include(val)
+        elif self.tok == TOK_CONFIG:
+            self.parse_declaration()
+        elif self.tok == TOK_ID:
+            self.parse_assignment()
+        else:
+            raise KconfigParserError(self, 'expected "source", "config" or identifier')
+
+    # config: clause+ EOF
+    def parse_config(self):
+        while self.tok != TOK_EOF:
+            self.parse_clause()
+        return self.data
+
+    # scanner -----
+
+    def get_token(self):
+        while True:
+            self.tok = self.src[self.cursor]
+            self.pos = self.cursor
+            self.cursor += 1
+
+            self.val = None
+            self.tok = self.scan_token()
+            if self.tok is not None:
+                return
+
+    def check_keyword(self, rest):
+        if not self.src.startswith(rest, self.cursor):
+            return False
+        length = len(rest)
+        if self.src[self.cursor + length].isalnum() or self.src[self.cursor + length] == '|':
+            return False
+        self.cursor += length
+        return True
+
+    def scan_token(self):
+        if self.tok == '#':
+            self.cursor = self.src.find('\n', self.cursor)
+            return None
+        elif self.tok == '=':
+            return TOK_EQUAL
+        elif self.tok == '(':
+            return TOK_LPAREN
+        elif self.tok == ')':
+            return TOK_RPAREN
+        elif self.tok == '&' and self.src[self.pos+1] == '&':
+            self.cursor += 1
+            return TOK_AND
+        elif self.tok == '|' and self.src[self.pos+1] == '|':
+            self.cursor += 1
+            return TOK_OR
+        elif self.tok == '!':
+            return TOK_NOT
+        elif self.tok == 'd' and self.check_keyword("epends"):
+            return TOK_DEPENDS
+        elif self.tok == 'o' and self.check_keyword("n"):
+            return TOK_ON
+        elif self.tok == 's' and self.check_keyword("elect"):
+            return TOK_SELECT
+        elif self.tok == 'c' and self.check_keyword("onfig"):
+            return TOK_CONFIG
+        elif self.tok == 'd' and self.check_keyword("efault"):
+            return TOK_DEFAULT
+        elif self.tok == 'b' and self.check_keyword("ool"):
+            return TOK_BOOL
+        elif self.tok == 'i' and self.check_keyword("f"):
+            return TOK_IF
+        elif self.tok == 'y' and self.check_keyword(""):
+            return TOK_Y
+        elif self.tok == 'n' and self.check_keyword(""):
+            return TOK_N
+        elif (self.tok == 's' and self.check_keyword("ource")) or \
+              self.tok == 'i' and self.check_keyword("nclude"):
+            # source FILENAME
+            # include FILENAME
+            while self.src[self.cursor].isspace():
+                self.cursor += 1
+            start = self.cursor
+            self.cursor = self.src.find('\n', self.cursor)
+            self.val = self.src[start:self.cursor]
+            return TOK_SOURCE
+        elif self.tok.isalpha():
+            # identifier
+            while self.src[self.cursor].isalnum() or self.src[self.cursor] == '_':
+                self.cursor += 1
+            self.val = self.src[self.pos:self.cursor]
+            return TOK_ID
+        elif self.tok == '\n':
+            if self.cursor == len(self.src):
+                return TOK_EOF
+            self.line += 1
+            self.line_pos = self.cursor
+        elif not self.tok.isspace():
+            raise KconfigParserError(self, 'invalid input')
+
+        return None
+
+if __name__ == '__main__':
+    fname = len(sys.argv) > 1 and sys.argv[1] or 'Kconfig.test'
+    KconfigParser.parse(open(fname, 'r'))
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 29/52] minikconfig: add AST
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (27 preceding siblings ...)
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 28/52] minikconfig: add parser skeleton Paolo Bonzini
@ 2019-01-25 10:06 ` Paolo Bonzini
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 30/52] minikconfig: add semantic analysis Paolo Bonzini
                   ` (32 subsequent siblings)
  61 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

Add Python classes that represent the Kconfig abstract syntax tree.
The abstract syntax tree is stored as a list of clauses.  For example:

    config FOO
        depends on BAR
        select BAZ

is represented as three clauses:

    FOO depends on BAR
    FOO default n
    select BAZ if FOO

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20190123065618.3520-24-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 scripts/minikconf.py | 116 +++++++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 98 insertions(+), 18 deletions(-)

diff --git a/scripts/minikconf.py b/scripts/minikconf.py
index 4a1fe09..eeecac1 100644
--- a/scripts/minikconf.py
+++ b/scripts/minikconf.py
@@ -27,11 +27,84 @@ __all__ = [ 'KconfigParserError', 'KconfigData', 'KconfigParser' ]
 # -------------------------------------------
 
 class KconfigData:
+    class Expr:
+        def __and__(self, rhs):
+            return KconfigData.AND(self, rhs)
+        def __or__(self, rhs):
+            return KconfigData.OR(self, rhs)
+        def __invert__(self):
+            return KconfigData.NOT(self)
+
+    class AND(Expr):
+        def __init__(self, lhs, rhs):
+            self.lhs = lhs
+            self.rhs = rhs
+        def __str__(self):
+            return "(%s && %s)" % (self.lhs, self.rhs)
+
+    class OR(Expr):
+        def __init__(self, lhs, rhs):
+            self.lhs = lhs
+            self.rhs = rhs
+        def __str__(self):
+            return "(%s || %s)" % (self.lhs, self.rhs)
+
+    class NOT(Expr):
+        def __init__(self, lhs):
+            self.lhs = lhs
+        def __str__(self):
+            return "!%s" % (self.lhs)
+
+    class Var(Expr):
+        def __init__(self, name):
+            self.name = name
+            self.value = None
+        def __str__(self):
+            return self.name
+
+    class Clause:
+        def __init__(self, dest):
+            self.dest = dest
+
+    class AssignmentClause(Clause):
+        def __init__(self, dest, value):
+            KconfigData.Clause.__init__(self, dest)
+            self.value = value
+        def __str__(self):
+            return "%s=%s" % (self.dest, 'y' if self.value else 'n')
+
+    class DefaultClause(Clause):
+        def __init__(self, dest, value, cond=None):
+            KconfigData.Clause.__init__(self, dest)
+            self.value = value
+            self.cond = cond
+        def __str__(self):
+            value = 'y' if self.value else 'n'
+            if self.cond is None:
+                return "config %s default %s" % (self.dest, value)
+            else:
+                return "config %s default %s if %s" % (self.dest, value, self.cond)
+
+    class DependsOnClause(Clause):
+        def __init__(self, dest, expr):
+            KconfigData.Clause.__init__(self, dest)
+            self.expr = expr
+        def __str__(self):
+            return "config %s depends on %s" % (self.dest, self.expr)
+
+    class SelectClause(Clause):
+        def __init__(self, dest, cond):
+            KconfigData.Clause.__init__(self, dest)
+            self.cond = cond
+        def __str__(self):
+            return "select %s if %s" % (self.dest, self.cond)
+
     def __init__(self):
         self.previously_included = []
         self.incl_info = None
         self.defined_vars = set()
-        self.referenced_vars = set()
+        self.referenced_vars = dict()
+        self.clauses = list()
 
     # semantic analysis -------------
 
@@ -49,26 +122,28 @@ class KconfigData:
         if (var in self.defined_vars):
             raise Exception('variable "' + var + '" defined twice')
 
-        self.defined_vars.add(var)
+        self.defined_vars.add(var.name)
 
     # var is a string with the variable's name.
-    #
-    # For now this just returns the variable's name itself.
     def do_var(self, var):
-        self.referenced_vars.add(var)
-        return var
+        if (var in self.referenced_vars):
+            return self.referenced_vars[var]
+
+        var_obj = self.referenced_vars[var] = KconfigData.Var(var)
+        return var_obj
 
     def do_assignment(self, var, val):
-        pass
+        self.clauses.append(KconfigData.AssignmentClause(var, val))
 
     def do_default(self, var, val, cond=None):
-        pass
+        self.clauses.append(KconfigData.DefaultClause(var, val, cond))
 
     def do_depends_on(self, var, expr):
-        pass
+        self.clauses.append(KconfigData.DependsOnClause(var, expr))
 
     def do_select(self, var, symbol, cond=None):
-        pass
+        cond = (cond & var) if cond is not None else var
+        self.clauses.append(KconfigData.SelectClause(symbol, cond))
 
 # -------------------------------------------
 # KconfigParser implements a recursive descent parser for (simplified)
@@ -229,31 +304,34 @@ class KconfigParser:
     def parse_primary(self):
         if self.tok == TOK_NOT:
             self.get_token()
-            self.parse_primary()
+            val = ~self.parse_primary()
         elif self.tok == TOK_LPAREN:
             self.get_token()
-            self.parse_expr()
+            val = self.parse_expr()
             if self.tok != TOK_RPAREN:
                 raise KconfigParserError(self, 'Expected ")"')
             self.get_token()
         elif self.tok == TOK_ID:
-            self.parse_var()
+            val = self.parse_var()
         else:
             raise KconfigParserError(self, 'Expected "!" or "(" or identifier')
+        return val
 
     # disj: primary (OR primary)*
     def parse_disj(self):
-        self.parse_primary()
+        lhs = self.parse_primary()
         while self.tok == TOK_OR:
             self.get_token()
-            self.parse_primary()
+            lhs = lhs | self.parse_primary()
+        return lhs
 
     # expr: disj (AND disj)*
     def parse_expr(self):
-        self.parse_disj()
+        lhs = self.parse_disj()
         while self.tok == TOK_AND:
             self.get_token()
-            self.parse_disj()
+            lhs = lhs & self.parse_disj()
+        return lhs
 
     # condition: IF expr
     #       | empty
@@ -422,4 +500,6 @@ class KconfigParser:
 
 if __name__ == '__main__':
     fname = len(sys.argv) > 1 and sys.argv[1] or 'Kconfig.test'
-    KconfigParser.parse(open(fname, 'r'))
+    data = KconfigParser.parse(open(fname, 'r'))
+    for i in data.clauses:
+        print i
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 30/52] minikconfig: add semantic analysis
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (28 preceding siblings ...)
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 29/52] minikconfig: add AST Paolo Bonzini
@ 2019-01-25 10:06 ` Paolo Bonzini
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 31/52] hw/display: make edid configurable Paolo Bonzini
                   ` (31 subsequent siblings)
  61 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

There are three parts in the semantic analysis:

1) evaluating expressions.  This is done as a simple visit
of the Expr nodes.

2) ordering clauses.  This is done by constructing a graph of variables.
There is an edge from X to Y if Y depends on X, if X selects Y, or if
X appears in a conditional selection of Y; in other words, if the value
of X can affect the value of Y.  Each clause has a "destination" variable
whose value can be affected by the clause, and clauses will be processed
according to a topological sorting of their destination variables.
Defaults are processed after all other clauses with the same destination.

3) deriving the value of the variables.  This is done by processing
the clauses in the topological order provided by the previous step.
A "depends on" clause will force a variable to False, a "select" clause
will force a variable to True, an assignment will force a variable
to its RHS.  A default will set a variable to its RHS if it has not
been set before.  Because all variables have a default, after visiting
all clauses all variables will have been set.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20190123065618.3520-25-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 scripts/minikconf.py | 136 ++++++++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 130 insertions(+), 6 deletions(-)

diff --git a/scripts/minikconf.py b/scripts/minikconf.py
index eeecac1..7fd1438 100644
--- a/scripts/minikconf.py
+++ b/scripts/minikconf.py
@@ -16,6 +16,10 @@ import sys
 
 __all__ = [ 'KconfigParserError', 'KconfigData', 'KconfigParser' ]
 
+def debug_print(*args):
+    #print ' '.join(str(x) for x in args)
+    pass
+
 # -------------------------------------------
 # KconfigData implements the Kconfig semantics.  For now it can only
 # detect undefined symbols, i.e. symbols that were referenced in
@@ -35,6 +39,12 @@ class KconfigData:
         def __invert__(self):
             return KconfigData.NOT(self)
 
+        # Abstract methods
+        def add_edges_to(self, var):
+            pass
+        def evaluate(self):
+            assert False
+
     class AND(Expr):
         def __init__(self, lhs, rhs):
             self.lhs = lhs
@@ -42,6 +52,12 @@ class KconfigData:
         def __str__(self):
             return "(%s && %s)" % (self.lhs, self.rhs)
 
+        def add_edges_to(self, var):
+            self.lhs.add_edges_to(var)
+            self.rhs.add_edges_to(var)
+        def evaluate(self):
+            return self.lhs.evaluate() and self.rhs.evaluate()
+
     class OR(Expr):
         def __init__(self, lhs, rhs):
             self.lhs = lhs
@@ -49,35 +65,85 @@ class KconfigData:
         def __str__(self):
             return "(%s || %s)" % (self.lhs, self.rhs)
 
+        def add_edges_to(self, var):
+            self.lhs.add_edges_to(var)
+            self.rhs.add_edges_to(var)
+        def evaluate(self):
+            return self.lhs.evaluate() or self.rhs.evaluate()
+
     class NOT(Expr):
         def __init__(self, lhs):
             self.lhs = lhs
         def __str__(self):
             return "!%s" % (self.lhs)
 
+        def add_edges_to(self, var):
+            self.lhs.add_edges_to(var)
+        def evaluate(self):
+            return not self.lhs.evaluate()
+
     class Var(Expr):
         def __init__(self, name):
             self.name = name
             self.value = None
+            self.outgoing = set()
+            self.clauses_for_var = list()
         def __str__(self):
             return self.name
 
+        def has_value(self):
+            return not (self.value is None)
+        def set_value(self, val, clause):
+            self.clauses_for_var.append(clause)
+            if self.has_value() and self.value != val:
+                print("The following clauses were found for " + self.name)
+                for i in self.clauses_for_var:
+                    print("    " + str(i), file=sys.stderr)
+                raise Exception('contradiction between clauses when setting %s' % self)
+            debug_print("=> %s is now %s" % (self.name, val))
+            self.value = val
+
+        # depth first search of the dependency graph
+        def dfs(self, visited, f):
+            if self in visited:
+                return
+            visited.add(self)
+            for v in self.outgoing:
+                v.dfs(visited, f)
+            f(self)
+
+        def add_edges_to(self, var):
+            self.outgoing.add(var)
+        def evaluate(self):
+            if not self.has_value():
+                raise Exception('cycle found including %s' % self)
+            return self.value
+
     class Clause:
         def __init__(self, dest):
             self.dest = dest
+        def priority(self):
+            return 0
+        def process(self):
+            pass
 
     class AssignmentClause(Clause):
         def __init__(self, dest, value):
             KconfigData.Clause.__init__(self, dest)
             self.value = value
         def __str__(self):
-            return "%s=%s" % (self.dest, 'y' if self.value else 'n')
+            return "CONFIG_%s=%s" % (self.dest, 'y' if self.value else 'n')
+
+        def process(self):
+            self.dest.set_value(self.value, self)
 
     class DefaultClause(Clause):
         def __init__(self, dest, value, cond=None):
             KconfigData.Clause.__init__(self, dest)
             self.value = value
             self.cond = cond
+            if not (self.cond is None):
+                self.cond.add_edges_to(self.dest)
         def __str__(self):
             value = 'y' if self.value else 'n'
             if self.cond is None:
@@ -85,20 +151,38 @@ class KconfigData:
             else:
                 return "config %s default %s if %s" % (self.dest, value, self.cond)
 
+        def priority(self):
+            # Defaults are processed just before leaving the variable
+            return -1
+        def process(self):
+            if not self.dest.has_value() and \
+                    (self.cond is None or self.cond.evaluate()):
+                self.dest.set_value(self.value, self)
+
     class DependsOnClause(Clause):
         def __init__(self, dest, expr):
             KconfigData.Clause.__init__(self, dest)
             self.expr = expr
+            self.expr.add_edges_to(self.dest)
         def __str__(self):
             return "config %s depends on %s" % (self.dest, self.expr)
 
+        def process(self):
+            if not self.expr.evaluate():
+                self.dest.set_value(False, self)
+
     class SelectClause(Clause):
         def __init__(self, dest, cond):
             KconfigData.Clause.__init__(self, dest)
             self.cond = cond
+            self.cond.add_edges_to(self.dest)
         def __str__(self):
             return "select %s if %s" % (self.dest, self.cond)
 
+        def process(self):
+            if self.cond.evaluate():
+                self.dest.set_value(True, self)
+
     def __init__(self):
         self.previously_included = []
         self.incl_info = None
@@ -116,6 +200,50 @@ class KconfigData:
                 undef = True
         return undef
 
+    def compute_config(self):
+        if self.check_undefined():
+            raise Exception(parser, "there were undefined symbols")
+            return None
+
+        debug_print("Input:")
+        for clause in self.clauses:
+            debug_print(clause)
+
+        debug_print("\nDependency graph:")
+        for i in self.referenced_vars:
+            debug_print(i, "->", [str(x) for x in self.referenced_vars[i].outgoing])
+
+        # The reverse of the depth-first order is the topological sort
+        dfo = dict()
+        visited = set()
+        debug_print("\n")
+        def visit_fn(var):
+            debug_print(var, "has DFS number", len(dfo))
+            dfo[var] = len(dfo)
+
+        for name in self.referenced_vars:
+            v = self.referenced_vars[name]
+            v.dfs(visited, visit_fn)
+
+        # Put higher DFS numbers and higher priorities first.  This
+        # places the clauses in topological order and places defaults
+        # after assignments and dependencies.
+        self.clauses.sort(key=lambda x: (-dfo[x.dest], -x.priority()))
+
+        debug_print("\nSorted clauses:")
+        for clause in self.clauses:
+            debug_print(clause)
+            clause.process()
+
+        debug_print("")
+        values = dict()
+        for name in self.referenced_vars:
+            debug_print("Evaluating", name)
+            v = self.referenced_vars[name]
+            values[name] = v.evaluate()
+
+        return values
+
     # semantic actions -------------
 
     def do_declaration(self, var):
@@ -190,9 +318,6 @@ class KconfigParser:
         data = KconfigData()
         parser = KconfigParser(data)
         parser.parse_file(fp)
-        if data.check_undefined():
-            raise KconfigParserError(parser, "there were undefined symbols")
-
         return data
 
     def __init__(self, data):
@@ -501,5 +626,4 @@ class KconfigParser:
 if __name__ == '__main__':
     fname = len(sys.argv) > 1 and sys.argv[1] or 'Kconfig.test'
     data = KconfigParser.parse(open(fname, 'r'))
-    for i in data.clauses:
-        print i
+    print data.compute_config()
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 31/52] hw/display: make edid configurable
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (29 preceding siblings ...)
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 30/52] minikconfig: add semantic analysis Paolo Bonzini
@ 2019-01-25 10:06 ` Paolo Bonzini
  2019-01-31 21:53   ` Philippe Mathieu-Daudé
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 32/52] kconfig: introduce kconfig files Paolo Bonzini
                   ` (30 subsequent siblings)
  61 siblings, 1 reply; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

From: Yang Zhong <yang.zhong@intel.com>

Use CONFIG_EDID to make edid-generate.c and edid-region.c
configurable.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20190123065618.3520-26-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/pci.mak  | 1 +
 hw/display/Makefile.objs | 4 +---
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/default-configs/pci.mak b/default-configs/pci.mak
index 037636f..0552190 100644
--- a/default-configs/pci.mak
+++ b/default-configs/pci.mak
@@ -49,3 +49,4 @@ CONFIG_IVSHMEM_DEVICE=$(CONFIG_IVSHMEM)
 CONFIG_ROCKER=y
 CONFIG_VFIO=$(CONFIG_LINUX)
 CONFIG_VFIO_PCI=y
+CONFIG_EDID=y
diff --git a/hw/display/Makefile.objs b/hw/display/Makefile.objs
index 97acd5b..a8e23c8 100644
--- a/hw/display/Makefile.objs
+++ b/hw/display/Makefile.objs
@@ -1,4 +1,4 @@
-common-obj-y += edid-generate.o
+common-obj-$(CONFIG_EDID) += edid-generate.o edid-region.o
 
 common-obj-$(CONFIG_FW_CFG_DMA) += ramfb.o
 common-obj-$(CONFIG_FW_CFG_DMA) += ramfb-standalone.o
@@ -15,12 +15,10 @@ common-obj-$(CONFIG_SSD0323) += ssd0323.o
 common-obj-$(CONFIG_XEN) += xenfb.o
 
 common-obj-$(CONFIG_VGA_PCI) += vga-pci.o
-common-obj-$(CONFIG_VGA_PCI) += edid-region.o
 common-obj-$(CONFIG_VGA_ISA) += vga-isa.o
 common-obj-$(CONFIG_VGA_ISA_MM) += vga-isa-mm.o
 common-obj-$(CONFIG_VMWARE_VGA) += vmware_vga.o
 common-obj-$(CONFIG_BOCHS_DISPLAY) += bochs-display.o
-common-obj-$(CONFIG_BOCHS_DISPLAY) += edid-region.o
 
 common-obj-$(CONFIG_BLIZZARD) += blizzard.o
 common-obj-$(CONFIG_EXYNOS4) += exynos4210_fimd.o
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 32/52] kconfig: introduce kconfig files
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (30 preceding siblings ...)
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 31/52] hw/display: make edid configurable Paolo Bonzini
@ 2019-01-25 10:06 ` Paolo Bonzini
  2019-01-31 13:21   ` Thomas Huth
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 33/52] build: switch to Kconfig Paolo Bonzini
                   ` (29 subsequent siblings)
  61 siblings, 1 reply; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

The Kconfig files were generated mostly with this script:

  for i in `grep -ho CONFIG_[A-Z0-9_]* default-configs/* | sort -u`; do
    set fnord `git grep -lw $i -- 'hw/*/Makefile.objs' `
    shift
    if test $# = 1; then
      cat >> $(dirname $1)/Kconfig << EOF
config ${i#CONFIG_}
    bool

EOF
      git add $(dirname $1)/Kconfig
    else
      echo $i $*
    fi
  done
  sed -i '$d' hw/*/Kconfig
  for i in hw/*; do
    if test -d $i && ! test -f $i/Kconfig; then
      touch $i/Kconfig
      git add $i/Kconfig
    fi
  done

Whenever a symbol is referenced from multiple subdirectories, the
script prints the list of directories that reference the symbol.
These symbols have to be added manually to the Kconfig files.

Kconfig.host and hw/Kconfig were created manually.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <20190123065618.3520-27-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 Kconfig.host          |  23 ++++++++++
 hw/9pfs/Kconfig       |   4 ++
 hw/Kconfig            |  68 ++++++++++++++++++++++++++++++
 hw/acpi/Kconfig       |  20 +++++++++
 hw/adc/Kconfig        |   2 +
 hw/alpha/Kconfig      |   2 +
 hw/arm/Kconfig        | 113 ++++++++++++++++++++++++++++++++++++++++++++++++++
 hw/audio/Kconfig      |  35 ++++++++++++++++
 hw/block/Kconfig      |  29 +++++++++++++
 hw/bt/Kconfig         |   2 +
 hw/char/Kconfig       |  32 ++++++++++++++
 hw/core/Kconfig       |  11 +++++
 hw/cpu/Kconfig        |   8 ++++
 hw/cris/Kconfig       |   5 +++
 hw/display/Kconfig    |  77 ++++++++++++++++++++++++++++++++++
 hw/dma/Kconfig        |  20 +++++++++
 hw/gpio/Kconfig       |   8 ++++
 hw/hppa/Kconfig       |   5 +++
 hw/hyperv/Kconfig     |   5 +++
 hw/i2c/Kconfig        |  20 +++++++++
 hw/i386/Kconfig       |  23 ++++++++++
 hw/ide/Kconfig        |  35 ++++++++++++++++
 hw/input/Kconfig      |  23 ++++++++++
 hw/intc/Kconfig       |  47 +++++++++++++++++++++
 hw/ipack/Kconfig      |   2 +
 hw/ipmi/Kconfig       |  14 +++++++
 hw/isa/Kconfig        |  23 ++++++++++
 hw/lm32/Kconfig       |   5 +++
 hw/m68k/Kconfig       |   8 ++++
 hw/mem/Kconfig        |   8 ++++
 hw/microblaze/Kconfig |   8 ++++
 hw/mips/Kconfig       |  20 +++++++++
 hw/misc/Kconfig       |  92 ++++++++++++++++++++++++++++++++++++++++
 hw/misc/macio/Kconfig |  11 +++++
 hw/moxie/Kconfig      |   2 +
 hw/net/Kconfig        |  92 ++++++++++++++++++++++++++++++++++++++++
 hw/nios2/Kconfig      |   5 +++
 hw/nvram/Kconfig      |   8 ++++
 hw/openrisc/Kconfig   |   2 +
 hw/pci-bridge/Kconfig |  20 +++++++++
 hw/pci-host/Kconfig   |  35 ++++++++++++++++
 hw/pci/Kconfig        |   2 +
 hw/pcmcia/Kconfig     |   2 +
 hw/ppc/Kconfig        |  56 +++++++++++++++++++++++++
 hw/riscv/Kconfig      |  19 +++++++++
 hw/s390x/Kconfig      |   2 +
 hw/scsi/Kconfig       |  26 ++++++++++++
 hw/sd/Kconfig         |  11 +++++
 hw/sh4/Kconfig        |  11 +++++
 hw/smbios/Kconfig     |   2 +
 hw/sparc/Kconfig      |  11 +++++
 hw/sparc64/Kconfig    |   5 +++
 hw/ssi/Kconfig        |  14 +++++++
 hw/timer/Kconfig      |  53 +++++++++++++++++++++++
 hw/tpm/Kconfig        |  14 +++++++
 hw/tricore/Kconfig    |   2 +
 hw/unicore32/Kconfig  |   2 +
 hw/usb/Kconfig        |  53 +++++++++++++++++++++++
 hw/vfio/Kconfig       |  23 ++++++++++
 hw/virtio/Kconfig     |  17 ++++++++
 hw/watchdog/Kconfig   |  11 +++++
 hw/xtensa/Kconfig     |   5 +++
 scripts/minikconf.py  |  35 ++++++++++++++--
 63 files changed, 1345 insertions(+), 3 deletions(-)
 create mode 100644 Kconfig.host
 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/alpha/Kconfig
 create mode 100644 hw/arm/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/cris/Kconfig
 create mode 100644 hw/display/Kconfig
 create mode 100644 hw/dma/Kconfig
 create mode 100644 hw/gpio/Kconfig
 create mode 100644 hw/hppa/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/lm32/Kconfig
 create mode 100644 hw/m68k/Kconfig
 create mode 100644 hw/mem/Kconfig
 create mode 100644 hw/microblaze/Kconfig
 create mode 100644 hw/mips/Kconfig
 create mode 100644 hw/misc/Kconfig
 create mode 100644 hw/misc/macio/Kconfig
 create mode 100644 hw/moxie/Kconfig
 create mode 100644 hw/net/Kconfig
 create mode 100644 hw/nios2/Kconfig
 create mode 100644 hw/nvram/Kconfig
 create mode 100644 hw/openrisc/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/ppc/Kconfig
 create mode 100644 hw/riscv/Kconfig
 create mode 100644 hw/s390x/Kconfig
 create mode 100644 hw/scsi/Kconfig
 create mode 100644 hw/sd/Kconfig
 create mode 100644 hw/sh4/Kconfig
 create mode 100644 hw/smbios/Kconfig
 create mode 100644 hw/sparc/Kconfig
 create mode 100644 hw/sparc64/Kconfig
 create mode 100644 hw/ssi/Kconfig
 create mode 100644 hw/timer/Kconfig
 create mode 100644 hw/tpm/Kconfig
 create mode 100644 hw/tricore/Kconfig
 create mode 100644 hw/unicore32/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
 create mode 100644 hw/xtensa/Kconfig

diff --git a/Kconfig.host b/Kconfig.host
new file mode 100644
index 0000000..f43f418
--- /dev/null
+++ b/Kconfig.host
@@ -0,0 +1,23 @@
+# These are "proxy" symbols used to pass config-host.mak values
+# down to Kconfig.
+
+config KVM
+    bool
+
+config OPENGL
+    bool
+
+config SPICE
+    bool
+
+config TPM
+    bool
+
+config XEN
+    bool
+
+config VHOST_USER
+    bool
+
+config LINUX
+    bool
diff --git a/hw/9pfs/Kconfig b/hw/9pfs/Kconfig
new file mode 100644
index 0000000..be8e5b3
--- /dev/null
+++ b/hw/9pfs/Kconfig
@@ -0,0 +1,4 @@
+config VIRTFS
+
+config VIRTIO_9P
+    bool
diff --git a/hw/Kconfig b/hw/Kconfig
new file mode 100644
index 0000000..c4f1547
--- /dev/null
+++ b/hw/Kconfig
@@ -0,0 +1,68 @@
+# devices Kconfig
+source 9pfs/Kconfig
+source acpi/Kconfig
+source adc/Kconfig
+source audio/Kconfig
+source block/Kconfig
+source bt/Kconfig
+source char/Kconfig
+source core/Kconfig
+source display/Kconfig
+source dma/Kconfig
+source gpio/Kconfig
+source hyperv/Kconfig
+source i2c/Kconfig
+source ide/Kconfig
+source input/Kconfig
+source intc/Kconfig
+source ipack/Kconfig
+source ipmi/Kconfig
+source isa/Kconfig
+source mem/Kconfig
+source misc/Kconfig
+source net/Kconfig
+source nvram/Kconfig
+source pci-bridge/Kconfig
+source pci-host/Kconfig
+source pcmcia/Kconfig
+source pci/Kconfig
+source scsi/Kconfig
+source sd/Kconfig
+source smbios/Kconfig
+source ssi/Kconfig
+source timer/Kconfig
+source tpm/Kconfig
+source usb/Kconfig
+source virtio/Kconfig
+source vfio/Kconfig
+source watchdog/Kconfig
+
+# arch Kconfig
+source arm/Kconfig
+source alpha/Kconfig
+source cris/Kconfig
+source hppa/Kconfig
+source i386/Kconfig
+source lm32/Kconfig
+source m68k/Kconfig
+source microblaze/Kconfig
+source mips/Kconfig
+source moxie/Kconfig
+source nios2/Kconfig
+source openrisc/Kconfig
+source ppc/Kconfig
+source riscv/Kconfig
+source s390x/Kconfig
+source sh4/Kconfig
+source sparc/Kconfig
+source sparc64/Kconfig
+source tricore/Kconfig
+source unicore32/Kconfig
+source xtensa/Kconfig
+
+# Symbols used by multiple targets
+config XILINX
+    bool
+
+config XILINX_AXI
+    bool
diff --git a/hw/acpi/Kconfig b/hw/acpi/Kconfig
new file mode 100644
index 0000000..c485a34
--- /dev/null
+++ b/hw/acpi/Kconfig
@@ -0,0 +1,20 @@
+config ACPI
+    bool
+
+config ACPI_X86
+    bool
+
+config ACPI_X86_ICH
+    bool
+
+config ACPI_CPU_HOTPLUG
+    bool
+
+config ACPI_MEMORY_HOTPLUG
+    bool
+
+config ACPI_NVDIMM
+    bool
+
+config ACPI_VMGENID
+    bool
diff --git a/hw/adc/Kconfig b/hw/adc/Kconfig
new file mode 100644
index 0000000..25d2229
--- /dev/null
+++ b/hw/adc/Kconfig
@@ -0,0 +1,2 @@
+config STM32F2XX_ADC
+    bool
diff --git a/hw/alpha/Kconfig b/hw/alpha/Kconfig
new file mode 100644
index 0000000..c5d0438
--- /dev/null
+++ b/hw/alpha/Kconfig
@@ -0,0 +1,2 @@
+config DP264
+    bool
diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
new file mode 100644
index 0000000..1a0a5c9
--- /dev/null
+++ b/hw/arm/Kconfig
@@ -0,0 +1,113 @@
+config VIRT
+    bool
+
+config DIGIC
+    bool
+
+config EXYNOS4
+    bool
+
+config HIGHBANK
+    bool
+
+config INTEGRATOR
+    bool
+
+config MAINSTONE
+    bool
+
+config MUSICPAL
+    bool
+
+config NETDUINO2
+    bool
+
+config NSERIES
+    bool
+
+config OMAP
+    bool
+
+config PXA2XX
+    bool
+
+config REALVIEW
+    bool
+
+config STELLARIS
+    bool
+
+config STRONGARM
+    bool
+
+config VERSATILE
+    bool
+
+config ZYNQ
+    bool
+
+config ARM_V7M
+    bool
+
+config EXYNOS4
+    bool
+
+config ALLWINNER_A10
+    bool
+
+config RASPI
+    bool
+
+config STM32F205_SOC
+    bool
+
+config XLNX_ZYNQMP_ARM
+    bool
+
+config XLNX_VERSAL
+    bool
+
+config FSL_IMX25
+    bool
+
+config FSL_IMX31
+    bool
+
+config FSL_IMX6
+    bool
+
+config ASPEED_SOC
+    bool
+
+config MPS2
+    bool
+
+config IOTKIT
+    bool
+
+config FSL_IMX7
+    bool
+
+config ARM_SMMUV3
+    bool
+
+config FSL_IMX6UL
+    bool
+
+config NRF51_SOC
+    bool
+
+config MSF2
+    bool
+
+config ZAURUS
+    bool
+
+config A9MPCORE
+    bool
+
+config A15MPCORE
+    bool
+
+config ARM11MPCORE
+    bool
diff --git a/hw/audio/Kconfig b/hw/audio/Kconfig
new file mode 100644
index 0000000..207baee
--- /dev/null
+++ b/hw/audio/Kconfig
@@ -0,0 +1,35 @@
+config SB16
+    bool
+
+config ES1370
+    bool
+
+config AC97
+    bool
+
+config ADLIB
+    bool
+
+config GUS
+    bool
+
+config CS4231A
+    bool
+
+config HDA
+    bool
+
+config PCSPK
+    bool
+
+config WM8750
+    bool
+
+config PL041
+    bool
+
+config CS4231
+    bool
+
+config MARVELL_88W8618
+    bool
diff --git a/hw/block/Kconfig b/hw/block/Kconfig
new file mode 100644
index 0000000..9d418bc
--- /dev/null
+++ b/hw/block/Kconfig
@@ -0,0 +1,29 @@
+config FDC
+    bool
+
+config SSI_M25P80
+    bool
+
+config NAND
+    bool
+
+config PFLASH_CFI01
+    bool
+
+config PFLASH_CFI02
+    bool
+
+config ECC
+    bool
+
+config ONENAND
+    bool
+
+config NVME_PCI
+    bool
+
+config VIRTIO_BLK
+    bool
+
+config VHOST_USER_BLK
+    bool
diff --git a/hw/bt/Kconfig b/hw/bt/Kconfig
new file mode 100644
index 0000000..554a9ee
--- /dev/null
+++ b/hw/bt/Kconfig
@@ -0,0 +1,2 @@
+config BLUETOOTH
+    bool
diff --git a/hw/char/Kconfig b/hw/char/Kconfig
new file mode 100644
index 0000000..26c1324
--- /dev/null
+++ b/hw/char/Kconfig
@@ -0,0 +1,32 @@
+config ESCC
+    bool
+
+config PARALLEL
+    bool
+
+config PL011
+    bool
+
+config SERIAL
+    bool
+
+config SERIAL_ISA
+    bool
+
+config SERIAL_PCI
+    bool
+
+config VIRTIO_SERIAL
+    bool
+
+config STM32F2XX_USART
+    bool
+
+config CMSDK_APB_UART
+    bool
+
+config SCLPCONSOLE
+    bool
+
+config TERMINAL3270
+    bool
diff --git a/hw/core/Kconfig b/hw/core/Kconfig
new file mode 100644
index 0000000..c2a1ae8
--- /dev/null
+++ b/hw/core/Kconfig
@@ -0,0 +1,11 @@
+config EMPTY_SLOT
+    bool
+
+config PTIMER
+    bool
+
+config FITLOADER
+    bool
+
+config PLATFORM_BUS
+    bool
diff --git a/hw/cpu/Kconfig b/hw/cpu/Kconfig
new file mode 100644
index 0000000..1767d02
--- /dev/null
+++ b/hw/cpu/Kconfig
@@ -0,0 +1,8 @@
+config ARM11MPCORE
+    bool
+
+config A9MPCORE
+    bool
+
+config A15MPCORE
+    bool
diff --git a/hw/cris/Kconfig b/hw/cris/Kconfig
new file mode 100644
index 0000000..86954ab
--- /dev/null
+++ b/hw/cris/Kconfig
@@ -0,0 +1,5 @@
+config AXIS
+    bool
+
+config ETRAXFS
+   bool
diff --git a/hw/display/Kconfig b/hw/display/Kconfig
new file mode 100644
index 0000000..d5c022c
--- /dev/null
+++ b/hw/display/Kconfig
@@ -0,0 +1,77 @@
+config EDID
+    bool
+
+config FW_CFG_DMA
+    bool
+
+config ADS7846
+    bool
+
+config VGA_CIRRUS
+    bool
+
+config G364FB
+    bool
+
+config JAZZ_LED
+    bool
+
+config PL110
+    bool
+
+config SII9022
+    bool
+
+config SSD0303
+    bool
+
+config SSD0323
+    bool
+
+config VGA_PCI
+    bool
+
+config VGA_ISA
+    bool
+
+config VGA_ISA_MM
+    bool
+
+config VMWARE_VGA
+    bool
+
+config BOCHS_DISPLAY
+    bool
+
+config BLIZZARD
+    bool
+
+config FRAMEBUFFER
+    bool
+
+config MILKYMIST_TMU2
+    bool
+
+config SM501
+    bool
+
+config TCX
+    bool
+
+config CG3
+    bool
+
+config VGA
+    bool
+
+config QXL
+    bool
+
+config VIRTIO_GPU
+    bool
+
+config VIRTIO_VGA
+    bool
+
+config DPCD
+    bool
diff --git a/hw/dma/Kconfig b/hw/dma/Kconfig
new file mode 100644
index 0000000..b9ce1c5
--- /dev/null
+++ b/hw/dma/Kconfig
@@ -0,0 +1,20 @@
+config RC4030
+    bool
+
+config PL080
+    bool
+
+config PL330
+    bool
+
+config I82374
+    bool
+
+config I8257
+    bool
+
+config ZYNQ_DEVCFG
+    bool
+
+config STP2000
+    bool
diff --git a/hw/gpio/Kconfig b/hw/gpio/Kconfig
new file mode 100644
index 0000000..d0a4abf
--- /dev/null
+++ b/hw/gpio/Kconfig
@@ -0,0 +1,8 @@
+config MAX7310
+    bool
+
+config PL061
+    bool
+
+config GPIO_KEY
+    bool
diff --git a/hw/hppa/Kconfig b/hw/hppa/Kconfig
new file mode 100644
index 0000000..1be5915
--- /dev/null
+++ b/hw/hppa/Kconfig
@@ -0,0 +1,5 @@
+config HPPA
+    bool
+
+config DINO
+    bool
diff --git a/hw/hyperv/Kconfig b/hw/hyperv/Kconfig
new file mode 100644
index 0000000..be724b7
--- /dev/null
+++ b/hw/hyperv/Kconfig
@@ -0,0 +1,5 @@
+config HYPERV
+    bool
+
+config HYPERV_TESTDEV
+    bool
diff --git a/hw/i2c/Kconfig b/hw/i2c/Kconfig
new file mode 100644
index 0000000..d6d4402
--- /dev/null
+++ b/hw/i2c/Kconfig
@@ -0,0 +1,20 @@
+config I2C
+    bool
+
+config SMBUS_EEPROM
+    bool
+
+config DDC
+    bool
+
+config VERSATILE_I2C
+    bool
+
+config ACPI_SMBUS
+    bool
+
+config BITBANG_I2C
+    bool
+
+config IMX_I2C
+    bool
diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
new file mode 100644
index 0000000..2dbe2b5
--- /dev/null
+++ b/hw/i386/Kconfig
@@ -0,0 +1,23 @@
+config KVM
+    bool
+
+config I440FX
+    bool
+
+config ISAPC
+    bool
+
+config Q35
+    bool
+
+config VTD
+    bool
+
+config AMD_IOMMU
+    bool
+
+config VMPORT
+    bool
+
+config VMMOUSE
+    bool
diff --git a/hw/ide/Kconfig b/hw/ide/Kconfig
new file mode 100644
index 0000000..5ec4495
--- /dev/null
+++ b/hw/ide/Kconfig
@@ -0,0 +1,35 @@
+config IDE_CORE
+    bool
+
+config IDE_QDEV
+    bool
+
+config IDE_PCI
+    bool
+
+config IDE_ISA
+    bool
+
+config IDE_PIIX
+    bool
+
+config IDE_CMD646
+    bool
+
+config IDE_MACIO
+    bool
+
+config IDE_MMIO
+    bool
+
+config IDE_VIA
+    bool
+
+config MICRODRIVE
+    bool
+
+config AHCI
+    bool
+
+config IDE_SII3112
+    bool
diff --git a/hw/input/Kconfig b/hw/input/Kconfig
new file mode 100644
index 0000000..91bae47
--- /dev/null
+++ b/hw/input/Kconfig
@@ -0,0 +1,23 @@
+config ADB
+    bool
+
+config LM832X
+    bool
+
+config PCKBD
+    bool
+
+config PL050
+    bool
+
+config STELLARIS_INPUT
+    bool
+
+config TSC2005
+    bool
+
+config VIRTIO_INPUT
+    bool
+
+config TSC210X
+    bool
diff --git a/hw/intc/Kconfig b/hw/intc/Kconfig
new file mode 100644
index 0000000..69adbd1
--- /dev/null
+++ b/hw/intc/Kconfig
@@ -0,0 +1,47 @@
+config HEATHROW_PIC
+    bool
+
+config I8259
+    bool
+
+config PL190
+    bool
+
+config IOAPIC
+    bool
+
+config ARM_GIC
+    bool
+
+config OPENPIC
+    bool
+
+config APIC
+    bool
+
+config ARM_GIC_KVM
+    bool
+
+config OPENPIC_KVM
+    bool
+
+config XICS
+    bool
+
+config XICS_SPAPR
+    bool
+
+config XICS_KVM
+    bool
+
+config ALLWINNER_A10_PIC
+    bool
+
+config S390_FLIC
+    bool
+
+config S390_FLIC_KVM
+    bool
+
+config OMPIC
+    bool
diff --git a/hw/ipack/Kconfig b/hw/ipack/Kconfig
new file mode 100644
index 0000000..481e0d2
--- /dev/null
+++ b/hw/ipack/Kconfig
@@ -0,0 +1,2 @@
+config IPACK
+    bool
diff --git a/hw/ipmi/Kconfig b/hw/ipmi/Kconfig
new file mode 100644
index 0000000..68f8ba1
--- /dev/null
+++ b/hw/ipmi/Kconfig
@@ -0,0 +1,14 @@
+config IPMI
+    bool
+
+config IPMI_LOCAL
+    bool
+
+config IPMI_EXTERN
+    bool
+
+config ISA_IPMI_KCS
+    bool
+
+config ISA_IPMI_BT
+    bool
diff --git a/hw/isa/Kconfig b/hw/isa/Kconfig
new file mode 100644
index 0000000..b59d074
--- /dev/null
+++ b/hw/isa/Kconfig
@@ -0,0 +1,23 @@
+config ISA_BUS
+    bool
+
+config APM
+    bool
+
+config I82378
+    bool
+
+config PC87312
+    bool
+
+config PIIX4
+    bool
+
+config VT82C686
+    bool
+
+config SMC37C669
+    bool
+
+config LPC_ICH9
+    bool
diff --git a/hw/lm32/Kconfig b/hw/lm32/Kconfig
new file mode 100644
index 0000000..84c530e
--- /dev/null
+++ b/hw/lm32/Kconfig
@@ -0,0 +1,5 @@
+config LM32
+    bool
+
+config MILKYMIST
+    bool
diff --git a/hw/m68k/Kconfig b/hw/m68k/Kconfig
new file mode 100644
index 0000000..cd66ada
--- /dev/null
+++ b/hw/m68k/Kconfig
@@ -0,0 +1,8 @@
+config AN5206
+    bool
+
+config MCF5206
+    bool
+
+config MCF5208
+    bool
diff --git a/hw/mem/Kconfig b/hw/mem/Kconfig
new file mode 100644
index 0000000..a3a4372
--- /dev/null
+++ b/hw/mem/Kconfig
@@ -0,0 +1,8 @@
+config DIMM
+    bool
+
+config MEM_DEVICE
+    bool
+
+config NVDIMM
+    bool
diff --git a/hw/microblaze/Kconfig b/hw/microblaze/Kconfig
new file mode 100644
index 0000000..44683b2
--- /dev/null
+++ b/hw/microblaze/Kconfig
@@ -0,0 +1,8 @@
+config PETALOGIX_S3ADSP1800
+    bool
+
+config PETALOGIX_ML605
+    bool
+
+config XLNX_ZYNQMP_PMU
+    bool
diff --git a/hw/mips/Kconfig b/hw/mips/Kconfig
new file mode 100644
index 0000000..348c9bf
--- /dev/null
+++ b/hw/mips/Kconfig
@@ -0,0 +1,20 @@
+config R4K
+    bool
+
+config MALTA
+    bool
+
+config MIPSSIM
+    bool
+
+config JAZZ
+    bool
+
+config FULONG
+    bool
+
+config MIPS_CPS
+    bool
+
+config MIPS_BOSTON
+    bool
diff --git a/hw/misc/Kconfig b/hw/misc/Kconfig
new file mode 100644
index 0000000..c006b04
--- /dev/null
+++ b/hw/misc/Kconfig
@@ -0,0 +1,92 @@
+config APPLESMC
+    bool
+
+config MAX111X
+    bool
+
+config TMP105
+    bool
+
+config TMP421
+    bool
+
+config ISA_DEBUG
+    bool
+
+config SGA
+    bool
+
+config ISA_TESTDEV
+    bool
+
+config PCI_TESTDEV
+    bool
+
+config EDU
+    bool
+
+config PCA9552
+    bool
+
+config PL310
+    bool
+
+config INTEGRATOR_DEBUG
+    bool
+
+config A9SCU
+    bool
+
+config ARM11SCU
+    bool
+
+config MOS6522
+    bool
+
+config MACIO
+    bool
+
+config IVSHMEM_DEVICE
+    bool
+
+config ECCMEMCTL
+    bool
+
+config IMX
+    bool
+
+config STM32F2XX_SYSCFG
+    bool
+
+config MIPS_ITU
+    bool
+
+config MPS2_FPGAIO
+    bool
+
+config MPS2_SCC
+    bool
+
+config TZ_MPC
+    bool
+
+config TZ_MSC
+    bool
+
+config TZ_PPC
+    bool
+
+config IOTKIT_SECCTL
+    bool
+
+config IOTKIT_SYSCTL
+    bool
+
+config IOTKIT_SYSINFO
+    bool
+
+config PVPANIC
+    bool
+
+config AUX
+    bool
diff --git a/hw/misc/macio/Kconfig b/hw/misc/macio/Kconfig
new file mode 100644
index 0000000..c6caeb6
--- /dev/null
+++ b/hw/misc/macio/Kconfig
@@ -0,0 +1,11 @@
+config CUDA
+    bool
+
+config MAC_PMU
+    bool
+
+config MAC_DBDMA
+    bool
+
+config MACIO_GPIO
+    bool
diff --git a/hw/moxie/Kconfig b/hw/moxie/Kconfig
new file mode 100644
index 0000000..52391bb
--- /dev/null
+++ b/hw/moxie/Kconfig
@@ -0,0 +1,2 @@
+config MOXIE
+    bool
diff --git a/hw/net/Kconfig b/hw/net/Kconfig
new file mode 100644
index 0000000..d358b2c
--- /dev/null
+++ b/hw/net/Kconfig
@@ -0,0 +1,92 @@
+config DP8393X
+    bool
+
+config NE2000_PCI
+    bool
+
+config EEPRO100_PCI
+    bool
+
+config PCNET_PCI
+    bool
+
+config PCNET_COMMON
+    bool
+
+config E1000_PCI
+    bool
+
+config E1000E_PCI_EXPRESS
+    bool
+
+config RTL8139_PCI
+    bool
+
+config VMXNET3_PCI
+    bool
+
+config SMC91C111
+    bool
+
+config LAN9118
+    bool
+
+config NE2000_ISA
+    bool
+
+config OPENCORES_ETH
+    bool
+
+config XGMAC
+    bool
+
+config MIPSNET
+    bool
+
+config ALLWINNER_EMAC
+    bool
+
+config IMX_FEC
+    bool
+
+config CADENCE
+    bool
+
+config STELLARIS_ENET
+    bool
+
+config LANCE
+    bool
+
+config SUNHME
+    bool
+
+config FTGMAC100
+    bool
+
+config SUNGEM
+    bool
+
+config COLDFIRE
+    bool
+
+config XILINX_ETHLITE
+    bool
+
+config VIRTIO_NET
+   bool
+
+config ETSEC
+    bool
+
+config ROCKER
+    bool
+
+config CAN_BUS
+    bool
+
+config CAN_PCI
+    bool
+
+config CAN_SJA1000
+    bool
diff --git a/hw/nios2/Kconfig b/hw/nios2/Kconfig
new file mode 100644
index 0000000..22817e4
--- /dev/null
+++ b/hw/nios2/Kconfig
@@ -0,0 +1,5 @@
+config NIOS2_10M50
+    bool
+
+config NIOS2
+    bool
diff --git a/hw/nvram/Kconfig b/hw/nvram/Kconfig
new file mode 100644
index 0000000..1f5ec95
--- /dev/null
+++ b/hw/nvram/Kconfig
@@ -0,0 +1,8 @@
+config DS1225Y
+    bool
+
+config AT24C
+    bool
+
+config MAC_NVRAM
+    bool
diff --git a/hw/openrisc/Kconfig b/hw/openrisc/Kconfig
new file mode 100644
index 0000000..e0da4ac
--- /dev/null
+++ b/hw/openrisc/Kconfig
@@ -0,0 +1,2 @@
+config OPENRISC
+    bool
diff --git a/hw/pci-bridge/Kconfig b/hw/pci-bridge/Kconfig
new file mode 100644
index 0000000..bb19b7a
--- /dev/null
+++ b/hw/pci-bridge/Kconfig
@@ -0,0 +1,20 @@
+config PCIE_PORT
+    bool
+
+config PXB
+    bool
+
+config XIO3130
+    bool
+
+config IOH3420
+    bool
+
+config I82801B11
+    bool
+
+config DEC_PCI
+    bool
+
+config SIMBA
+    bool
diff --git a/hw/pci-host/Kconfig b/hw/pci-host/Kconfig
new file mode 100644
index 0000000..2edc5bb
--- /dev/null
+++ b/hw/pci-host/Kconfig
@@ -0,0 +1,35 @@
+config PAM
+    bool
+
+config PREP_PCI
+    bool
+
+config GRACKLE_PCI
+    bool
+
+config UNIN_PCI
+    bool
+
+config PPCE500_PCI
+    bool
+
+config VERSATILE_PCI
+    bool
+
+config PCI_SABRE
+    bool
+
+config PCI_PIIX
+    bool
+
+config PCI_EXPRESS_Q35
+    bool
+
+config PCI_EXPRESS_GENERIC_BRIDGE
+    bool
+
+config PCI_EXPRESS_XILINX
+    bool
+
+config PCI_EXPRESS_DESIGNWARE
+    bool
diff --git a/hw/pci/Kconfig b/hw/pci/Kconfig
new file mode 100644
index 0000000..d3d2205
--- /dev/null
+++ b/hw/pci/Kconfig
@@ -0,0 +1,2 @@
+config PCI
+    bool
diff --git a/hw/pcmcia/Kconfig b/hw/pcmcia/Kconfig
new file mode 100644
index 0000000..41f2df9
--- /dev/null
+++ b/hw/pcmcia/Kconfig
@@ -0,0 +1,2 @@
+config PCMCIA
+    bool
diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
new file mode 100644
index 0000000..9da9d7d
--- /dev/null
+++ b/hw/ppc/Kconfig
@@ -0,0 +1,56 @@
+config PSERIES
+    bool
+
+config SPAPR_RNG
+    bool
+
+config POWERNV
+    bool
+
+config PPC405
+    bool
+
+config PPC440
+    bool
+
+config PPC4XX
+    bool
+
+config SAM460EX
+    bool
+
+config PREP
+    bool
+
+config RS6000_MC
+    bool
+
+config MAC_OLDWORLD
+    bool
+
+config MAC_NEWWORLD
+    bool
+
+config E500
+    bool
+
+config VIRTEX
+    bool
+
+config MAC_DBDMA
+    bool
+
+config MAC_PMU
+    bool
+
+config XIVE
+    bool
+
+config MACIO_GPIO
+    bool
+
+config XIVE_SPAPR
+    bool
+
+config CUDA
+    bool
diff --git a/hw/riscv/Kconfig b/hw/riscv/Kconfig
new file mode 100644
index 0000000..7603729
--- /dev/null
+++ b/hw/riscv/Kconfig
@@ -0,0 +1,19 @@
+config HTIF
+    bool
+
+config HART
+    bool
+
+config SIFIVE
+    bool
+
+config SIFIVE_E
+    bool
+
+config SIFIVE_U
+
+config SPIKE
+    bool
+
+config RISCV_VIRT
+    bool
diff --git a/hw/s390x/Kconfig b/hw/s390x/Kconfig
new file mode 100644
index 0000000..303db7f
--- /dev/null
+++ b/hw/s390x/Kconfig
@@ -0,0 +1,2 @@
+config S390_CCW_VIRTIO
+    bool
diff --git a/hw/scsi/Kconfig b/hw/scsi/Kconfig
new file mode 100644
index 0000000..eb78478
--- /dev/null
+++ b/hw/scsi/Kconfig
@@ -0,0 +1,26 @@
+config SCSI
+    bool
+
+config LSI_SCSI_PCI
+    bool
+
+config MPTSAS_SCSI_PCI
+    bool
+
+config MEGASAS_SCSI_PCI
+    bool
+
+config VMW_PVSCSI_SCSI_PCI
+    bool
+
+config ESP
+    bool
+
+config ESP_PCI
+    bool
+
+config VIRTIO_SCSI
+    bool
+
+config VHOST_USER_SCSI
+    bool
diff --git a/hw/sd/Kconfig b/hw/sd/Kconfig
new file mode 100644
index 0000000..4f43bbb
--- /dev/null
+++ b/hw/sd/Kconfig
@@ -0,0 +1,11 @@
+config PL181
+    bool
+
+config SSI_SD
+    bool
+
+config SD
+    bool
+
+config SDHCI
+    bool
diff --git a/hw/sh4/Kconfig b/hw/sh4/Kconfig
new file mode 100644
index 0000000..417a72f
--- /dev/null
+++ b/hw/sh4/Kconfig
@@ -0,0 +1,11 @@
+config R2D
+    bool
+
+config SHIX
+    bool
+
+config SH7750
+    bool
+
+config SH4
+    bool
diff --git a/hw/smbios/Kconfig b/hw/smbios/Kconfig
new file mode 100644
index 0000000..553adf4
--- /dev/null
+++ b/hw/smbios/Kconfig
@@ -0,0 +1,2 @@
+config SMBIOS
+    bool
diff --git a/hw/sparc/Kconfig b/hw/sparc/Kconfig
new file mode 100644
index 0000000..3795754
--- /dev/null
+++ b/hw/sparc/Kconfig
@@ -0,0 +1,11 @@
+config SUN4M
+    bool
+
+config LEON3
+    bool
+
+config GRLIB
+    bool
+
+config SLAVIO
+    bool
diff --git a/hw/sparc64/Kconfig b/hw/sparc64/Kconfig
new file mode 100644
index 0000000..8c13345
--- /dev/null
+++ b/hw/sparc64/Kconfig
@@ -0,0 +1,5 @@
+config SUN4U
+    bool
+
+config NIAGARA
+    bool
diff --git a/hw/ssi/Kconfig b/hw/ssi/Kconfig
new file mode 100644
index 0000000..5a03110
--- /dev/null
+++ b/hw/ssi/Kconfig
@@ -0,0 +1,14 @@
+config PL022
+    bool
+
+config SSI
+    bool
+
+config XILINX_SPI
+    bool
+
+config XILINX_SPIPS
+    bool
+
+config STM32F2XX_SPI
+    bool
diff --git a/hw/timer/Kconfig b/hw/timer/Kconfig
new file mode 100644
index 0000000..7dbc121
--- /dev/null
+++ b/hw/timer/Kconfig
@@ -0,0 +1,53 @@
+config ARM_TIMER
+    bool
+
+config ARM_MPTIMER
+    bool
+
+config A9_GTIMER
+    bool
+
+config DS1338
+    bool
+
+config HPET
+    bool
+
+config I8254
+    bool
+
+config M41T80
+    bool
+
+config M48T59
+    bool
+
+config PL031
+    bool
+
+config TWL92230
+    bool
+
+config XLNX_ZYNQMP
+    bool
+
+config ALTERA_TIMER
+    bool
+
+config MC146818RTC
+    bool
+
+config ALLWINNER_A10_PIT
+    bool
+
+config STM32F2XX_TIMER
+    bool
+
+config SUN4V_RTC
+    bool
+
+config CMSDK_APB_TIMER
+    bool
+
+config CMSDK_APB_DUALTIMER
+    bool
diff --git a/hw/tpm/Kconfig b/hw/tpm/Kconfig
new file mode 100644
index 0000000..2eee8eb
--- /dev/null
+++ b/hw/tpm/Kconfig
@@ -0,0 +1,14 @@
+config TPM
+    bool
+
+config TPM_TIS
+    bool
+
+config TPM_CRB
+    bool
+
+config TPM_PASSTHROUGH
+    bool
+
+config TPM_EMULATOR
+    bool
diff --git a/hw/tricore/Kconfig b/hw/tricore/Kconfig
new file mode 100644
index 0000000..9313409
--- /dev/null
+++ b/hw/tricore/Kconfig
@@ -0,0 +1,2 @@
+config TRICORE
+    bool
diff --git a/hw/unicore32/Kconfig b/hw/unicore32/Kconfig
new file mode 100644
index 0000000..b3cf294
--- /dev/null
+++ b/hw/unicore32/Kconfig
@@ -0,0 +1,2 @@
+config PUV3
+    bool
diff --git a/hw/usb/Kconfig b/hw/usb/Kconfig
new file mode 100644
index 0000000..cbf5c5d
--- /dev/null
+++ b/hw/usb/Kconfig
@@ -0,0 +1,53 @@
+config USB
+    bool
+
+config USB_UHCI
+    bool
+
+config USB_OHCI
+    bool
+
+config USB_EHCI
+    bool
+
+config USB_EHCI_SYSBUS
+    bool
+
+config USB_XHCI
+    bool
+
+config USB_XHCI_NEC
+    bool
+
+config USB_MUSB
+    bool
+
+config TUSB6010
+    bool
+
+config USB_TABLET_WACOM
+    bool
+
+config USB_STORAGE_BOT
+    bool
+
+config USB_STORAGE_UAS
+    bool
+
+config USB_AUDIO
+    bool
+
+config USB_SERIAL
+    bool
+
+config USB_NETWORK
+    bool
+
+config USB_BLUETOOTH
+    bool
+
+config USB_SMARTCARD
+    bool
+
+config USB_STORAGE_MTP
+    bool
diff --git a/hw/vfio/Kconfig b/hw/vfio/Kconfig
new file mode 100644
index 0000000..31d8dfc
--- /dev/null
+++ b/hw/vfio/Kconfig
@@ -0,0 +1,23 @@
+config VFIO
+    bool
+
+config VFIO_PCI
+    bool
+
+config VFIO_SPAPR
+    bool
+
+config VFIO_CCW
+    bool
+
+config VFIO_PLATFORM
+    bool
+
+config VFIO_XGMAC
+    bool
+
+config VFIO_AMD_XGBE
+    bool
+
+config VFIO_AP
+    bool
diff --git a/hw/virtio/Kconfig b/hw/virtio/Kconfig
new file mode 100644
index 0000000..ebf1812
--- /dev/null
+++ b/hw/virtio/Kconfig
@@ -0,0 +1,17 @@
+config VIRTIO
+    bool
+
+config VIRTIO_RNG
+    bool
+
+config VIRTIO_PCI
+    bool
+
+config VIRTIO_MMIO
+    bool
+
+config VIRTIO_BALLOON
+    bool
+
+config VIRTIO_CRYPTO
+    bool
diff --git a/hw/watchdog/Kconfig b/hw/watchdog/Kconfig
new file mode 100644
index 0000000..cd0244f
--- /dev/null
+++ b/hw/watchdog/Kconfig
@@ -0,0 +1,11 @@
+config CMSDK_APB_WATCHDOG
+    bool
+
+config WDT_IB6300ESB
+    bool
+
+config WDT_IB700
+    bool
+
+config WDT_DIAG288
+    bool
diff --git a/hw/xtensa/Kconfig b/hw/xtensa/Kconfig
new file mode 100644
index 0000000..97543a9
--- /dev/null
+++ b/hw/xtensa/Kconfig
@@ -0,0 +1,5 @@
+config XTENSA_SIM
+    bool
+
+config XTENSA_FPGA
+    bool
diff --git a/scripts/minikconf.py b/scripts/minikconf.py
index 7fd1438..e26a0e4 100644
--- a/scripts/minikconf.py
+++ b/scripts/minikconf.py
@@ -13,6 +13,7 @@
 from __future__ import print_function
 import os
 import sys
+import re
 
 __all__ = [ 'KconfigParserError', 'KconfigData', 'KconfigParser' ]
 
@@ -336,6 +337,12 @@ class KconfigParser:
         self.get_token()
         self.parse_config()
 
+    def do_assignment(self, var, val):
+        if not var.startswith("CONFIG_"):
+            raise Error('assigned variable should start with CONFIG_')
+        var = self.data.do_var(var[7:])
+        self.data.do_assignment(var, val)
+
     # file management -----
 
     def error_path(self):
@@ -624,6 +631,28 @@ class KconfigParser:
         return None
 
 if __name__ == '__main__':
-    fname = len(sys.argv) > 1 and sys.argv[1] or 'Kconfig.test'
-    data = KconfigParser.parse(open(fname, 'r'))
-    print data.compute_config()
+    argv = sys.argv
+    if len(argv) == 1:
+        print ("%s: at least one argument is required" % argv[0], file=sys.stderr)
+        sys.exit(1)
+
+    data = KconfigData()
+    parser = KconfigParser(data)
+    for arg in argv[3:]:
+        m = re.match(r'^(CONFIG_[A-Z0-9_]+)=([yn]?)$', arg)
+        if m is not None:
+            name, value = m.groups()
+            parser.do_assignment(name, value == 'y')
+        else:
+            fp = open(arg, 'r')
+            parser.parse_file(fp)
+            fp.close()
+
+    config = data.compute_config()
+    for key in sorted(config.keys()):
+        print ('CONFIG_%s=%s' % (key, ('y' if config[key] else 'n')))
+
+    deps = open(argv[2], 'w')
+    for fname in data.previously_included:
+        print ('%s: %s' % (argv[1], fname), file=deps)
+    deps.close()
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 33/52] build: switch to Kconfig
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (31 preceding siblings ...)
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 32/52] kconfig: introduce kconfig files Paolo Bonzini
@ 2019-01-25 10:06 ` Paolo Bonzini
  2019-01-31 21:48   ` Philippe Mathieu-Daudé
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 34/52] minikconf: implement allnoconfig and defconfig Paolo Bonzini
                   ` (28 subsequent siblings)
  61 siblings, 1 reply; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

The make_device_config.sh script is replaced by minikconf, which
is modified to support the same command line as its predecessor.

The roots of the parsing are default-configs/*.mak, Kconfig.host and
hw/Kconfig.  One difference with make_device_config.sh is that all symbols
have to be defined in a Kconfig file, including those coming from the
configure script.  This is the reason for the Kconfig.host file introduced
in the previous patch. Whenever a file in default-configs/*.mak used
$(...) to refer to a config-host.mak symbol, this is replaced by a
Kconfig dependency; this part must be done already in this patch
for bisectability.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Acked-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20190123065618.3520-28-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 Kconfig.host                      |  3 ++-
 Makefile                          | 19 ++++++++++++++++---
 Makefile.target                   |  7 ++++++-
 configure                         |  3 +++
 default-configs/arm-softmmu.mak   |  2 --
 default-configs/i386-softmmu.mak  |  5 +----
 default-configs/lm32-softmmu.mak  |  1 -
 default-configs/pci.mak           |  1 -
 default-configs/ppc-softmmu.mak   |  1 -
 default-configs/ppc64-softmmu.mak |  6 ------
 default-configs/s390x-softmmu.mak |  4 +---
 default-configs/virtio.mak        |  3 ---
 hw/9pfs/Kconfig                   |  1 +
 hw/block/Kconfig                  |  1 +
 hw/display/Kconfig                |  4 ++++
 hw/i386/Kconfig                   |  6 +++++-
 hw/input/Kconfig                  |  5 +++++
 hw/intc/Kconfig                   | 12 ++++++++++++
 hw/misc/Kconfig                   |  2 ++
 hw/ppc/Kconfig                    |  4 ++++
 hw/scsi/Kconfig                   |  6 ++++++
 hw/tpm/Kconfig                    |  2 ++
 hw/vfio/Kconfig                   | 11 +++++++++++
 rules.mak                         |  2 +-
 scripts/make_device_config.sh     | 30 ------------------------------
 25 files changed, 83 insertions(+), 58 deletions(-)
 delete mode 100644 scripts/make_device_config.sh

diff --git a/Kconfig.host b/Kconfig.host
index f43f418..3772627 100644
--- a/Kconfig.host
+++ b/Kconfig.host
@@ -1,5 +1,6 @@
 # These are "proxy" symbols used to pass config-host.mak values
-# down to Kconfig.
+# down to Kconfig.  See also MINIKCONF_ARGS in the Makefile:
+# these two need to be kept in sync.
 
 config KVM
     bool
diff --git a/Makefile b/Makefile
index de898ea..70b9aec 100644
--- a/Makefile
+++ b/Makefile
@@ -326,9 +326,22 @@ endif
 
 -include $(SUBDIR_DEVICES_MAK_DEP)
 
-%/config-devices.mak: default-configs/%.mak $(SRC_PATH)/scripts/make_device_config.sh
-	$(call quiet-command, \
-            $(SHELL) $(SRC_PATH)/scripts/make_device_config.sh $< $*-config-devices.mak.d $@ > $@.tmp,"GEN","$@.tmp")
+# This has to be kept in sync with Kconfig.host.
+MINIKCONF_ARGS = \
+    $@ $*-config.devices.mak.d $< $(MINIKCONF_INPUTS) \
+    CONFIG_KVM=$(CONFIG_KVM) \
+    CONFIG_SPICE=$(CONFIG_SPICE) \
+    CONFIG_TPM=$(CONFIG_TPM) \
+    CONFIG_XEN=$(CONFIG_XEN) \
+    CONFIG_OPENGL=$(CONFIG_OPENGL) \
+    CONFIG_VHOST_USER=$(CONFIG_VHOST_USER) \
+    CONFIG_LINUX=$(CONFIG_LINUX)
+
+MINIKCONF_INPUTS = $(SRC_PATH)/Kconfig.host $(SRC_PATH)/hw/Kconfig
+MINIKCONF = $(PYTHON) $(SRC_PATH)/scripts/minikconf.py \
+
+%/config-devices.mak: default-configs/%.mak $(MINIKCONF_INPUTS)
+	$(call quiet-command, $(MINIKCONF) $(MINIKCONF_ARGS) > $@.tmp, "GEN", "$@.tmp")
 	$(call quiet-command, if test -f $@; then \
 	  if cmp -s $@.old $@; then \
 	    mv $@.tmp $@; \
diff --git a/Makefile.target b/Makefile.target
index 39f72e8..f31692c 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -4,9 +4,12 @@ BUILD_DIR?=$(CURDIR)/..
 
 include ../config-host.mak
 include config-target.mak
-include config-devices.mak
 include $(SRC_PATH)/rules.mak
 
+ifdef CONFIG_SOFTMMU
+include config-devices.mak
+endif
+
 $(call set-vpath, $(SRC_PATH):$(BUILD_DIR))
 ifdef CONFIG_LINUX
 QEMU_CFLAGS += -I../linux-headers
@@ -190,7 +193,9 @@ all-obj-$(CONFIG_SOFTMMU) += $(crypto-obj-y)
 all-obj-$(CONFIG_SOFTMMU) += $(io-obj-y)
 all-obj-$(CONFIG_SOFTMMU) += $(slirp-obj-y)
 
+ifdef CONFIG_SOFTMMU
 $(QEMU_PROG_BUILD): config-devices.mak
+endif
 
 COMMON_LDADDS = ../libqemuutil.a
 
diff --git a/configure b/configure
index 8f312ac..dae1b67 100755
--- a/configure
+++ b/configure
@@ -7377,12 +7377,15 @@ if supported_xen_target $target; then
 fi
 if supported_kvm_target $target; then
     echo "CONFIG_KVM=y" >> $config_target_mak
+    echo "$target/config-devices.mak: CONFIG_KVM=y" >> $config_host_mak
     if test "$vhost_net" = "yes" ; then
         echo "CONFIG_VHOST_NET=y" >> $config_target_mak
         if test "$vhost_user" = "yes" ; then
             echo "CONFIG_VHOST_USER_NET_TEST_$target_name=y" >> $config_host_mak
         fi
     fi
+else
+    echo "$target/config-devices.mak: CONFIG_KVM=n" >> $config_host_mak
 fi
 if supported_hax_target $target; then
     echo "CONFIG_HAX=y" >> $config_target_mak
diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index 4f0ecba..b0995a0 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -51,7 +51,6 @@ CONFIG_ARM_V7M=y
 CONFIG_NETDUINO2=y
 
 CONFIG_ARM_GIC=y
-CONFIG_ARM_GIC_KVM=$(CONFIG_KVM)
 CONFIG_ARM_TIMER=y
 CONFIG_ARM_MPTIMER=y
 CONFIG_A9_GTIMER=y
@@ -123,7 +122,6 @@ CONFIG_VERSATILE_PCI=y
 CONFIG_VERSATILE_I2C=y
 
 CONFIG_PCI_EXPRESS_GENERIC_BRIDGE=y
-CONFIG_VFIO=$(CONFIG_LINUX)
 CONFIG_VFIO_PLATFORM=y
 CONFIG_VFIO_XGMAC=y
 CONFIG_VFIO_AMD_XGBE=y
diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmmu.mak
index 15b6287..412c8c5 100644
--- a/default-configs/i386-softmmu.mak
+++ b/default-configs/i386-softmmu.mak
@@ -4,7 +4,6 @@ include pci.mak
 include sound.mak
 include usb.mak
 include hyperv.mak
-CONFIG_QXL=$(CONFIG_SPICE)
 CONFIG_VGA_ISA=y
 CONFIG_VGA_CIRRUS=y
 CONFIG_VMWARE_VGA=y
@@ -37,8 +36,6 @@ CONFIG_HPET=y
 CONFIG_APPLESMC=y
 CONFIG_I8259=y
 CONFIG_PFLASH_CFI01=y
-CONFIG_TPM_TIS=$(CONFIG_TPM)
-CONFIG_TPM_CRB=$(CONFIG_TPM)
 CONFIG_MC146818RTC=y
 CONFIG_PCI_PIIX=y
 CONFIG_WDT_IB700=y
@@ -66,9 +63,9 @@ CONFIG_ACPI_SMBUS=y
 CONFIG_SMBUS_EEPROM=y
 CONFIG_FW_CFG_DMA=y
 CONFIG_I2C=y
-CONFIG_SEV=$(CONFIG_KVM)
 CONFIG_VTD=y
 CONFIG_AMD_IOMMU=y
 CONFIG_PAM=y
+CONFIG_PC=y
 CONFIG_I440FX=y
 CONFIG_Q35=y
diff --git a/default-configs/lm32-softmmu.mak b/default-configs/lm32-softmmu.mak
index 4889348..ef0f4ba 100644
--- a/default-configs/lm32-softmmu.mak
+++ b/default-configs/lm32-softmmu.mak
@@ -2,7 +2,6 @@
 
 CONFIG_LM32=y
 CONFIG_MILKYMIST=y
-CONFIG_MILKYMIST_TMU2=$(CONFIG_OPENGL)
 CONFIG_FRAMEBUFFER=y
 CONFIG_PTIMER=y
 CONFIG_PFLASH_CFI01=y
diff --git a/default-configs/pci.mak b/default-configs/pci.mak
index 0552190..3d4c71d 100644
--- a/default-configs/pci.mak
+++ b/default-configs/pci.mak
@@ -47,6 +47,5 @@ CONFIG_VGA_PCI=y
 CONFIG_BOCHS_DISPLAY=y
 CONFIG_IVSHMEM_DEVICE=$(CONFIG_IVSHMEM)
 CONFIG_ROCKER=y
-CONFIG_VFIO=$(CONFIG_LINUX)
 CONFIG_VFIO_PCI=y
 CONFIG_EDID=y
diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
index 52acb7c..90118cb 100644
--- a/default-configs/ppc-softmmu.mak
+++ b/default-configs/ppc-softmmu.mak
@@ -18,7 +18,6 @@ CONFIG_I8259=y
 CONFIG_XILINX=y
 CONFIG_XILINX_ETHLITE=y
 CONFIG_E500=y
-CONFIG_OPENPIC_KVM=$(call land,$(CONFIG_E500),$(CONFIG_KVM))
 CONFIG_PLATFORM_BUS=y
 CONFIG_ETSEC=y
 CONFIG_PPC405=y
diff --git a/default-configs/ppc64-softmmu.mak b/default-configs/ppc64-softmmu.mak
index ccd7b17..a0a9151 100644
--- a/default-configs/ppc64-softmmu.mak
+++ b/default-configs/ppc64-softmmu.mak
@@ -13,12 +13,6 @@ CONFIG_ISA_IPMI_BT=y
 # For pSeries
 CONFIG_PSERIES=y
 CONFIG_VIRTIO_VGA=y
-CONFIG_XICS=$(CONFIG_PSERIES)
-CONFIG_XICS_SPAPR=$(CONFIG_PSERIES)
-CONFIG_XICS_KVM=$(call land,$(CONFIG_PSERIES),$(CONFIG_KVM))
-CONFIG_XIVE=$(CONFIG_PSERIES)
-CONFIG_XIVE_SPAPR=$(CONFIG_PSERIES)
-CONFIG_VFIO_SPAPR=$(CONFIG_PSERIES)
 CONFIG_MEM_DEVICE=y
 CONFIG_DIMM=y
 CONFIG_SPAPR_RNG=y
diff --git a/default-configs/s390x-softmmu.mak b/default-configs/s390x-softmmu.mak
index 6f2c6ce..2794ffb 100644
--- a/default-configs/s390x-softmmu.mak
+++ b/default-configs/s390x-softmmu.mak
@@ -1,12 +1,10 @@
 CONFIG_PCI=y
-CONFIG_VIRTIO_PCI=$(CONFIG_PCI)
+CONFIG_VIRTIO_PCI=y
 include virtio.mak
 CONFIG_SCLPCONSOLE=y
 CONFIG_TERMINAL3270=y
 CONFIG_S390_FLIC=y
-CONFIG_S390_FLIC_KVM=$(CONFIG_KVM)
 CONFIG_WDT_DIAG288=y
 CONFIG_S390_CCW_VIRTIO=y
-CONFIG_VFIO=$(CONFIG_LINUX)
 CONFIG_VFIO_CCW=y
 CONFIG_VFIO_AP=y
diff --git a/default-configs/virtio.mak b/default-configs/virtio.mak
index ecb4420..51599ed 100644
--- a/default-configs/virtio.mak
+++ b/default-configs/virtio.mak
@@ -1,5 +1,3 @@
-CONFIG_VHOST_USER_SCSI=$(call land,$(CONFIG_VHOST_USER),$(CONFIG_LINUX))
-CONFIG_VHOST_USER_BLK=$(call land,$(CONFIG_VHOST_USER),$(CONFIG_LINUX))
 CONFIG_VIRTIO=y
 CONFIG_VIRTIO_9P=$(CONFIG_VIRTFS)
 CONFIG_VIRTIO_BALLOON=y
@@ -12,4 +10,3 @@ CONFIG_VIRTIO_RNG=y
 CONFIG_SCSI=y
 CONFIG_VIRTIO_SCSI=y
 CONFIG_VIRTIO_SERIAL=y
-CONFIG_VIRTIO_INPUT_HOST=$(CONFIG_LINUX)
diff --git a/hw/9pfs/Kconfig b/hw/9pfs/Kconfig
index be8e5b3..84d2366 100644
--- a/hw/9pfs/Kconfig
+++ b/hw/9pfs/Kconfig
@@ -2,3 +2,4 @@ config VIRTFS
 
 config VIRTIO_9P
     bool
+    default y if VIRTFS
diff --git a/hw/block/Kconfig b/hw/block/Kconfig
index 9d418bc..1780569 100644
--- a/hw/block/Kconfig
+++ b/hw/block/Kconfig
@@ -27,3 +27,4 @@ config VIRTIO_BLK
 
 config VHOST_USER_BLK
     bool
+    default y if VHOST_USER && LINUX
diff --git a/hw/display/Kconfig b/hw/display/Kconfig
index d5c022c..429056b 100644
--- a/hw/display/Kconfig
+++ b/hw/display/Kconfig
@@ -51,6 +51,8 @@ config FRAMEBUFFER
 
 config MILKYMIST_TMU2
     bool
+    default y
+    depends on OPENGL
 
 config SM501
     bool
@@ -66,6 +68,8 @@ config VGA
 
 config QXL
     bool
+    default y if PC
+    depends on SPICE && PCI
 
 config VIRTIO_GPU
     bool
diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
index 2dbe2b5..9a0e559 100644
--- a/hw/i386/Kconfig
+++ b/hw/i386/Kconfig
@@ -1,4 +1,8 @@
-config KVM
+config SEV
+    bool
+    default y if PC && KVM
+
+config PC
     bool
 
 config I440FX
diff --git a/hw/input/Kconfig b/hw/input/Kconfig
index 91bae47..98a18a1 100644
--- a/hw/input/Kconfig
+++ b/hw/input/Kconfig
@@ -19,5 +19,10 @@ config TSC2005
 config VIRTIO_INPUT
     bool
 
+config VIRTIO_INPUT_HOST
+    bool
+    default y if LINUX
+    depends on LINUX
+
 config TSC210X
     bool
diff --git a/hw/intc/Kconfig b/hw/intc/Kconfig
index 69adbd1..6eea14e 100644
--- a/hw/intc/Kconfig
+++ b/hw/intc/Kconfig
@@ -21,18 +21,28 @@ config APIC
 
 config ARM_GIC_KVM
     bool
+    default y
+    depends on ARM_GIC && KVM
 
 config OPENPIC_KVM
     bool
+    default y
+    depends on OPENPIC && KVM
 
 config XICS
     bool
+    default y
+    depends on PSERIES
 
 config XICS_SPAPR
     bool
+    default y
+    depends on PSERIES
 
 config XICS_KVM
     bool
+    default y
+    depends on XICS && KVM
 
 config ALLWINNER_A10_PIC
     bool
@@ -42,6 +52,8 @@ config S390_FLIC
 
 config S390_FLIC_KVM
     bool
+    default y
+    depends on S390_FLIC && KVM
 
 config OMPIC
     bool
diff --git a/hw/misc/Kconfig b/hw/misc/Kconfig
index c006b04..cc8dbed 100644
--- a/hw/misc/Kconfig
+++ b/hw/misc/Kconfig
@@ -48,6 +48,8 @@ config MACIO
 
 config IVSHMEM_DEVICE
     bool
+    default y
+    depends on PCI
 
 config ECCMEMCTL
     bool
diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
index 9da9d7d..b0095e1 100644
--- a/hw/ppc/Kconfig
+++ b/hw/ppc/Kconfig
@@ -45,12 +45,16 @@ config MAC_PMU
 
 config XIVE
     bool
+    default y
+    depends on PSERIES
 
 config MACIO_GPIO
     bool
 
 config XIVE_SPAPR
     bool
+    default y
+    depends on PSERIES
 
 config CUDA
     bool
diff --git a/hw/scsi/Kconfig b/hw/scsi/Kconfig
index eb78478..834413b 100644
--- a/hw/scsi/Kconfig
+++ b/hw/scsi/Kconfig
@@ -19,8 +19,14 @@ config ESP
 config ESP_PCI
     bool
 
+config SPAPR_VSCSI
+    bool
+    default y
+    depends on PSERIES
+
 config VIRTIO_SCSI
     bool
 
 config VHOST_USER_SCSI
     bool
+    default y if VHOST_USER && LINUX
diff --git a/hw/tpm/Kconfig b/hw/tpm/Kconfig
index 2eee8eb..db57388 100644
--- a/hw/tpm/Kconfig
+++ b/hw/tpm/Kconfig
@@ -3,6 +3,8 @@ config TPM
 
 config TPM_TIS
     bool
+    default y if PC
+    depends on TPM
 
 config TPM_CRB
     bool
diff --git a/hw/vfio/Kconfig b/hw/vfio/Kconfig
index 31d8dfc..f896779 100644
--- a/hw/vfio/Kconfig
+++ b/hw/vfio/Kconfig
@@ -1,17 +1,26 @@
 config VFIO
     bool
+    depends on LINUX
 
 config VFIO_PCI
     bool
+    select VFIO
+    depends on LINUX
 
 config VFIO_SPAPR
     bool
+    default y
+    depends on VFIO && LINUX && PSERIES
 
 config VFIO_CCW
     bool
+    select VFIO
+    depends on LINUX
 
 config VFIO_PLATFORM
     bool
+    select VFIO
+    depends on LINUX
 
 config VFIO_XGMAC
     bool
@@ -21,3 +30,5 @@ config VFIO_AMD_XGBE
 
 config VFIO_AP
     bool
+    select VFIO
+    depends on LINUX
diff --git a/rules.mak b/rules.mak
index 86e033d..62cf02e 100644
--- a/rules.mak
+++ b/rules.mak
@@ -144,7 +144,7 @@ cc-option = $(if $(shell $(CC) $1 $2 -S -o /dev/null -xc /dev/null \
 cc-c-option = $(if $(shell $(CC) $1 $2 -c -o /dev/null -xc /dev/null \
                 >/dev/null 2>&1 && echo OK), $2, $3)
 
-VPATH_SUFFIXES = %.c %.h %.S %.cc %.cpp %.m %.mak %.texi %.sh %.rc
+VPATH_SUFFIXES = %.c %.h %.S %.cc %.cpp %.m %.mak %.texi %.sh %.rc Kconfig%
 set-vpath = $(if $1,$(foreach PATTERN,$(VPATH_SUFFIXES),$(eval vpath $(PATTERN) $1)))
 
 # install-prog list, dir
diff --git a/scripts/make_device_config.sh b/scripts/make_device_config.sh
deleted file mode 100644
index 354af31..0000000
--- a/scripts/make_device_config.sh
+++ /dev/null
@@ -1,30 +0,0 @@
-#! /bin/sh
-# Writes a target device config file to stdout, from a default and from
-# include directives therein.  Also emits Makefile dependencies.
-#
-# Usage: make_device_config.sh SRC DEPFILE-NAME DEPFILE-TARGET > DEST
-
-src=$1
-dep=$2
-target=$3
-src_dir=$(dirname $src)
-all_includes=
-
-process_includes () {
-  cat $1 | grep '^include' | \
-  while read include file ; do
-    all_includes="$all_includes $src_dir/$file"
-    process_includes $src_dir/$file
-  done
-}
-
-f=$src
-while [ -n "$f" ] ; do
-  f=$(cat $f | tr -d '\r' | awk '/^include / {printf "'$src_dir'/%s ", $2}')
-  [ $? = 0 ] || exit 1
-  all_includes="$all_includes $f"
-done
-process_includes $src
-
-cat $src $all_includes | grep -v '^include'
-echo "$target: $all_includes" > $dep
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 34/52] minikconf: implement allnoconfig and defconfig
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (32 preceding siblings ...)
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 33/52] build: switch to Kconfig Paolo Bonzini
@ 2019-01-25 10:06 ` Paolo Bonzini
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 35/52] ide: express dependencies with Kconfig Paolo Bonzini
                   ` (27 subsequent siblings)
  61 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

Apart from defconfig (which is a no-op),
allyesconfig/allnoconfig/randcondfig can be implemented simply by ignoring
the RHS of assignments and "default" statements.  The RHS is replaced
respectively by "true", "false" or a random value.

However, allyesconfig and randconfig do not quite work, because all
the files for hw/ARCH/Kconfig are sourced and therefore you could
end up enabling some ARM boards in x86 or things like that.  This is
left for future work.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 Makefile             |  8 +++++---
 scripts/minikconf.py | 39 ++++++++++++++++++++++++++++++++++-----
 2 files changed, 39 insertions(+), 8 deletions(-)

diff --git a/Makefile b/Makefile
index 70b9aec..f3b0dc8 100644
--- a/Makefile
+++ b/Makefile
@@ -340,6 +340,11 @@ MINIKCONF_ARGS = \
 MINIKCONF_INPUTS = $(SRC_PATH)/Kconfig.host $(SRC_PATH)/hw/Kconfig
 MINIKCONF = $(PYTHON) $(SRC_PATH)/scripts/minikconf.py \
 
+.PHONY: allnoconfig defconfig
+allnoconfig defconfig:
+	rm */config-devices.mak config-all-devices.mak
+	$(MAKE) MINIKCONF="$(MINIKCONF) --$<" config-all-devices.mak
+
 %/config-devices.mak: default-configs/%.mak $(MINIKCONF_INPUTS)
 	$(call quiet-command, $(MINIKCONF) $(MINIKCONF_ARGS) > $@.tmp, "GEN", "$@.tmp")
 	$(call quiet-command, if test -f $@; then \
@@ -360,9 +365,6 @@ MINIKCONF = $(PYTHON) $(SRC_PATH)/scripts/minikconf.py \
 	  cp -p $@ $@.old; \
 	 fi,"GEN","$@");
 
-defconfig:
-	rm -f config-all-devices.mak $(SUBDIR_DEVICES_MAK)
-
 ifneq ($(wildcard config-host.mak),)
 include $(SRC_PATH)/Makefile.objs
 endif
diff --git a/scripts/minikconf.py b/scripts/minikconf.py
index e26a0e4..dde22ef 100644
--- a/scripts/minikconf.py
+++ b/scripts/minikconf.py
@@ -14,8 +14,10 @@ from __future__ import print_function
 import os
 import sys
 import re
+import random
 
-__all__ = [ 'KconfigParserError', 'KconfigData', 'KconfigParser' ]
+__all__ = [ 'KconfigParserError', 'KconfigData', 'KconfigParser',
+        'defconfig', 'allyesconfig', 'allnoconfig', 'randconfig' ]
 
 def debug_print(*args):
     #print ' '.join(str(x) for x in args)
@@ -31,6 +33,11 @@ def debug_print(*args):
 # just its name).
 # -------------------------------------------
 
+allyesconfig = lambda x: True
+allnoconfig = lambda x: False
+defconfig = lambda x: x
+randconfig = lambda x: random.randint(0, 1) == 1
+
 class KconfigData:
     class Expr:
         def __and__(self, rhs):
@@ -184,7 +191,8 @@ class KconfigData:
             if self.cond.evaluate():
                 self.dest.set_value(True, self)
 
-    def __init__(self):
+    def __init__(self, value_mangler=defconfig):
+        self.value_mangler = value_mangler
         self.previously_included = []
         self.incl_info = None
         self.defined_vars = set()
@@ -265,6 +273,7 @@ class KconfigData:
         self.clauses.append(KconfigData.AssignmentClause(var, val))
 
     def do_default(self, var, val, cond=None):
+        val = self.value_mangler(val)
         self.clauses.append(KconfigData.DefaultClause(var, val, cond))
 
     def do_depends_on(self, var, expr):
@@ -314,9 +323,10 @@ class KconfigParserError(Exception):
         return "%s: %s" % (self.loc, self.msg)
 
 class KconfigParser:
+
     @classmethod
-    def parse(self, fp):
-        data = KconfigData()
+    def parse(self, fp, mode=None):
+        data = KconfigData(mode or KconfigParser.defconfig)
         parser = KconfigParser(data)
         parser.parse_file(fp)
         return data
@@ -632,11 +642,30 @@ class KconfigParser:
 
 if __name__ == '__main__':
     argv = sys.argv
+    mode = defconfig
+    if len(sys.argv) > 1:
+        if argv[1] == '--defconfig':
+            del argv[1]
+        elif argv[1] == '--randconfig':
+            random.seed()
+            mode = randconfig
+            del argv[1]
+        elif argv[1] == '--allyesconfig':
+            mode = allyesconfig
+            del argv[1]
+        elif argv[1] == '--allnoconfig':
+            mode = allnoconfig
+            del argv[1]
+
     if len(argv) == 1:
         print ("%s: at least one argument is required" % argv[0], file=sys.stderr)
         sys.exit(1)
 
-    data = KconfigData()
+    if argv[1].startswith('-'):
+        print ("%s: invalid option %s" % (argv[0], argv[1]), file=sys.stderr)
+        sys.exit(1)
+
+    data = KconfigData(mode)
     parser = KconfigParser(data)
     for arg in argv[3:]:
         m = re.match(r'^(CONFIG_[A-Z0-9_]+)=([yn]?)$', arg)
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 35/52] ide: express dependencies with Kconfig
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (33 preceding siblings ...)
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 34/52] minikconf: implement allnoconfig and defconfig Paolo Bonzini
@ 2019-01-25 10:06 ` Paolo Bonzini
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 36/52] hw/pci/Makefile.objs: make pcie configurable Paolo Bonzini
                   ` (26 subsequent siblings)
  61 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20190123065618.3520-29-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/alpha-softmmu.mak |  2 --
 default-configs/pci.mak           |  3 ---
 hw/ide/Kconfig                    | 15 +++++++++++++++
 3 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/default-configs/alpha-softmmu.mak b/default-configs/alpha-softmmu.mak
index 49cb7ce..fc4afeb 100644
--- a/default-configs/alpha-softmmu.mak
+++ b/default-configs/alpha-softmmu.mak
@@ -11,8 +11,6 @@ CONFIG_PARALLEL=y
 CONFIG_FDC=y
 CONFIG_PCKBD=y
 CONFIG_VGA_CIRRUS=y
-CONFIG_IDE_CORE=y
-CONFIG_IDE_QDEV=y
 CONFIG_VMWARE_VGA=y
 CONFIG_IDE_CMD646=y
 CONFIG_I8259=y
diff --git a/default-configs/pci.mak b/default-configs/pci.mak
index 3d4c71d..41af5e7 100644
--- a/default-configs/pci.mak
+++ b/default-configs/pci.mak
@@ -23,9 +23,6 @@ CONFIG_MPTSAS_SCSI_PCI=y
 CONFIG_RTL8139_PCI=y
 CONFIG_E1000_PCI=y
 CONFIG_E1000E_PCI_EXPRESS=y
-CONFIG_IDE_CORE=y
-CONFIG_IDE_QDEV=y
-CONFIG_IDE_PCI=y
 CONFIG_AHCI=y
 CONFIG_ESP=y
 CONFIG_ESP_PCI=y
diff --git a/hw/ide/Kconfig b/hw/ide/Kconfig
index 5ec4495..fe27705 100644
--- a/hw/ide/Kconfig
+++ b/hw/ide/Kconfig
@@ -3,33 +3,48 @@ config IDE_CORE
 
 config IDE_QDEV
     bool
+    select IDE_CORE
 
 config IDE_PCI
     bool
+    select IDE_CORE
 
 config IDE_ISA
     bool
+    select IDE_QDEV
 
 config IDE_PIIX
     bool
+    select IDE_PCI
+    select IDE_QDEV
 
 config IDE_CMD646
     bool
+    select IDE_PCI
+    select IDE_QDEV
 
 config IDE_MACIO
     bool
+    select IDE_QDEV
 
 config IDE_MMIO
     bool
+    select IDE_QDEV
 
 config IDE_VIA
     bool
+    select IDE_PCI
+    select IDE_QDEV
 
 config MICRODRIVE
     bool
+    select IDE_QDEV
 
 config AHCI
     bool
+    select IDE_QDEV
 
 config IDE_SII3112
     bool
+    select IDE_PCI
+    select IDE_QDEV
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 36/52] hw/pci/Makefile.objs: make pcie configurable
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (34 preceding siblings ...)
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 35/52] ide: express dependencies with Kconfig Paolo Bonzini
@ 2019-01-25 10:06 ` Paolo Bonzini
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 37/52] build: convert pci.mak to Kconfig Paolo Bonzini
                   ` (25 subsequent siblings)
  61 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth, Michael S. Tsirkin

From: Yang Zhong <yang.zhong@intel.com>

Make pcie splited from pci and make it configurable.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20190123065618.3520-30-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/arm-softmmu.mak      | 1 +
 default-configs/i386-softmmu.mak     | 1 +
 default-configs/mips64el-softmmu.mak | 1 +
 default-configs/ppc-softmmu.mak      | 1 +
 default-configs/riscv32-softmmu.mak  | 1 +
 default-configs/riscv64-softmmu.mak  | 1 +
 hw/pci/Kconfig                       | 4 ++++
 hw/pci/Makefile.objs                 | 9 +++++++--
 8 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index b0995a0..59cf3d2 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -121,6 +121,7 @@ CONFIG_VERSATILE=y
 CONFIG_VERSATILE_PCI=y
 CONFIG_VERSATILE_I2C=y
 
+CONFIG_PCI_EXPRESS=y
 CONFIG_PCI_EXPRESS_GENERIC_BRIDGE=y
 CONFIG_VFIO_PLATFORM=y
 CONFIG_VFIO_XGMAC=y
diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmmu.mak
index 412c8c5..b5281d3 100644
--- a/default-configs/i386-softmmu.mak
+++ b/default-configs/i386-softmmu.mak
@@ -44,6 +44,7 @@ CONFIG_ISA_TESTDEV=y
 CONFIG_VMPORT=y
 CONFIG_SGA=y
 CONFIG_LPC_ICH9=y
+CONFIG_PCI_EXPRESS=y
 CONFIG_PCI_EXPRESS_Q35=y
 CONFIG_APIC=y
 CONFIG_IOAPIC=y
diff --git a/default-configs/mips64el-softmmu.mak b/default-configs/mips64el-softmmu.mak
index 9eb1208..c6ad4da 100644
--- a/default-configs/mips64el-softmmu.mak
+++ b/default-configs/mips64el-softmmu.mak
@@ -12,4 +12,5 @@ CONFIG_JAZZ_LED=y
 CONFIG_VT82C686=y
 CONFIG_MIPS_BOSTON=y
 CONFIG_FITLOADER=y
+CONFIG_PCI_EXPRESS=y
 CONFIG_PCI_EXPRESS_XILINX=y
diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
index 90118cb..47e4177 100644
--- a/default-configs/ppc-softmmu.mak
+++ b/default-configs/ppc-softmmu.mak
@@ -23,6 +23,7 @@ CONFIG_ETSEC=y
 CONFIG_PPC405=y
 CONFIG_PPC440=y
 CONFIG_VIRTEX=y
+CONFIG_PCI_EXPRESS=y
 
 # For Sam460ex
 CONFIG_SAM460EX=y
diff --git a/default-configs/riscv32-softmmu.mak b/default-configs/riscv32-softmmu.mak
index 6533716..8c3a91a 100644
--- a/default-configs/riscv32-softmmu.mak
+++ b/default-configs/riscv32-softmmu.mak
@@ -8,6 +8,7 @@ CONFIG_VIRTIO_MMIO=y
 
 CONFIG_CADENCE=y
 
+CONFIG_PCI_EXPRESS=y
 CONFIG_PCI_EXPRESS_GENERIC_BRIDGE=y
 
 CONFIG_VGA=y
diff --git a/default-configs/riscv64-softmmu.mak b/default-configs/riscv64-softmmu.mak
index 6533716..8c3a91a 100644
--- a/default-configs/riscv64-softmmu.mak
+++ b/default-configs/riscv64-softmmu.mak
@@ -8,6 +8,7 @@ CONFIG_VIRTIO_MMIO=y
 
 CONFIG_CADENCE=y
 
+CONFIG_PCI_EXPRESS=y
 CONFIG_PCI_EXPRESS_GENERIC_BRIDGE=y
 
 CONFIG_VGA=y
diff --git a/hw/pci/Kconfig b/hw/pci/Kconfig
index d3d2205..4ca2537 100644
--- a/hw/pci/Kconfig
+++ b/hw/pci/Kconfig
@@ -1,2 +1,6 @@
 config PCI
     bool
+
+config PCI_EXPRESS
+    bool
+    select PCI
diff --git a/hw/pci/Makefile.objs b/hw/pci/Makefile.objs
index 9f905e6..c78f2fb 100644
--- a/hw/pci/Makefile.objs
+++ b/hw/pci/Makefile.objs
@@ -2,8 +2,13 @@ common-obj-$(CONFIG_PCI) += pci.o pci_bridge.o
 common-obj-$(CONFIG_PCI) += msix.o msi.o
 common-obj-$(CONFIG_PCI) += shpc.o
 common-obj-$(CONFIG_PCI) += slotid_cap.o
-common-obj-$(CONFIG_PCI) += pci_host.o pcie_host.o
-common-obj-$(CONFIG_PCI) += pcie.o pcie_aer.o pcie_port.o
+common-obj-$(CONFIG_PCI) += pci_host.o
+
+# The functions in these modules can be used by devices too.  Since we
+# allow plugging PCIe devices into PCI buses, include them even if
+# CONFIG_PCI_EXPRESS=n.
+common-obj-$(CONFIG_PCI) += pcie.o pcie_aer.o
+common-obj-$(CONFIG_PCI_EXPRESS) += pcie_port.o pcie_host.o
 
 common-obj-$(call lnot,$(CONFIG_PCI)) += pci-stub.o
 common-obj-$(CONFIG_ALL) += pci-stub.o
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 37/52] build: convert pci.mak to Kconfig
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (35 preceding siblings ...)
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 36/52] hw/pci/Makefile.objs: make pcie configurable Paolo Bonzini
@ 2019-01-25 10:06 ` Paolo Bonzini
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 38/52] build: convert sound.mak " Paolo Bonzini
                   ` (24 subsequent siblings)
  61 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth, Michael S. Tsirkin

Instead of including the same list of devices for each target,
set CONFIG_PCI to true, and make the devices default to present
whenever PCI is available.  However, s390x does not want all the
PCI devices, so there is a separate symbol to enable them.

Done mostly with the following script:

  while read i; do
     i=${i%=y}; i=${i#CONFIG_}
     sed -i -e'/^config '$i'$/!b' -en \
            -e'a\' -e'    default y if PCI_DEVICES\' -e'    depends on PCI' \
          `grep -lw $i hw/*/Kconfig`
  done < default-configs/pci.mak

followed by replacing a few "depends on" clauses with "select"
whenever the symbol is not really related to PCI.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20190123065618.3520-31-yang.zhong@intel.com>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/alpha-softmmu.mak       |  3 ++-
 default-configs/arm-softmmu.mak         |  3 ++-
 default-configs/hppa-softmmu.mak        |  4 +--
 default-configs/i386-softmmu.mak        |  5 ++--
 default-configs/mips-softmmu-common.mak |  3 ++-
 default-configs/pci.mak                 | 48 ---------------------------------
 default-configs/ppc-softmmu.mak         |  3 ++-
 default-configs/riscv32-softmmu.mak     |  4 +--
 default-configs/riscv64-softmmu.mak     |  4 +--
 default-configs/sh4-softmmu.mak         |  3 ++-
 default-configs/sh4eb-softmmu.mak       |  3 ++-
 default-configs/sparc64-softmmu.mak     |  3 ++-
 docs/devel/build-system.txt             |  1 -
 hw/audio/Kconfig                        |  6 +++++
 hw/block/Kconfig                        |  2 ++
 hw/char/Kconfig                         |  2 ++
 hw/display/Kconfig                      | 16 +++++++++++
 hw/ide/Kconfig                          |  3 +++
 hw/ipack/Kconfig                        |  2 ++
 hw/misc/Kconfig                         |  6 ++++-
 hw/net/Kconfig                          | 23 ++++++++++++++++
 hw/pci-bridge/Kconfig                   |  8 ++++++
 hw/pci-host/Kconfig                     | 10 +++++++
 hw/pci/Kconfig                          |  3 +++
 hw/scsi/Kconfig                         | 11 ++++++++
 hw/sd/Kconfig                           |  3 +++
 hw/usb/Kconfig                          | 10 +++++++
 hw/virtio/Kconfig                       |  3 +++
 hw/watchdog/Kconfig                     |  2 ++
 29 files changed, 131 insertions(+), 66 deletions(-)
 delete mode 100644 default-configs/pci.mak

diff --git a/default-configs/alpha-softmmu.mak b/default-configs/alpha-softmmu.mak
index fc4afeb..a7b4a87 100644
--- a/default-configs/alpha-softmmu.mak
+++ b/default-configs/alpha-softmmu.mak
@@ -1,7 +1,8 @@
 # Default configuration for alpha-softmmu
 
-include pci.mak
 include usb.mak
+CONFIG_PCI=y
+CONFIG_PCI_DEVICES=y
 CONFIG_SERIAL=y
 CONFIG_SERIAL_ISA=y
 CONFIG_I82374=y
diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index 59cf3d2..0109e68 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -1,7 +1,8 @@
 # Default configuration for arm-softmmu
 
-include pci.mak
 include usb.mak
+CONFIG_PCI=y
+CONFIG_PCI_DEVICES=y
 CONFIG_VGA=y
 CONFIG_NAND=y
 CONFIG_ECC=y
diff --git a/default-configs/hppa-softmmu.mak b/default-configs/hppa-softmmu.mak
index b594a6d..1594760 100644
--- a/default-configs/hppa-softmmu.mak
+++ b/default-configs/hppa-softmmu.mak
@@ -1,10 +1,10 @@
-include pci.mak
 include usb.mak
+CONFIG_PCI=y
+CONFIG_PCI_DEVICES=y
 CONFIG_SERIAL=y
 CONFIG_SERIAL_ISA=y
 CONFIG_ISA_BUS=y
 CONFIG_I8259=y
-CONFIG_E1000_PCI=y
 CONFIG_IDE_ISA=y
 CONFIG_IDE_CMD646=y
 # CONFIG_IDE_MMIO=y
diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmmu.mak
index b5281d3..a139bd5 100644
--- a/default-configs/i386-softmmu.mak
+++ b/default-configs/i386-softmmu.mak
@@ -1,11 +1,11 @@
 # Default configuration for i386-softmmu
 
-include pci.mak
+CONFIG_PCI=y
+CONFIG_PCI_DEVICES=y
 include sound.mak
 include usb.mak
 include hyperv.mak
 CONFIG_VGA_ISA=y
-CONFIG_VGA_CIRRUS=y
 CONFIG_VMWARE_VGA=y
 CONFIG_VMXNET3_PCI=y
 CONFIG_VIRTIO_VGA=y
@@ -53,7 +53,6 @@ CONFIG_MEM_DEVICE=y
 CONFIG_DIMM=y
 CONFIG_NVDIMM=y
 CONFIG_ACPI_NVDIMM=y
-CONFIG_PCIE_PORT=y
 CONFIG_XIO3130=y
 CONFIG_IOH3420=y
 CONFIG_I82801B11=y
diff --git a/default-configs/mips-softmmu-common.mak b/default-configs/mips-softmmu-common.mak
index ded7498..246af88 100644
--- a/default-configs/mips-softmmu-common.mak
+++ b/default-configs/mips-softmmu-common.mak
@@ -1,8 +1,9 @@
 # Common mips*-softmmu CONFIG defines
 
-include pci.mak
 include sound.mak
 include usb.mak
+CONFIG_PCI=y
+CONFIG_PCI_DEVICES=y
 CONFIG_ESP=y
 CONFIG_SCSI=y
 CONFIG_VGA_ISA=y
diff --git a/default-configs/pci.mak b/default-configs/pci.mak
deleted file mode 100644
index 41af5e7..0000000
--- a/default-configs/pci.mak
+++ /dev/null
@@ -1,48 +0,0 @@
-CONFIG_PCI=y
-# For now, CONFIG_IDE_CORE requires ISA, so we enable it here
-CONFIG_ISA_BUS=y
-CONFIG_VIRTIO_PCI=y
-include virtio.mak
-CONFIG_USB_UHCI=y
-CONFIG_USB_OHCI=y
-CONFIG_USB_EHCI=y
-CONFIG_USB_XHCI=y
-CONFIG_USB_XHCI_NEC=y
-CONFIG_NE2000_PCI=y
-CONFIG_EEPRO100_PCI=y
-CONFIG_PCNET_PCI=y
-CONFIG_PCNET_COMMON=y
-CONFIG_AC97=y
-CONFIG_HDA=y
-CONFIG_ES1370=y
-CONFIG_SCSI=y
-CONFIG_LSI_SCSI_PCI=y
-CONFIG_VMW_PVSCSI_SCSI_PCI=y
-CONFIG_MEGASAS_SCSI_PCI=y
-CONFIG_MPTSAS_SCSI_PCI=y
-CONFIG_RTL8139_PCI=y
-CONFIG_E1000_PCI=y
-CONFIG_E1000E_PCI_EXPRESS=y
-CONFIG_AHCI=y
-CONFIG_ESP=y
-CONFIG_ESP_PCI=y
-CONFIG_SERIAL=y
-CONFIG_SERIAL_ISA=y
-CONFIG_SERIAL_PCI=y
-CONFIG_CAN_BUS=y
-CONFIG_CAN_SJA1000=y
-CONFIG_CAN_PCI=y
-CONFIG_IPACK=y
-CONFIG_WDT_IB6300ESB=y
-CONFIG_PCI_TESTDEV=y
-CONFIG_NVME_PCI=y
-CONFIG_SD=y
-CONFIG_SDHCI=y
-CONFIG_EDU=y
-CONFIG_VGA=y
-CONFIG_VGA_PCI=y
-CONFIG_BOCHS_DISPLAY=y
-CONFIG_IVSHMEM_DEVICE=$(CONFIG_IVSHMEM)
-CONFIG_ROCKER=y
-CONFIG_VFIO_PCI=y
-CONFIG_EDID=y
diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
index 47e4177..763184f 100644
--- a/default-configs/ppc-softmmu.mak
+++ b/default-configs/ppc-softmmu.mak
@@ -1,8 +1,9 @@
 # Default configuration for ppc-softmmu
 
-include pci.mak
 include sound.mak
 include usb.mak
+CONFIG_PCI=y
+CONFIG_PCI_DEVICES=y
 
 # For embedded PPCs:
 CONFIG_PPC4XX=y
diff --git a/default-configs/riscv32-softmmu.mak b/default-configs/riscv32-softmmu.mak
index 8c3a91a..5501c1b 100644
--- a/default-configs/riscv32-softmmu.mak
+++ b/default-configs/riscv32-softmmu.mak
@@ -1,8 +1,8 @@
 # Default configuration for riscv-softmmu
 
-include pci.mak
 include usb.mak
-
+CONFIG_PCI=y
+CONFIG_PCI_DEVICES=y
 CONFIG_SERIAL=y
 CONFIG_VIRTIO_MMIO=y
 
diff --git a/default-configs/riscv64-softmmu.mak b/default-configs/riscv64-softmmu.mak
index 8c3a91a..5501c1b 100644
--- a/default-configs/riscv64-softmmu.mak
+++ b/default-configs/riscv64-softmmu.mak
@@ -1,8 +1,8 @@
 # Default configuration for riscv-softmmu
 
-include pci.mak
 include usb.mak
-
+CONFIG_PCI=y
+CONFIG_PCI_DEVICES=y
 CONFIG_SERIAL=y
 CONFIG_VIRTIO_MMIO=y
 
diff --git a/default-configs/sh4-softmmu.mak b/default-configs/sh4-softmmu.mak
index 1fdb009..0459d43 100644
--- a/default-configs/sh4-softmmu.mak
+++ b/default-configs/sh4-softmmu.mak
@@ -1,7 +1,8 @@
 # Default configuration for sh4-softmmu
 
-include pci.mak
 include usb.mak
+CONFIG_PCI=y
+CONFIG_PCI_DEVICES=y
 CONFIG_SERIAL=y
 CONFIG_SERIAL_ISA=y
 CONFIG_PTIMER=y
diff --git a/default-configs/sh4eb-softmmu.mak b/default-configs/sh4eb-softmmu.mak
index 3b550a5..09a5b5e 100644
--- a/default-configs/sh4eb-softmmu.mak
+++ b/default-configs/sh4eb-softmmu.mak
@@ -1,7 +1,8 @@
 # Default configuration for sh4eb-softmmu
 
-include pci.mak
 include usb.mak
+CONFIG_PCI=y
+CONFIG_PCI_DEVICES=y
 CONFIG_SERIAL=y
 CONFIG_SERIAL_ISA=y
 CONFIG_PTIMER=y
diff --git a/default-configs/sparc64-softmmu.mak b/default-configs/sparc64-softmmu.mak
index 1fae488..d5e4a73 100644
--- a/default-configs/sparc64-softmmu.mak
+++ b/default-configs/sparc64-softmmu.mak
@@ -1,7 +1,8 @@
 # Default configuration for sparc64-softmmu
 
-include pci.mak
 include usb.mak
+CONFIG_PCI=y
+CONFIG_PCI_DEVICES=y
 CONFIG_M48T59=y
 CONFIG_PTIMER=y
 CONFIG_SERIAL=y
diff --git a/docs/devel/build-system.txt b/docs/devel/build-system.txt
index f9fd27f..addd274 100644
--- a/docs/devel/build-system.txt
+++ b/docs/devel/build-system.txt
@@ -417,7 +417,6 @@ into each QEMU system and userspace emulator targets. They merely
 contain a long list of config variable definitions. For example,
 default-configs/x86_64-softmmu.mak has:
 
-  include pci.mak
   include sound.mak
   include usb.mak
   CONFIG_QXL=$(CONFIG_SPICE)
diff --git a/hw/audio/Kconfig b/hw/audio/Kconfig
index 207baee..aa5c82b 100644
--- a/hw/audio/Kconfig
+++ b/hw/audio/Kconfig
@@ -3,9 +3,13 @@ config SB16
 
 config ES1370
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config AC97
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config ADLIB
     bool
@@ -18,6 +22,8 @@ config CS4231A
 
 config HDA
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config PCSPK
     bool
diff --git a/hw/block/Kconfig b/hw/block/Kconfig
index 1780569..f7b9d3a 100644
--- a/hw/block/Kconfig
+++ b/hw/block/Kconfig
@@ -21,6 +21,8 @@ config ONENAND
 
 config NVME_PCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config VIRTIO_BLK
     bool
diff --git a/hw/char/Kconfig b/hw/char/Kconfig
index 26c1324..6eba69a 100644
--- a/hw/char/Kconfig
+++ b/hw/char/Kconfig
@@ -15,6 +15,8 @@ config SERIAL_ISA
 
 config SERIAL_PCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config VIRTIO_SERIAL
     bool
diff --git a/hw/display/Kconfig b/hw/display/Kconfig
index 429056b..f8d63c6 100644
--- a/hw/display/Kconfig
+++ b/hw/display/Kconfig
@@ -9,6 +9,9 @@ config ADS7846
 
 config VGA_CIRRUS
     bool
+    default y if PCI_DEVICES
+    depends on PCI
+    select VGA
 
 config G364FB
     bool
@@ -30,6 +33,9 @@ config SSD0323
 
 config VGA_PCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
+    select VGA
 
 config VGA_ISA
     bool
@@ -39,9 +45,15 @@ config VGA_ISA_MM
 
 config VMWARE_VGA
     bool
+    default y if PCI_DEVICES
+    depends on PCI
+    select VGA
 
 config BOCHS_DISPLAY
     bool
+    default y if PCI_DEVICES
+    depends on PCI
+    select VGA
 
 config BLIZZARD
     bool
@@ -70,12 +82,16 @@ config QXL
     bool
     default y if PC
     depends on SPICE && PCI
+    select VGA
 
 config VIRTIO_GPU
     bool
 
 config VIRTIO_VGA
     bool
+    default y if PCI_DEVICES && VIRTIO
+    depends on PCI
+    select VGA
 
 config DPCD
     bool
diff --git a/hw/ide/Kconfig b/hw/ide/Kconfig
index fe27705..246e27b 100644
--- a/hw/ide/Kconfig
+++ b/hw/ide/Kconfig
@@ -7,6 +7,7 @@ config IDE_QDEV
 
 config IDE_PCI
     bool
+    depends on PCI
     select IDE_CORE
 
 config IDE_ISA
@@ -42,6 +43,8 @@ config MICRODRIVE
 
 config AHCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
     select IDE_QDEV
 
 config IDE_SII3112
diff --git a/hw/ipack/Kconfig b/hw/ipack/Kconfig
index 481e0d2..f8da24a 100644
--- a/hw/ipack/Kconfig
+++ b/hw/ipack/Kconfig
@@ -1,2 +1,4 @@
 config IPACK
     bool
+    default y if PCI_DEVICES
+	    depends on PCI
diff --git a/hw/misc/Kconfig b/hw/misc/Kconfig
index cc8dbed..c85c085 100644
--- a/hw/misc/Kconfig
+++ b/hw/misc/Kconfig
@@ -21,9 +21,13 @@ config ISA_TESTDEV
 
 config PCI_TESTDEV
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config EDU
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config PCA9552
     bool
@@ -48,7 +52,7 @@ config MACIO
 
 config IVSHMEM_DEVICE
     bool
-    default y
+    default y if PCI_DEVICES
     depends on PCI
 
 config ECCMEMCTL
diff --git a/hw/net/Kconfig b/hw/net/Kconfig
index d358b2c..d50e301 100644
--- a/hw/net/Kconfig
+++ b/hw/net/Kconfig
@@ -3,27 +3,42 @@ config DP8393X
 
 config NE2000_PCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config EEPRO100_PCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config PCNET_PCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
+    select PCNET_COMMON
 
 config PCNET_COMMON
     bool
 
 config E1000_PCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config E1000E_PCI_EXPRESS
     bool
+    default y if PCI_DEVICES
+    depends on PCI_EXPRESS
 
 config RTL8139_PCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config VMXNET3_PCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config SMC91C111
     bool
@@ -81,12 +96,20 @@ config ETSEC
 
 config ROCKER
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config CAN_BUS
     bool
 
 config CAN_PCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
+    select CAN_BUS
 
 config CAN_SJA1000
     bool
+    default y if PCI_DEVICES
+    depends on PCI
+    select CAN_BUS
diff --git a/hw/pci-bridge/Kconfig b/hw/pci-bridge/Kconfig
index bb19b7a..0519eb1 100644
--- a/hw/pci-bridge/Kconfig
+++ b/hw/pci-bridge/Kconfig
@@ -1,17 +1,25 @@
 config PCIE_PORT
     bool
+    default y if PCI_DEVICES
+    depends on PCI_EXPRESS
 
 config PXB
     bool
 
 config XIO3130
     bool
+    default y if PCI_DEVICES
+    depends on PCI_EXPRESS
 
 config IOH3420
     bool
+    default y if PCI_DEVICES
+    depends on PCI_EXPRESS
 
 config I82801B11
     bool
+    default y if PCI_DEVICES
+    depends on PCI_EXPRESS
 
 config DEC_PCI
     bool
diff --git a/hw/pci-host/Kconfig b/hw/pci-host/Kconfig
index 2edc5bb..c01812a 100644
--- a/hw/pci-host/Kconfig
+++ b/hw/pci-host/Kconfig
@@ -2,21 +2,27 @@ config PAM
     bool
 
 config PREP_PCI
+    select PCI
     bool
 
 config GRACKLE_PCI
+    select PCI
     bool
 
 config UNIN_PCI
+    select PCI
     bool
 
 config PPCE500_PCI
+    select PCI
     bool
 
 config VERSATILE_PCI
+    select PCI
     bool
 
 config PCI_SABRE
+    select PCI
     bool
 
 config PCI_PIIX
@@ -24,12 +30,16 @@ config PCI_PIIX
 
 config PCI_EXPRESS_Q35
     bool
+    select PCI_EXPRESS
 
 config PCI_EXPRESS_GENERIC_BRIDGE
     bool
+    select PCI_EXPRESS
 
 config PCI_EXPRESS_XILINX
     bool
+    select PCI_EXPRESS
 
 config PCI_EXPRESS_DESIGNWARE
     bool
+    select PCI_EXPRESS
diff --git a/hw/pci/Kconfig b/hw/pci/Kconfig
index 4ca2537..3b8638b 100644
--- a/hw/pci/Kconfig
+++ b/hw/pci/Kconfig
@@ -4,3 +4,6 @@ config PCI
 config PCI_EXPRESS
     bool
     select PCI
+
+config PCI_DEVICES
+    bool
diff --git a/hw/scsi/Kconfig b/hw/scsi/Kconfig
index 834413b..c02d880 100644
--- a/hw/scsi/Kconfig
+++ b/hw/scsi/Kconfig
@@ -3,21 +3,32 @@ config SCSI
 
 config LSI_SCSI_PCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config MPTSAS_SCSI_PCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config MEGASAS_SCSI_PCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config VMW_PVSCSI_SCSI_PCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config ESP
     bool
 
 config ESP_PCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
+    select ESP
 
 config SPAPR_VSCSI
     bool
diff --git a/hw/sd/Kconfig b/hw/sd/Kconfig
index 4f43bbb..c6c5dfb 100644
--- a/hw/sd/Kconfig
+++ b/hw/sd/Kconfig
@@ -9,3 +9,6 @@ config SD
 
 config SDHCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
+    select SD
diff --git a/hw/usb/Kconfig b/hw/usb/Kconfig
index cbf5c5d..86ee615 100644
--- a/hw/usb/Kconfig
+++ b/hw/usb/Kconfig
@@ -3,21 +3,31 @@ config USB
 
 config USB_UHCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config USB_OHCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config USB_EHCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config USB_EHCI_SYSBUS
     bool
 
 config USB_XHCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config USB_XHCI_NEC
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config USB_MUSB
     bool
diff --git a/hw/virtio/Kconfig b/hw/virtio/Kconfig
index ebf1812..5dafbe3 100644
--- a/hw/virtio/Kconfig
+++ b/hw/virtio/Kconfig
@@ -6,6 +6,9 @@ config VIRTIO_RNG
 
 config VIRTIO_PCI
     bool
+    default y if PCI_DEVICES
+    depends on PCI
+    select VIRTIO
 
 config VIRTIO_MMIO
     bool
diff --git a/hw/watchdog/Kconfig b/hw/watchdog/Kconfig
index cd0244f..edb3d42 100644
--- a/hw/watchdog/Kconfig
+++ b/hw/watchdog/Kconfig
@@ -3,6 +3,8 @@ config CMSDK_APB_WATCHDOG
 
 config WDT_IB6300ESB
     bool
+    default y if PCI_DEVICES
+    depends on PCI
 
 config WDT_IB700
     bool
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 38/52] build: convert sound.mak to Kconfig
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (36 preceding siblings ...)
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 37/52] build: convert pci.mak to Kconfig Paolo Bonzini
@ 2019-01-25 10:06 ` Paolo Bonzini
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 39/52] build: convert usb.mak " Paolo Bonzini
                   ` (23 subsequent siblings)
  61 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

There is really nothing special in these devices; they are just
ISA devices.  Instead of including them for each target,
set CONFIG_ISA_BUS to true, and make the devices default to present
whenever ISA is available.  More conversion of ISA devices will
follow.

Done with the following script:

  while read i; do
     i=${i%=y}; i=${i#CONFIG_}
     sed -i -e'/^config '$i'$/!b' -en \
            -e'a\' -e'    default y\' -e'    depends on ISA_BUS' \
          `grep -lw $i hw/*/Kconfig`
  done < default-configs/sound.mak

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20190123065618.3520-32-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/i386-softmmu.mak        | 2 +-
 default-configs/mips-softmmu-common.mak | 2 +-
 default-configs/ppc-softmmu.mak         | 2 +-
 default-configs/sound.mak               | 4 ----
 hw/audio/Kconfig                        | 8 ++++++++
 5 files changed, 11 insertions(+), 7 deletions(-)
 delete mode 100644 default-configs/sound.mak

diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmmu.mak
index a139bd5..9eb9351 100644
--- a/default-configs/i386-softmmu.mak
+++ b/default-configs/i386-softmmu.mak
@@ -2,7 +2,7 @@
 
 CONFIG_PCI=y
 CONFIG_PCI_DEVICES=y
-include sound.mak
+CONFIG_ISA_BUS=y
 include usb.mak
 include hyperv.mak
 CONFIG_VGA_ISA=y
diff --git a/default-configs/mips-softmmu-common.mak b/default-configs/mips-softmmu-common.mak
index 246af88..981ea2c 100644
--- a/default-configs/mips-softmmu-common.mak
+++ b/default-configs/mips-softmmu-common.mak
@@ -1,7 +1,7 @@
 # Common mips*-softmmu CONFIG defines
 
-include sound.mak
 include usb.mak
+CONFIG_ISA_BUS=y
 CONFIG_PCI=y
 CONFIG_PCI_DEVICES=y
 CONFIG_ESP=y
diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
index 763184f..dba071a 100644
--- a/default-configs/ppc-softmmu.mak
+++ b/default-configs/ppc-softmmu.mak
@@ -1,9 +1,9 @@
 # Default configuration for ppc-softmmu
 
-include sound.mak
 include usb.mak
 CONFIG_PCI=y
 CONFIG_PCI_DEVICES=y
+CONFIG_ISA_BUS=y
 
 # For embedded PPCs:
 CONFIG_PPC4XX=y
diff --git a/default-configs/sound.mak b/default-configs/sound.mak
deleted file mode 100644
index 4f22c34..0000000
--- a/default-configs/sound.mak
+++ /dev/null
@@ -1,4 +0,0 @@
-CONFIG_SB16=y
-CONFIG_ADLIB=y
-CONFIG_GUS=y
-CONFIG_CS4231A=y
diff --git a/hw/audio/Kconfig b/hw/audio/Kconfig
index aa5c82b..dedb513 100644
--- a/hw/audio/Kconfig
+++ b/hw/audio/Kconfig
@@ -1,5 +1,7 @@
 config SB16
     bool
+    default y
+    depends on ISA_BUS
 
 config ES1370
     bool
@@ -13,12 +15,18 @@ config AC97
 
 config ADLIB
     bool
+    default y
+    depends on ISA_BUS
 
 config GUS
     bool
+    default y
+    depends on ISA_BUS
 
 config CS4231A
     bool
+    default y
+    depends on ISA_BUS
 
 config HDA
     bool
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 39/52] build: convert usb.mak to Kconfig
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (37 preceding siblings ...)
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 38/52] build: convert sound.mak " Paolo Bonzini
@ 2019-01-25 10:06 ` Paolo Bonzini
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 40/52] scsi: express dependencies with Kconfig Paolo Bonzini
                   ` (22 subsequent siblings)
  61 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

Instead of including the same list of devices for each target,
let the host controllers select CONFIG_USB and make the devices
default to present whenever USB is available.

Done with the following script:
  while read i; do
     i=${i%=y}; i=${i#CONFIG_}
     sed -i -e'/^config '$i'$/!b' -en \
            -e'a\' -e'    default y\' -e'    depends on USB' \
          `grep -lw $i hw/*/Kconfig`
  done < default-configs/usb.mak

followed by adding "select USB" on the host controllers.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20190123065618.3520-33-yang.zhong@intel.com>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/alpha-softmmu.mak       |  1 -
 default-configs/arm-softmmu.mak         |  2 --
 default-configs/hppa-softmmu.mak        |  1 -
 default-configs/i386-softmmu.mak        |  1 -
 default-configs/mips-softmmu-common.mak |  1 -
 default-configs/ppc-softmmu.mak         |  1 -
 default-configs/riscv32-softmmu.mak     |  1 -
 default-configs/riscv64-softmmu.mak     |  1 -
 default-configs/sh4-softmmu.mak         |  1 -
 default-configs/sh4eb-softmmu.mak       |  1 -
 default-configs/sparc64-softmmu.mak     |  1 -
 default-configs/usb.mak                 | 11 -----------
 hw/usb/Kconfig                          | 26 ++++++++++++++++++++++++++
 13 files changed, 26 insertions(+), 23 deletions(-)
 delete mode 100644 default-configs/usb.mak

diff --git a/default-configs/alpha-softmmu.mak b/default-configs/alpha-softmmu.mak
index a7b4a87..f44c5bc 100644
--- a/default-configs/alpha-softmmu.mak
+++ b/default-configs/alpha-softmmu.mak
@@ -1,6 +1,5 @@
 # Default configuration for alpha-softmmu
 
-include usb.mak
 CONFIG_PCI=y
 CONFIG_PCI_DEVICES=y
 CONFIG_SERIAL=y
diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index 0109e68..07d0a62 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -1,6 +1,5 @@
 # Default configuration for arm-softmmu
 
-include usb.mak
 CONFIG_PCI=y
 CONFIG_PCI_DEVICES=y
 CONFIG_VGA=y
@@ -38,7 +37,6 @@ CONFIG_DS1338=y
 CONFIG_PFLASH_CFI01=y
 CONFIG_PFLASH_CFI02=y
 CONFIG_MICRODRIVE=y
-CONFIG_USB=y
 CONFIG_USB_MUSB=y
 CONFIG_USB_EHCI_SYSBUS=y
 CONFIG_PLATFORM_BUS=y
diff --git a/default-configs/hppa-softmmu.mak b/default-configs/hppa-softmmu.mak
index 1594760..d30b12a 100644
--- a/default-configs/hppa-softmmu.mak
+++ b/default-configs/hppa-softmmu.mak
@@ -1,4 +1,3 @@
-include usb.mak
 CONFIG_PCI=y
 CONFIG_PCI_DEVICES=y
 CONFIG_SERIAL=y
diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmmu.mak
index 9eb9351..4073c62 100644
--- a/default-configs/i386-softmmu.mak
+++ b/default-configs/i386-softmmu.mak
@@ -3,7 +3,6 @@
 CONFIG_PCI=y
 CONFIG_PCI_DEVICES=y
 CONFIG_ISA_BUS=y
-include usb.mak
 include hyperv.mak
 CONFIG_VGA_ISA=y
 CONFIG_VMWARE_VGA=y
diff --git a/default-configs/mips-softmmu-common.mak b/default-configs/mips-softmmu-common.mak
index 981ea2c..e5f0841 100644
--- a/default-configs/mips-softmmu-common.mak
+++ b/default-configs/mips-softmmu-common.mak
@@ -1,6 +1,5 @@
 # Common mips*-softmmu CONFIG defines
 
-include usb.mak
 CONFIG_ISA_BUS=y
 CONFIG_PCI=y
 CONFIG_PCI_DEVICES=y
diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
index dba071a..c60a483 100644
--- a/default-configs/ppc-softmmu.mak
+++ b/default-configs/ppc-softmmu.mak
@@ -1,6 +1,5 @@
 # Default configuration for ppc-softmmu
 
-include usb.mak
 CONFIG_PCI=y
 CONFIG_PCI_DEVICES=y
 CONFIG_ISA_BUS=y
diff --git a/default-configs/riscv32-softmmu.mak b/default-configs/riscv32-softmmu.mak
index 5501c1b..fd91efb 100644
--- a/default-configs/riscv32-softmmu.mak
+++ b/default-configs/riscv32-softmmu.mak
@@ -1,6 +1,5 @@
 # Default configuration for riscv-softmmu
 
-include usb.mak
 CONFIG_PCI=y
 CONFIG_PCI_DEVICES=y
 CONFIG_SERIAL=y
diff --git a/default-configs/riscv64-softmmu.mak b/default-configs/riscv64-softmmu.mak
index 5501c1b..fd91efb 100644
--- a/default-configs/riscv64-softmmu.mak
+++ b/default-configs/riscv64-softmmu.mak
@@ -1,6 +1,5 @@
 # Default configuration for riscv-softmmu
 
-include usb.mak
 CONFIG_PCI=y
 CONFIG_PCI_DEVICES=y
 CONFIG_SERIAL=y
diff --git a/default-configs/sh4-softmmu.mak b/default-configs/sh4-softmmu.mak
index 0459d43..7446fc8 100644
--- a/default-configs/sh4-softmmu.mak
+++ b/default-configs/sh4-softmmu.mak
@@ -1,6 +1,5 @@
 # Default configuration for sh4-softmmu
 
-include usb.mak
 CONFIG_PCI=y
 CONFIG_PCI_DEVICES=y
 CONFIG_SERIAL=y
diff --git a/default-configs/sh4eb-softmmu.mak b/default-configs/sh4eb-softmmu.mak
index 09a5b5e..e37a532 100644
--- a/default-configs/sh4eb-softmmu.mak
+++ b/default-configs/sh4eb-softmmu.mak
@@ -1,6 +1,5 @@
 # Default configuration for sh4eb-softmmu
 
-include usb.mak
 CONFIG_PCI=y
 CONFIG_PCI_DEVICES=y
 CONFIG_SERIAL=y
diff --git a/default-configs/sparc64-softmmu.mak b/default-configs/sparc64-softmmu.mak
index d5e4a73..4a6e997 100644
--- a/default-configs/sparc64-softmmu.mak
+++ b/default-configs/sparc64-softmmu.mak
@@ -1,6 +1,5 @@
 # Default configuration for sparc64-softmmu
 
-include usb.mak
 CONFIG_PCI=y
 CONFIG_PCI_DEVICES=y
 CONFIG_M48T59=y
diff --git a/default-configs/usb.mak b/default-configs/usb.mak
deleted file mode 100644
index e42cfea..0000000
--- a/default-configs/usb.mak
+++ /dev/null
@@ -1,11 +0,0 @@
-CONFIG_USB=y
-CONFIG_USB_TABLET_WACOM=y
-CONFIG_USB_STORAGE_BOT=y
-CONFIG_USB_STORAGE_UAS=y
-CONFIG_USB_STORAGE_MTP=y
-CONFIG_SCSI=y
-CONFIG_USB_SMARTCARD=y
-CONFIG_USB_AUDIO=y
-CONFIG_USB_SERIAL=y
-CONFIG_USB_NETWORK=y
-CONFIG_USB_BLUETOOTH=y
diff --git a/hw/usb/Kconfig b/hw/usb/Kconfig
index 86ee615..e20670a 100644
--- a/hw/usb/Kconfig
+++ b/hw/usb/Kconfig
@@ -5,59 +5,85 @@ config USB_UHCI
     bool
     default y if PCI_DEVICES
     depends on PCI
+    select USB
 
 config USB_OHCI
     bool
     default y if PCI_DEVICES
     depends on PCI
+    select USB
 
 config USB_EHCI
     bool
     default y if PCI_DEVICES
     depends on PCI
+    select USB
 
 config USB_EHCI_SYSBUS
     bool
+    select USB
 
 config USB_XHCI
     bool
     default y if PCI_DEVICES
     depends on PCI
+    select USB
 
 config USB_XHCI_NEC
     bool
     default y if PCI_DEVICES
     depends on PCI
+    select USB
 
 config USB_MUSB
     bool
+    select USB
 
 config TUSB6010
     bool
+    select USB_MUSB
 
 config USB_TABLET_WACOM
     bool
+    default y
+    depends on USB
 
 config USB_STORAGE_BOT
     bool
+    default y
+    depends on USB
 
 config USB_STORAGE_UAS
     bool
+    default y
+    depends on USB
 
 config USB_AUDIO
     bool
+    default y
+    depends on USB
 
 config USB_SERIAL
     bool
+    default y
+    depends on USB
 
 config USB_NETWORK
     bool
+    default y
+    depends on USB
 
 config USB_BLUETOOTH
     bool
+    default y
+    depends on USB
 
 config USB_SMARTCARD
     bool
+    default y
+    depends on USB
 
 config USB_STORAGE_MTP
     bool
+    default y
+    depends on USB
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 40/52] scsi: express dependencies with Kconfig
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (38 preceding siblings ...)
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 39/52] build: convert usb.mak " Paolo Bonzini
@ 2019-01-25 10:06 ` Paolo Bonzini
  2019-01-31 21:23   ` Philippe Mathieu-Daudé
  2019-01-25 10:07 ` [Qemu-devel] [PATCH 41/52] isa: express dependencies with kconfig Paolo Bonzini
                   ` (21 subsequent siblings)
  61 siblings, 1 reply; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

This automatically removes the SCSI subsystem from the
binary altogether if no controllers are selected.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <20190123065618.3520-34-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/scsi/Kconfig       | 11 ++++++++++-
 hw/scsi/Makefile.objs |  2 +-
 hw/usb/Kconfig        |  2 ++
 3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/hw/scsi/Kconfig b/hw/scsi/Kconfig
index c02d880..b9cf269 100644
--- a/hw/scsi/Kconfig
+++ b/hw/scsi/Kconfig
@@ -5,24 +5,29 @@ config LSI_SCSI_PCI
     bool
     default y if PCI_DEVICES
     depends on PCI
+    select SCSI
 
 config MPTSAS_SCSI_PCI
     bool
     default y if PCI_DEVICES
     depends on PCI
+    select SCSI
 
 config MEGASAS_SCSI_PCI
     bool
     default y if PCI_DEVICES
     depends on PCI
+    select SCSI
 
 config VMW_PVSCSI_SCSI_PCI
     bool
     default y if PCI_DEVICES
     depends on PCI
+    select SCSI
 
 config ESP
     bool
+    select SCSI
 
 config ESP_PCI
     bool
@@ -34,10 +39,14 @@ config SPAPR_VSCSI
     bool
     default y
     depends on PSERIES
+    select SCSI
 
 config VIRTIO_SCSI
     bool
+    select SCSI
 
 config VHOST_USER_SCSI
     bool
-    default y if VHOST_USER && LINUX
+    # Only PCI devices are provided for now
+    default y if VIRTIO_PCI
+    depends on VHOST_USER && LINUX
diff --git a/hw/scsi/Makefile.objs b/hw/scsi/Makefile.objs
index 45167ba..54b36ed 100644
--- a/hw/scsi/Makefile.objs
+++ b/hw/scsi/Makefile.objs
@@ -6,7 +6,7 @@ common-obj-$(CONFIG_MEGASAS_SCSI_PCI) += megasas.o
 common-obj-$(CONFIG_VMW_PVSCSI_SCSI_PCI) += vmw_pvscsi.o
 common-obj-$(CONFIG_ESP) += esp.o
 common-obj-$(CONFIG_ESP_PCI) += esp-pci.o
-obj-$(CONFIG_PSERIES) += spapr_vscsi.o
+obj-$(CONFIG_SPAPR_VSCSI) += spapr_vscsi.o
 
 ifeq ($(CONFIG_VIRTIO_SCSI),y)
 obj-y += virtio-scsi.o virtio-scsi-dataplane.o
diff --git a/hw/usb/Kconfig b/hw/usb/Kconfig
index e20670a..a1b7acb 100644
--- a/hw/usb/Kconfig
+++ b/hw/usb/Kconfig
@@ -52,11 +52,13 @@ config USB_STORAGE_BOT
     bool
     default y
     depends on USB
+    select SCSI
 
 config USB_STORAGE_UAS
     bool
     default y
     depends on USB
+    select SCSI
 
 config USB_AUDIO
     bool
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 41/52] isa: express dependencies with kconfig
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (39 preceding siblings ...)
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 40/52] scsi: express dependencies with Kconfig Paolo Bonzini
@ 2019-01-25 10:07 ` Paolo Bonzini
  2019-01-30 10:53   ` Thomas Huth
                     ` (2 more replies)
  2019-01-25 10:07 ` [Qemu-devel] [PATCH 42/52] i386: express dependencies with Kconfig Paolo Bonzini
                   ` (20 subsequent siblings)
  61 siblings, 3 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <20190123065618.3520-36-yang.zhong@intel.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/i386-softmmu.mak | 9 ---------
 hw/audio/Kconfig                 | 2 ++
 hw/block/Kconfig                 | 2 ++
 hw/char/Kconfig                  | 6 ++++++
 hw/display/Kconfig               | 3 +++
 hw/dma/Kconfig                   | 1 +
 hw/i386/Kconfig                  | 1 +
 hw/ide/Kconfig                   | 1 +
 hw/input/Kconfig                 | 2 ++
 hw/isa/Kconfig                   | 7 +++++++
 hw/misc/Kconfig                  | 4 ++++
 hw/net/Kconfig                   | 3 +++
 hw/sparc64/Kconfig               | 1 +
 hw/watchdog/Kconfig              | 2 ++
 14 files changed, 35 insertions(+), 9 deletions(-)

diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmmu.mak
index 4073c62..8e6a810 100644
--- a/default-configs/i386-softmmu.mak
+++ b/default-configs/i386-softmmu.mak
@@ -8,19 +8,12 @@ CONFIG_VGA_ISA=y
 CONFIG_VMWARE_VGA=y
 CONFIG_VMXNET3_PCI=y
 CONFIG_VIRTIO_VGA=y
-CONFIG_VMMOUSE=y
 CONFIG_IPMI=y
 CONFIG_IPMI_LOCAL=y
 CONFIG_IPMI_EXTERN=y
 CONFIG_ISA_IPMI_KCS=y
 CONFIG_ISA_IPMI_BT=y
-CONFIG_SERIAL=y
-CONFIG_SERIAL_ISA=y
-CONFIG_PARALLEL=y
 CONFIG_I8254=y
-CONFIG_PCSPK=y
-CONFIG_PCKBD=y
-CONFIG_FDC=y
 CONFIG_ACPI=y
 CONFIG_ACPI_X86=y
 CONFIG_ACPI_X86_ICH=y
@@ -30,14 +23,12 @@ CONFIG_APM=y
 CONFIG_I8257=y
 CONFIG_IDE_ISA=y
 CONFIG_IDE_PIIX=y
-CONFIG_NE2000_ISA=y
 CONFIG_HPET=y
 CONFIG_APPLESMC=y
 CONFIG_I8259=y
 CONFIG_PFLASH_CFI01=y
 CONFIG_MC146818RTC=y
 CONFIG_PCI_PIIX=y
-CONFIG_WDT_IB700=y
 CONFIG_ISA_DEBUG=y
 CONFIG_ISA_TESTDEV=y
 CONFIG_VMPORT=y
diff --git a/hw/audio/Kconfig b/hw/audio/Kconfig
index dedb513..01aea55 100644
--- a/hw/audio/Kconfig
+++ b/hw/audio/Kconfig
@@ -35,6 +35,8 @@ config HDA
 
 config PCSPK
     bool
+    default y
+    depends on I8254
 
 config WM8750
     bool
diff --git a/hw/block/Kconfig b/hw/block/Kconfig
index f7b9d3a..dc91e67 100644
--- a/hw/block/Kconfig
+++ b/hw/block/Kconfig
@@ -1,5 +1,7 @@
 config FDC
     bool
+    default y
+    depends on ISA_BUS
 
 config SSI_M25P80
     bool
diff --git a/hw/char/Kconfig b/hw/char/Kconfig
index 6eba69a..fc18481 100644
--- a/hw/char/Kconfig
+++ b/hw/char/Kconfig
@@ -3,6 +3,8 @@ config ESCC
 
 config PARALLEL
     bool
+    default y
+    depends on ISA_BUS
 
 config PL011
     bool
@@ -12,11 +14,15 @@ config SERIAL
 
 config SERIAL_ISA
     bool
+    default y
+    depends on ISA_BUS
+    select SERIAL
 
 config SERIAL_PCI
     bool
     default y if PCI_DEVICES
     depends on PCI
+    select SERIAL
 
 config VIRTIO_SERIAL
     bool
diff --git a/hw/display/Kconfig b/hw/display/Kconfig
index f8d63c6..64a5764 100644
--- a/hw/display/Kconfig
+++ b/hw/display/Kconfig
@@ -39,9 +39,12 @@ config VGA_PCI
 
 config VGA_ISA
     bool
+    depends on ISA_BUS
+    select VGA
 
 config VGA_ISA_MM
     bool
+    select VGA
 
 config VMWARE_VGA
     bool
diff --git a/hw/dma/Kconfig b/hw/dma/Kconfig
index b9ce1c5..751dec5 100644
--- a/hw/dma/Kconfig
+++ b/hw/dma/Kconfig
@@ -9,6 +9,7 @@ config PL330
 
 config I82374
     bool
+    select I8257
 
 config I8257
     bool
diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
index 9a0e559..ff41be3 100644
--- a/hw/i386/Kconfig
+++ b/hw/i386/Kconfig
@@ -10,6 +10,7 @@ config I440FX
 
 config ISAPC
     bool
+    select ISA_BUS
 
 config Q35
     bool
diff --git a/hw/ide/Kconfig b/hw/ide/Kconfig
index 246e27b..ab47b6a 100644
--- a/hw/ide/Kconfig
+++ b/hw/ide/Kconfig
@@ -12,6 +12,7 @@ config IDE_PCI
 
 config IDE_ISA
     bool
+    depends on ISA_BUS
     select IDE_QDEV
 
 config IDE_PIIX
diff --git a/hw/input/Kconfig b/hw/input/Kconfig
index 98a18a1..bdb4237 100644
--- a/hw/input/Kconfig
+++ b/hw/input/Kconfig
@@ -6,6 +6,8 @@ config LM832X
 
 config PCKBD
     bool
+    default y
+    depends on ISA_BUS
 
 config PL050
     bool
diff --git a/hw/isa/Kconfig b/hw/isa/Kconfig
index b59d074..af68af9 100644
--- a/hw/isa/Kconfig
+++ b/hw/isa/Kconfig
@@ -6,18 +6,25 @@ config APM
 
 config I82378
     bool
+    select ISA_BUS
 
 config PC87312
     bool
+    select ISA_BUS
 
 config PIIX4
     bool
+    select ISA_BUS
 
 config VT82C686
     bool
+    select ISA_BUS
 
 config SMC37C669
     bool
+    select ISA_BUS
 
 config LPC_ICH9
     bool
+    select ISA_BUS
+    select ACPI_X86_ICH
diff --git a/hw/misc/Kconfig b/hw/misc/Kconfig
index c85c085..ca051fb 100644
--- a/hw/misc/Kconfig
+++ b/hw/misc/Kconfig
@@ -1,5 +1,6 @@
 config APPLESMC
     bool
+    depends on ISA_BUS
 
 config MAX111X
     bool
@@ -12,9 +13,11 @@ config TMP421
 
 config ISA_DEBUG
     bool
+    depends on ISA_BUS
 
 config SGA
     bool
+    depends on ISA_BUS
 
 config ISA_TESTDEV
     bool
@@ -93,6 +96,7 @@ config IOTKIT_SYSINFO
 
 config PVPANIC
     bool
+    depends on ISA_BUS
 
 config AUX
     bool
diff --git a/hw/net/Kconfig b/hw/net/Kconfig
index d50e301..6d15720 100644
--- a/hw/net/Kconfig
+++ b/hw/net/Kconfig
@@ -48,6 +48,9 @@ config LAN9118
 
 config NE2000_ISA
     bool
+    default y
+    depends on ISA_BUS
+    depends on PCI # for NE2000State
 
 config OPENCORES_ETH
     bool
diff --git a/hw/sparc64/Kconfig b/hw/sparc64/Kconfig
index 8c13345..41f7295 100644
--- a/hw/sparc64/Kconfig
+++ b/hw/sparc64/Kconfig
@@ -1,5 +1,6 @@
 config SUN4U
     bool
+    select ISA_BUS
 
 config NIAGARA
     bool
diff --git a/hw/watchdog/Kconfig b/hw/watchdog/Kconfig
index edb3d42..35ccb72 100644
--- a/hw/watchdog/Kconfig
+++ b/hw/watchdog/Kconfig
@@ -8,6 +8,8 @@ config WDT_IB6300ESB
 
 config WDT_IB700
     bool
+    default y
+    depends on ISA_BUS
 
 config WDT_DIAG288
     bool
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 42/52] i386: express dependencies with Kconfig
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (40 preceding siblings ...)
  2019-01-25 10:07 ` [Qemu-devel] [PATCH 41/52] isa: express dependencies with kconfig Paolo Bonzini
@ 2019-01-25 10:07 ` Paolo Bonzini
  2019-01-28 14:21   ` Thomas Huth
  2019-02-01 15:05   ` Philippe Mathieu-Daudé
  2019-01-25 10:07 ` [Qemu-devel] [PATCH 43/52] i2c: " Paolo Bonzini
                   ` (19 subsequent siblings)
  61 siblings, 2 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

This way, the default-configs file only need to specify the boards
and any optional devices.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <20190123065618.3520-37-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/i386-softmmu.mak | 44 ++++++--------------------------
 hw/acpi/Kconfig                  |  3 +++
 hw/i2c/Makefile.objs             |  2 +-
 hw/i386/Kconfig                  | 54 ++++++++++++++++++++++++++++++++++++++++
 hw/isa/Kconfig                   |  1 +
 hw/pci-host/Kconfig              |  4 +++
 hw/tpm/Kconfig                   |  2 ++
 7 files changed, 73 insertions(+), 37 deletions(-)

diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmmu.mak
index 8e6a810..9eb9a5e 100644
--- a/default-configs/i386-softmmu.mak
+++ b/default-configs/i386-softmmu.mak
@@ -1,11 +1,6 @@
 # Default configuration for i386-softmmu
 
-CONFIG_PCI=y
-CONFIG_PCI_DEVICES=y
-CONFIG_ISA_BUS=y
 include hyperv.mak
-CONFIG_VGA_ISA=y
-CONFIG_VMWARE_VGA=y
 CONFIG_VMXNET3_PCI=y
 CONFIG_VIRTIO_VGA=y
 CONFIG_IPMI=y
@@ -13,49 +8,26 @@ CONFIG_IPMI_LOCAL=y
 CONFIG_IPMI_EXTERN=y
 CONFIG_ISA_IPMI_KCS=y
 CONFIG_ISA_IPMI_BT=y
-CONFIG_I8254=y
-CONFIG_ACPI=y
-CONFIG_ACPI_X86=y
-CONFIG_ACPI_X86_ICH=y
-CONFIG_ACPI_MEMORY_HOTPLUG=y
-CONFIG_ACPI_CPU_HOTPLUG=y
-CONFIG_APM=y
-CONFIG_I8257=y
-CONFIG_IDE_ISA=y
-CONFIG_IDE_PIIX=y
+
+# Optional devices:
+#
 CONFIG_HPET=y
 CONFIG_APPLESMC=y
-CONFIG_I8259=y
 CONFIG_PFLASH_CFI01=y
-CONFIG_MC146818RTC=y
-CONFIG_PCI_PIIX=y
-CONFIG_ISA_DEBUG=y
 CONFIG_ISA_TESTDEV=y
-CONFIG_VMPORT=y
 CONFIG_SGA=y
-CONFIG_LPC_ICH9=y
-CONFIG_PCI_EXPRESS=y
-CONFIG_PCI_EXPRESS_Q35=y
-CONFIG_APIC=y
-CONFIG_IOAPIC=y
 CONFIG_PVPANIC=y
 CONFIG_MEM_DEVICE=y
-CONFIG_DIMM=y
 CONFIG_NVDIMM=y
 CONFIG_ACPI_NVDIMM=y
-CONFIG_XIO3130=y
-CONFIG_IOH3420=y
-CONFIG_I82801B11=y
-CONFIG_SMBIOS=y
 CONFIG_PXB=y
 CONFIG_ACPI_VMGENID=y
-CONFIG_ACPI_SMBUS=y
 CONFIG_SMBUS_EEPROM=y
-CONFIG_FW_CFG_DMA=y
 CONFIG_I2C=y
-CONFIG_VTD=y
-CONFIG_AMD_IOMMU=y
-CONFIG_PAM=y
-CONFIG_PC=y
+CONFIG_PCI_DEVICES=y
+
+# Boards:
+#
+CONFIG_ISAPC=y
 CONFIG_I440FX=y
 CONFIG_Q35=y
diff --git a/hw/acpi/Kconfig b/hw/acpi/Kconfig
index c485a34..035a28f 100644
--- a/hw/acpi/Kconfig
+++ b/hw/acpi/Kconfig
@@ -3,15 +3,18 @@ config ACPI
 
 config ACPI_X86
     bool
+    select ACPI
 
 config ACPI_X86_ICH
     bool
+    select ACPI_X86
 
 config ACPI_CPU_HOTPLUG
     bool
 
 config ACPI_MEMORY_HOTPLUG
     bool
+    select MEM_DEVICE
 
 config ACPI_NVDIMM
     bool
diff --git a/hw/i2c/Makefile.objs b/hw/i2c/Makefile.objs
index 61ac50a..ff22aa6 100644
--- a/hw/i2c/Makefile.objs
+++ b/hw/i2c/Makefile.objs
@@ -2,7 +2,7 @@ common-obj-$(CONFIG_I2C) += core.o smbus.o
 common-obj-$(CONFIG_SMBUS_EEPROM) += smbus_eeprom.o
 common-obj-$(CONFIG_DDC) += i2c-ddc.o
 common-obj-$(CONFIG_VERSATILE_I2C) += versatile_i2c.o
-common-obj-$(CONFIG_ACPI_X86) += smbus_ich9.o
+common-obj-$(CONFIG_ACPI_X86_ICH) += smbus_ich9.o
 common-obj-$(CONFIG_ACPI_SMBUS) += pm_smbus.o
 common-obj-$(CONFIG_BITBANG_I2C) += bitbang_i2c.o
 common-obj-$(CONFIG_EXYNOS4) += exynos4210_i2c.o
diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
index ff41be3..8814b7c 100644
--- a/hw/i386/Kconfig
+++ b/hw/i386/Kconfig
@@ -5,20 +5,73 @@ config SEV
 config PC
     bool
 
+config PC
+    bool
+    select ISA_DEBUG
+    select I8259
+    select I8254
+    select PCSPK
+    select I82374
+    select I8257
+    select MC146818RTC
+
+config PC_PCI
+    bool
+    select APIC
+    select IOAPIC
+    select APM
+    select PC
+
+config PC_ACPI
+    bool
+    select ACPI_X86
+    select ACPI_CPU_HOTPLUG
+    select ACPI_MEMORY_HOTPLUG
+    depends on ACPI_SMBUS
+
 config I440FX
     bool
+    select PC_PCI
+    select PC_ACPI
+    select ACPI_SMBUS
+    select PCI_PIIX
+    select FDC
+    select IDE_PIIX
+    select DIMM
+    select SMBIOS
+    select VMPORT
+    select VMMOUSE
+    select FW_CFG_DMA
 
 config ISAPC
     bool
     select ISA_BUS
+    select PC
+    select IDE_ISA
+    select VGA_ISA
+    # FIXME: it is in the same file as i440fx, and does not compile
+    # if separated
+    depends on I440FX
 
 config Q35
     bool
+    select PC_PCI
+    select PC_ACPI
+    select PCI_EXPRESS_Q35
+    select LPC_ICH9
+    select AHCI
+    select DIMM
+    select SMBIOS
+    select VMPORT
+    select VMMOUSE
+    select FW_CFG_DMA
 
 config VTD
+    default y if Q35
     bool
 
 config AMD_IOMMU
+    default y if Q35
     bool
 
 config VMPORT
@@ -26,3 +79,4 @@ config VMPORT
 
 config VMMOUSE
     bool
+    depends on VMPORT
diff --git a/hw/isa/Kconfig b/hw/isa/Kconfig
index af68af9..6f0812d 100644
--- a/hw/isa/Kconfig
+++ b/hw/isa/Kconfig
@@ -27,4 +27,5 @@ config SMC37C669
 config LPC_ICH9
     bool
     select ISA_BUS
+    select ACPI_SMBUS
     select ACPI_X86_ICH
diff --git a/hw/pci-host/Kconfig b/hw/pci-host/Kconfig
index c01812a..ff4080c 100644
--- a/hw/pci-host/Kconfig
+++ b/hw/pci-host/Kconfig
@@ -27,10 +27,14 @@ config PCI_SABRE
 
 config PCI_PIIX
     bool
+    select PCI
+    select PAM
+    select ISA_BUS
 
 config PCI_EXPRESS_Q35
     bool
     select PCI_EXPRESS
+    select PAM
 
 config PCI_EXPRESS_GENERIC_BRIDGE
     bool
diff --git a/hw/tpm/Kconfig b/hw/tpm/Kconfig
index db57388..8a63597 100644
--- a/hw/tpm/Kconfig
+++ b/hw/tpm/Kconfig
@@ -8,6 +8,8 @@ config TPM_TIS
 
 config TPM_CRB
     bool
+    default y
+    depends on TPM && PC
 
 config TPM_PASSTHROUGH
     bool
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 43/52] i2c: express dependencies with Kconfig
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (41 preceding siblings ...)
  2019-01-25 10:07 ` [Qemu-devel] [PATCH 42/52] i386: express dependencies with Kconfig Paolo Bonzini
@ 2019-01-25 10:07 ` Paolo Bonzini
  2019-01-31 22:10   ` Philippe Mathieu-Daudé
  2019-01-25 10:07 ` [Qemu-devel] [PATCH 44/52] ptimer: " Paolo Bonzini
                   ` (18 subsequent siblings)
  61 siblings, 1 reply; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Acked-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20190123065618.3520-38-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/i386-softmmu.mak | 2 --
 hw/Makefile.objs                 | 2 +-
 hw/audio/Kconfig                 | 1 +
 hw/display/Kconfig               | 3 +++
 hw/gpio/Kconfig                  | 1 +
 hw/i2c/Kconfig                   | 6 ++++++
 hw/i386/Kconfig                  | 1 +
 hw/input/Kconfig                 | 1 +
 hw/isa/Kconfig                   | 1 +
 hw/misc/Kconfig                  | 4 ++++
 hw/timer/Kconfig                 | 3 +++
 11 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmmu.mak
index 9eb9a5e..4aa04e4 100644
--- a/default-configs/i386-softmmu.mak
+++ b/default-configs/i386-softmmu.mak
@@ -22,8 +22,6 @@ CONFIG_NVDIMM=y
 CONFIG_ACPI_NVDIMM=y
 CONFIG_PXB=y
 CONFIG_ACPI_VMGENID=y
-CONFIG_SMBUS_EEPROM=y
-CONFIG_I2C=y
 CONFIG_PCI_DEVICES=y
 
 # Boards:
diff --git a/hw/Makefile.objs b/hw/Makefile.objs
index e2fcd6a..225f6cc 100644
--- a/hw/Makefile.objs
+++ b/hw/Makefile.objs
@@ -10,7 +10,7 @@ devices-dirs-$(CONFIG_SOFTMMU) += display/
 devices-dirs-$(CONFIG_SOFTMMU) += dma/
 devices-dirs-$(CONFIG_SOFTMMU) += gpio/
 devices-dirs-$(CONFIG_HYPERV) += hyperv/
-devices-dirs-$(CONFIG_SOFTMMU) += i2c/
+devices-dirs-$(CONFIG_I2C) += i2c/
 devices-dirs-$(CONFIG_SOFTMMU) += ide/
 devices-dirs-$(CONFIG_SOFTMMU) += input/
 devices-dirs-$(CONFIG_SOFTMMU) += intc/
diff --git a/hw/audio/Kconfig b/hw/audio/Kconfig
index 01aea55..e9c6fed 100644
--- a/hw/audio/Kconfig
+++ b/hw/audio/Kconfig
@@ -40,6 +40,7 @@ config PCSPK
 
 config WM8750
     bool
+    depends on I2C
 
 config PL041
     bool
diff --git a/hw/display/Kconfig b/hw/display/Kconfig
index 64a5764..66044ca 100644
--- a/hw/display/Kconfig
+++ b/hw/display/Kconfig
@@ -24,9 +24,11 @@ config PL110
 
 config SII9022
     bool
+    depends on I2C
 
 config SSD0303
     bool
+    depends on I2C
 
 config SSD0323
     bool
@@ -71,6 +73,7 @@ config MILKYMIST_TMU2
 
 config SM501
     bool
+    depends on I2C
 
 config TCX
     bool
diff --git a/hw/gpio/Kconfig b/hw/gpio/Kconfig
index d0a4abf..9227cb5 100644
--- a/hw/gpio/Kconfig
+++ b/hw/gpio/Kconfig
@@ -1,5 +1,6 @@
 config MAX7310
     bool
+    depends on I2C
 
 config PL061
     bool
diff --git a/hw/i2c/Kconfig b/hw/i2c/Kconfig
index d6d4402..74c9328 100644
--- a/hw/i2c/Kconfig
+++ b/hw/i2c/Kconfig
@@ -3,18 +3,24 @@ config I2C
 
 config SMBUS_EEPROM
     bool
+    depends on I2C
 
 config DDC
     bool
+    depends on I2C
 
 config VERSATILE_I2C
     bool
+    select I2C
 
 config ACPI_SMBUS
     bool
+    select I2C
 
 config BITBANG_I2C
     bool
+    select I2C
 
 config IMX_I2C
     bool
+    select I2C
diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
index 8814b7c..966c97c 100644
--- a/hw/i386/Kconfig
+++ b/hw/i386/Kconfig
@@ -27,6 +27,7 @@ config PC_ACPI
     select ACPI_X86
     select ACPI_CPU_HOTPLUG
     select ACPI_MEMORY_HOTPLUG
+    select SMBUS_EEPROM
     depends on ACPI_SMBUS
 
 config I440FX
diff --git a/hw/input/Kconfig b/hw/input/Kconfig
index bdb4237..ec014a9 100644
--- a/hw/input/Kconfig
+++ b/hw/input/Kconfig
@@ -3,6 +3,7 @@ config ADB
 
 config LM832X
     bool
+    depends on I2C
 
 config PCKBD
     bool
diff --git a/hw/isa/Kconfig b/hw/isa/Kconfig
index 6f0812d..fcd87b4 100644
--- a/hw/isa/Kconfig
+++ b/hw/isa/Kconfig
@@ -19,6 +19,7 @@ config PIIX4
 config VT82C686
     bool
     select ISA_BUS
+    select ACPI_SMBUS
 
 config SMC37C669
     bool
diff --git a/hw/misc/Kconfig b/hw/misc/Kconfig
index ca051fb..0680d1e 100644
--- a/hw/misc/Kconfig
+++ b/hw/misc/Kconfig
@@ -7,9 +7,11 @@ config MAX111X
 
 config TMP105
     bool
+    depends on I2C
 
 config TMP421
     bool
+    depends on I2C
 
 config ISA_DEBUG
     bool
@@ -34,6 +36,7 @@ config EDU
 
 config PCA9552
     bool
+    depends on I2C
 
 config PL310
     bool
@@ -100,3 +103,4 @@ config PVPANIC
 
 config AUX
     bool
+    select I2C
diff --git a/hw/timer/Kconfig b/hw/timer/Kconfig
index 7dbc121..e1a6e74 100644
--- a/hw/timer/Kconfig
+++ b/hw/timer/Kconfig
@@ -9,6 +9,7 @@ config A9_GTIMER
 
 config DS1338
     bool
+    depends on I2C
 
 config HPET
     bool
@@ -18,6 +19,7 @@ config I8254
 
 config M41T80
     bool
+    depends on I2C
 
 config M48T59
     bool
@@ -27,6 +29,7 @@ config PL031
 
 config TWL92230
     bool
+    depends on I2C
 
 config XLNX_ZYNQMP
     bool
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 44/52] ptimer: express dependencies with Kconfig
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (42 preceding siblings ...)
  2019-01-25 10:07 ` [Qemu-devel] [PATCH 43/52] i2c: " Paolo Bonzini
@ 2019-01-25 10:07 ` Paolo Bonzini
  2019-01-25 10:07 ` [Qemu-devel] [PATCH 45/52] display: express dependencies with kconfig Paolo Bonzini
                   ` (17 subsequent siblings)
  61 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20190123065618.3520-39-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/arm-softmmu.mak        | 1 -
 default-configs/cris-softmmu.mak       | 1 -
 default-configs/lm32-softmmu.mak       | 1 -
 default-configs/m68k-softmmu.mak       | 1 -
 default-configs/microblaze-softmmu.mak | 1 -
 default-configs/nios2-softmmu.mak      | 1 -
 default-configs/ppc-softmmu.mak        | 1 -
 default-configs/sh4-softmmu.mak        | 1 -
 default-configs/sh4eb-softmmu.mak      | 1 -
 default-configs/sparc-softmmu.mak      | 1 -
 default-configs/sparc64-softmmu.mak    | 1 -
 default-configs/unicore32-softmmu.mak  | 1 -
 hw/Kconfig                             | 2 ++
 hw/arm/Kconfig                         | 4 ++++
 hw/cris/Kconfig                        | 1 +
 hw/lm32/Kconfig                        | 2 ++
 hw/m68k/Kconfig                        | 2 ++
 hw/mips/Kconfig                        | 1 +
 hw/misc/Kconfig                        | 1 +
 hw/net/Kconfig                         | 2 ++
 hw/sh4/Kconfig                         | 1 +
 hw/sparc/Kconfig                       | 2 ++
 hw/timer/Kconfig                       | 6 ++++++
 hw/unicore32/Kconfig                   | 1 +
 hw/watchdog/Kconfig                    | 1 +
 25 files changed, 26 insertions(+), 12 deletions(-)

diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index 07d0a62..f8a7742 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -6,7 +6,6 @@ CONFIG_VGA=y
 CONFIG_NAND=y
 CONFIG_ECC=y
 CONFIG_SERIAL=y
-CONFIG_PTIMER=y
 CONFIG_SD=y
 CONFIG_MAX7310=y
 CONFIG_WM8750=y
diff --git a/default-configs/cris-softmmu.mak b/default-configs/cris-softmmu.mak
index a637c4b..b3cae59 100644
--- a/default-configs/cris-softmmu.mak
+++ b/default-configs/cris-softmmu.mak
@@ -2,6 +2,5 @@
 
 CONFIG_ETRAXFS=y
 CONFIG_NAND=y
-CONFIG_PTIMER=y
 CONFIG_PFLASH_CFI02=y
 CONFIG_AXIS=y
diff --git a/default-configs/lm32-softmmu.mak b/default-configs/lm32-softmmu.mak
index ef0f4ba..f489838 100644
--- a/default-configs/lm32-softmmu.mak
+++ b/default-configs/lm32-softmmu.mak
@@ -3,7 +3,6 @@
 CONFIG_LM32=y
 CONFIG_MILKYMIST=y
 CONFIG_FRAMEBUFFER=y
-CONFIG_PTIMER=y
 CONFIG_PFLASH_CFI01=y
 CONFIG_PFLASH_CFI02=y
 CONFIG_SD=y
diff --git a/default-configs/m68k-softmmu.mak b/default-configs/m68k-softmmu.mak
index 27f5274..a12eece 100644
--- a/default-configs/m68k-softmmu.mak
+++ b/default-configs/m68k-softmmu.mak
@@ -1,6 +1,5 @@
 # Default configuration for m68k-softmmu
 
 CONFIG_COLDFIRE=y
-CONFIG_PTIMER=y
 CONFIG_AN5206=y
 CONFIG_MCF5208=y
diff --git a/default-configs/microblaze-softmmu.mak b/default-configs/microblaze-softmmu.mak
index 14837cf..a4a6770 100644
--- a/default-configs/microblaze-softmmu.mak
+++ b/default-configs/microblaze-softmmu.mak
@@ -1,6 +1,5 @@
 # Default configuration for microblaze-softmmu
 
-CONFIG_PTIMER=y
 CONFIG_PFLASH_CFI01=y
 CONFIG_SERIAL=y
 CONFIG_XILINX=y
diff --git a/default-configs/nios2-softmmu.mak b/default-configs/nios2-softmmu.mak
index ab42d0f..b3c507e 100644
--- a/default-configs/nios2-softmmu.mak
+++ b/default-configs/nios2-softmmu.mak
@@ -2,6 +2,5 @@
 
 CONFIG_NIOS2=y
 CONFIG_SERIAL=y
-CONFIG_PTIMER=y
 CONFIG_ALTERA_TIMER=y
 CONFIG_NIOS2_10M50=y
diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
index c60a483..f38c14c 100644
--- a/default-configs/ppc-softmmu.mak
+++ b/default-configs/ppc-softmmu.mak
@@ -13,7 +13,6 @@ CONFIG_OPENPIC=y
 CONFIG_PPCE500_PCI=y
 CONFIG_PFLASH_CFI01=y
 CONFIG_PFLASH_CFI02=y
-CONFIG_PTIMER=y
 CONFIG_I8259=y
 CONFIG_XILINX=y
 CONFIG_XILINX_ETHLITE=y
diff --git a/default-configs/sh4-softmmu.mak b/default-configs/sh4-softmmu.mak
index 7446fc8..9e8e487 100644
--- a/default-configs/sh4-softmmu.mak
+++ b/default-configs/sh4-softmmu.mak
@@ -4,7 +4,6 @@ CONFIG_PCI=y
 CONFIG_PCI_DEVICES=y
 CONFIG_SERIAL=y
 CONFIG_SERIAL_ISA=y
-CONFIG_PTIMER=y
 CONFIG_PFLASH_CFI02=y
 CONFIG_SH4=y
 CONFIG_IDE_MMIO=y
diff --git a/default-configs/sh4eb-softmmu.mak b/default-configs/sh4eb-softmmu.mak
index e37a532..2a26946 100644
--- a/default-configs/sh4eb-softmmu.mak
+++ b/default-configs/sh4eb-softmmu.mak
@@ -4,7 +4,6 @@ CONFIG_PCI=y
 CONFIG_PCI_DEVICES=y
 CONFIG_SERIAL=y
 CONFIG_SERIAL_ISA=y
-CONFIG_PTIMER=y
 CONFIG_PFLASH_CFI02=y
 CONFIG_SH4=y
 CONFIG_IDE_MMIO=y
diff --git a/default-configs/sparc-softmmu.mak b/default-configs/sparc-softmmu.mak
index 59a4a3d..223b0be 100644
--- a/default-configs/sparc-softmmu.mak
+++ b/default-configs/sparc-softmmu.mak
@@ -6,7 +6,6 @@ CONFIG_SCSI=y
 CONFIG_ESP=y
 CONFIG_ESCC=y
 CONFIG_M48T59=y
-CONFIG_PTIMER=y
 CONFIG_FDC=y
 CONFIG_EMPTY_SLOT=y
 CONFIG_PCNET_COMMON=y
diff --git a/default-configs/sparc64-softmmu.mak b/default-configs/sparc64-softmmu.mak
index 4a6e997..aef26a2 100644
--- a/default-configs/sparc64-softmmu.mak
+++ b/default-configs/sparc64-softmmu.mak
@@ -3,7 +3,6 @@
 CONFIG_PCI=y
 CONFIG_PCI_DEVICES=y
 CONFIG_M48T59=y
-CONFIG_PTIMER=y
 CONFIG_SERIAL=y
 CONFIG_SERIAL_ISA=y
 CONFIG_PARALLEL=y
diff --git a/default-configs/unicore32-softmmu.mak b/default-configs/unicore32-softmmu.mak
index 5f6c4a8..17a7915 100644
--- a/default-configs/unicore32-softmmu.mak
+++ b/default-configs/unicore32-softmmu.mak
@@ -1,5 +1,4 @@
 # Default configuration for unicore32-softmmu
 CONFIG_ISA_BUS=y
 CONFIG_PUV3=y
-CONFIG_PTIMER=y
 CONFIG_PCKBD=y
diff --git a/hw/Kconfig b/hw/Kconfig
index c4f1547..e3c380f 100644
--- a/hw/Kconfig
+++ b/hw/Kconfig
@@ -63,6 +63,8 @@ source xtensa/Kconfig
 # Symbols used by multiple targets
 config XILINX
     bool
+    select PTIMER # for hw/timer/xilinx_timer.c
 
 config XILINX_AXI
     bool
+    select PTIMER # for hw/dma/xilinx_axidma.c
diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index 1a0a5c9..f136952 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -3,9 +3,11 @@ config VIRT
 
 config DIGIC
     bool
+    select PTIMER
 
 config EXYNOS4
     bool
+    select PTIMER
 
 config HIGHBANK
     bool
@@ -18,6 +20,7 @@ config MAINSTONE
 
 config MUSICPAL
     bool
+    select PTIMER
 
 config NETDUINO2
     bool
@@ -99,6 +102,7 @@ config NRF51_SOC
 
 config MSF2
     bool
+    select PTIMER
 
 config ZAURUS
     bool
diff --git a/hw/cris/Kconfig b/hw/cris/Kconfig
index 86954ab..b7738ab 100644
--- a/hw/cris/Kconfig
+++ b/hw/cris/Kconfig
@@ -3,3 +3,4 @@ config AXIS
 
 config ETRAXFS
    bool
+   select PTIMER
diff --git a/hw/lm32/Kconfig b/hw/lm32/Kconfig
index 84c530e..4f45840 100644
--- a/hw/lm32/Kconfig
+++ b/hw/lm32/Kconfig
@@ -1,5 +1,7 @@
 config LM32
     bool
+    select PTIMER
 
 config MILKYMIST
     bool
+    select PTIMER
diff --git a/hw/m68k/Kconfig b/hw/m68k/Kconfig
index cd66ada..8e91eda 100644
--- a/hw/m68k/Kconfig
+++ b/hw/m68k/Kconfig
@@ -3,6 +3,8 @@ config AN5206
 
 config MCF5206
     bool
+    select PTIMER
 
 config MCF5208
     bool
+    select PTIMER
diff --git a/hw/mips/Kconfig b/hw/mips/Kconfig
index 348c9bf..cdc07e5 100644
--- a/hw/mips/Kconfig
+++ b/hw/mips/Kconfig
@@ -15,6 +15,7 @@ config FULONG
 
 config MIPS_CPS
     bool
+    select PTIMER
 
 config MIPS_BOSTON
     bool
diff --git a/hw/misc/Kconfig b/hw/misc/Kconfig
index 0680d1e..55170f6 100644
--- a/hw/misc/Kconfig
+++ b/hw/misc/Kconfig
@@ -66,6 +66,7 @@ config ECCMEMCTL
 
 config IMX
     bool
+    select PTIMER
 
 config STM32F2XX_SYSCFG
     bool
diff --git a/hw/net/Kconfig b/hw/net/Kconfig
index 6d15720..e575bf5 100644
--- a/hw/net/Kconfig
+++ b/hw/net/Kconfig
@@ -45,6 +45,7 @@ config SMC91C111
 
 config LAN9118
     bool
+    select PTIMER
 
 config NE2000_ISA
     bool
@@ -96,6 +97,7 @@ config VIRTIO_NET
 
 config ETSEC
     bool
+    select PTIMER
 
 config ROCKER
     bool
diff --git a/hw/sh4/Kconfig b/hw/sh4/Kconfig
index 417a72f..1ea2bc3 100644
--- a/hw/sh4/Kconfig
+++ b/hw/sh4/Kconfig
@@ -9,3 +9,4 @@ config SH7750
 
 config SH4
     bool
+    select PTIMER
diff --git a/hw/sparc/Kconfig b/hw/sparc/Kconfig
index 3795754..c9c2142 100644
--- a/hw/sparc/Kconfig
+++ b/hw/sparc/Kconfig
@@ -6,6 +6,8 @@ config LEON3
 
 config GRLIB
     bool
+    select PTIMER
 
 config SLAVIO
     bool
+    select PTIMER
diff --git a/hw/timer/Kconfig b/hw/timer/Kconfig
index e1a6e74..a021c74 100644
--- a/hw/timer/Kconfig
+++ b/hw/timer/Kconfig
@@ -1,8 +1,10 @@
 config ARM_TIMER
     bool
+    select PTIMER
 
 config ARM_MPTIMER
     bool
+    select PTIMER
 
 config A9_GTIMER
     bool
@@ -36,12 +38,14 @@ config XLNX_ZYNQMP
 
 config ALTERA_TIMER
     bool
+    select PTIMER
 
 config MC146818RTC
     bool
 
 config ALLWINNER_A10_PIT
     bool
+    select PTIMER
 
 config STM32F2XX_TIMER
     bool
@@ -51,6 +55,8 @@ config SUN4V_RTC
 
 config CMSDK_APB_TIMER
     bool
+    select PTIMER
 
 config CMSDK_APB_DUALTIMER
     bool
+    select PTIMER
diff --git a/hw/unicore32/Kconfig b/hw/unicore32/Kconfig
index b3cf294..a03a996 100644
--- a/hw/unicore32/Kconfig
+++ b/hw/unicore32/Kconfig
@@ -1,2 +1,3 @@
 config PUV3
     bool
+    select PTIMER
diff --git a/hw/watchdog/Kconfig b/hw/watchdog/Kconfig
index 35ccb72..2118d89 100644
--- a/hw/watchdog/Kconfig
+++ b/hw/watchdog/Kconfig
@@ -1,5 +1,6 @@
 config CMSDK_APB_WATCHDOG
     bool
+    select PTIMER
 
 config WDT_IB6300ESB
     bool
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 45/52] display: express dependencies with kconfig
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (43 preceding siblings ...)
  2019-01-25 10:07 ` [Qemu-devel] [PATCH 44/52] ptimer: " Paolo Bonzini
@ 2019-01-25 10:07 ` Paolo Bonzini
  2019-01-25 10:07 ` [Qemu-devel] [PATCH 46/52] hyperv: " Paolo Bonzini
                   ` (16 subsequent siblings)
  61 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

From: Yang Zhong <yang.zhong@intel.com>

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20190123065618.3520-40-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/display/Kconfig | 4 +++-
 hw/i2c/Kconfig     | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/hw/display/Kconfig b/hw/display/Kconfig
index 66044ca..bbd772b 100644
--- a/hw/display/Kconfig
+++ b/hw/display/Kconfig
@@ -38,6 +38,7 @@ config VGA_PCI
     default y if PCI_DEVICES
     depends on PCI
     select VGA
+    select EDID
 
 config VGA_ISA
     bool
@@ -59,6 +60,7 @@ config BOCHS_DISPLAY
     default y if PCI_DEVICES
     depends on PCI
     select VGA
+    select EDID
 
 config BLIZZARD
     bool
@@ -69,7 +71,7 @@ config FRAMEBUFFER
 config MILKYMIST_TMU2
     bool
     default y
-    depends on OPENGL
+    depends on OPENGL && MILKYMIST
 
 config SM501
     bool
diff --git a/hw/i2c/Kconfig b/hw/i2c/Kconfig
index 74c9328..ef1caa6 100644
--- a/hw/i2c/Kconfig
+++ b/hw/i2c/Kconfig
@@ -8,6 +8,7 @@ config SMBUS_EEPROM
 config DDC
     bool
     depends on I2C
+    select EDID
 
 config VERSATILE_I2C
     bool
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 46/52] hyperv: express dependencies with kconfig
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (44 preceding siblings ...)
  2019-01-25 10:07 ` [Qemu-devel] [PATCH 45/52] display: express dependencies with kconfig Paolo Bonzini
@ 2019-01-25 10:07 ` Paolo Bonzini
  2019-01-25 10:07 ` [Qemu-devel] [PATCH 47/52] vfio: express vfio dependencies with Kconfig Paolo Bonzini
                   ` (15 subsequent siblings)
  61 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

From: Yang Zhong <yang.zhong@intel.com>

remove default-configs/hyperv.mak and make dependencies
with Kconfig.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20190123065618.3520-41-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/hyperv.mak       | 2 --
 default-configs/i386-softmmu.mak | 1 -
 hw/hyperv/Kconfig                | 4 ++++
 3 files changed, 4 insertions(+), 3 deletions(-)
 delete mode 100644 default-configs/hyperv.mak

diff --git a/default-configs/hyperv.mak b/default-configs/hyperv.mak
deleted file mode 100644
index 5d0d9fd..0000000
--- a/default-configs/hyperv.mak
+++ /dev/null
@@ -1,2 +0,0 @@
-CONFIG_HYPERV=$(CONFIG_KVM)
-CONFIG_HYPERV_TESTDEV=y
diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmmu.mak
index 4aa04e4..42435d7 100644
--- a/default-configs/i386-softmmu.mak
+++ b/default-configs/i386-softmmu.mak
@@ -1,6 +1,5 @@
 # Default configuration for i386-softmmu
 
-include hyperv.mak
 CONFIG_VMXNET3_PCI=y
 CONFIG_VIRTIO_VGA=y
 CONFIG_IPMI=y
diff --git a/hw/hyperv/Kconfig b/hw/hyperv/Kconfig
index be724b7..a178bac 100644
--- a/hw/hyperv/Kconfig
+++ b/hw/hyperv/Kconfig
@@ -1,5 +1,9 @@
 config HYPERV
     bool
+    default y if PC
+    depends on KVM
 
 config HYPERV_TESTDEV
     bool
+    default y if PC
+    depends on HYPERV
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 47/52] vfio: express vfio dependencies with Kconfig
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (45 preceding siblings ...)
  2019-01-25 10:07 ` [Qemu-devel] [PATCH 46/52] hyperv: " Paolo Bonzini
@ 2019-01-25 10:07 ` Paolo Bonzini
  2019-01-25 20:00   ` Alex Williamson
  2019-01-25 10:07 ` [Qemu-devel] [PATCH 48/52] virtio: express virtio " Paolo Bonzini
                   ` (14 subsequent siblings)
  61 siblings, 1 reply; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/vfio/Kconfig | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/hw/vfio/Kconfig b/hw/vfio/Kconfig
index f896779..ebda9fd 100644
--- a/hw/vfio/Kconfig
+++ b/hw/vfio/Kconfig
@@ -7,28 +7,30 @@ config VFIO_PCI
     select VFIO
     depends on LINUX
 
-config VFIO_SPAPR
-    bool
-    default y
-    depends on VFIO && LINUX && PSERIES
-
 config VFIO_CCW
     bool
+    default y
     select VFIO
-    depends on LINUX
+    depends on LINUX && S390_CCW_VIRTIO
 
 config VFIO_PLATFORM
     bool
+    default y
     select VFIO
-    depends on LINUX
+    depends on LINUX && PLATFORM_BUS
 
 config VFIO_XGMAC
     bool
+    default y
+    depends on VFIO_PLATFORM
 
 config VFIO_AMD_XGBE
     bool
+    default y
+    depends on VFIO_PLATFORM
 
 config VFIO_AP
     bool
+    default y
     select VFIO
-    depends on LINUX
+    depends on LINUX && S390_CCW_VIRTIO
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 48/52] virtio: express virtio dependencies with Kconfig
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (46 preceding siblings ...)
  2019-01-25 10:07 ` [Qemu-devel] [PATCH 47/52] vfio: express vfio dependencies with Kconfig Paolo Bonzini
@ 2019-01-25 10:07 ` Paolo Bonzini
  2019-01-25 10:07 ` [Qemu-devel] [PATCH 49/52] tpm: express " Paolo Bonzini
                   ` (13 subsequent siblings)
  61 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

From: Yang Zhong <yang.zhong@intel.com>

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20190123065618.3520-42-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/i386-softmmu.mak  |  1 -
 default-configs/s390x-softmmu.mak |  1 -
 default-configs/virtio.mak        | 12 ------------
 hw/9pfs/Kconfig                   |  1 +
 hw/block/Kconfig                  |  6 +++++-
 hw/char/Kconfig                   |  2 ++
 hw/display/Kconfig                |  6 ++++--
 hw/input/Kconfig                  |  4 +++-
 hw/net/Kconfig                    |  2 ++
 hw/scsi/Kconfig                   |  4 +++-
 hw/virtio/Kconfig                 |  7 +++++++
 11 files changed, 27 insertions(+), 19 deletions(-)
 delete mode 100644 default-configs/virtio.mak

diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmmu.mak
index 42435d7..f29f83e 100644
--- a/default-configs/i386-softmmu.mak
+++ b/default-configs/i386-softmmu.mak
@@ -1,7 +1,6 @@
 # Default configuration for i386-softmmu
 
 CONFIG_VMXNET3_PCI=y
-CONFIG_VIRTIO_VGA=y
 CONFIG_IPMI=y
 CONFIG_IPMI_LOCAL=y
 CONFIG_IPMI_EXTERN=y
diff --git a/default-configs/s390x-softmmu.mak b/default-configs/s390x-softmmu.mak
index 2794ffb..2be5059 100644
--- a/default-configs/s390x-softmmu.mak
+++ b/default-configs/s390x-softmmu.mak
@@ -1,6 +1,5 @@
 CONFIG_PCI=y
 CONFIG_VIRTIO_PCI=y
-include virtio.mak
 CONFIG_SCLPCONSOLE=y
 CONFIG_TERMINAL3270=y
 CONFIG_S390_FLIC=y
diff --git a/default-configs/virtio.mak b/default-configs/virtio.mak
deleted file mode 100644
index 51599ed..0000000
--- a/default-configs/virtio.mak
+++ /dev/null
@@ -1,12 +0,0 @@
-CONFIG_VIRTIO=y
-CONFIG_VIRTIO_9P=$(CONFIG_VIRTFS)
-CONFIG_VIRTIO_BALLOON=y
-CONFIG_VIRTIO_BLK=y
-CONFIG_VIRTIO_CRYPTO=y
-CONFIG_VIRTIO_GPU=y
-CONFIG_VIRTIO_INPUT=y
-CONFIG_VIRTIO_NET=y
-CONFIG_VIRTIO_RNG=y
-CONFIG_SCSI=y
-CONFIG_VIRTIO_SCSI=y
-CONFIG_VIRTIO_SERIAL=y
diff --git a/hw/9pfs/Kconfig b/hw/9pfs/Kconfig
index 84d2366..0a4296d 100644
--- a/hw/9pfs/Kconfig
+++ b/hw/9pfs/Kconfig
@@ -3,3 +3,4 @@ config VIRTFS
 config VIRTIO_9P
     bool
     default y if VIRTFS
+    depends on VIRTIO
diff --git a/hw/block/Kconfig b/hw/block/Kconfig
index dc91e67..00f9dad 100644
--- a/hw/block/Kconfig
+++ b/hw/block/Kconfig
@@ -28,7 +28,11 @@ config NVME_PCI
 
 config VIRTIO_BLK
     bool
+    default y
+    depends on VIRTIO
 
 config VHOST_USER_BLK
     bool
-    default y if VHOST_USER && LINUX
+    # Only PCI devices are provided for now
+    default y if VIRTIO_PCI
+    depends on VIRTIO && VHOST_USER && LINUX
diff --git a/hw/char/Kconfig b/hw/char/Kconfig
index fc18481..6360c9f 100644
--- a/hw/char/Kconfig
+++ b/hw/char/Kconfig
@@ -26,6 +26,8 @@ config SERIAL_PCI
 
 config VIRTIO_SERIAL
     bool
+    default y
+    depends on VIRTIO
 
 config STM32F2XX_USART
     bool
diff --git a/hw/display/Kconfig b/hw/display/Kconfig
index bbd772b..c784fe8 100644
--- a/hw/display/Kconfig
+++ b/hw/display/Kconfig
@@ -94,11 +94,13 @@ config QXL
 
 config VIRTIO_GPU
     bool
+    default y
+    depends on VIRTIO
 
 config VIRTIO_VGA
     bool
-    default y if PCI_DEVICES && VIRTIO
-    depends on PCI
+    default y if PCI_DEVICES
+    depends on VIRTIO && PCI
     select VGA
 
 config DPCD
diff --git a/hw/input/Kconfig b/hw/input/Kconfig
index ec014a9..41eb1db 100644
--- a/hw/input/Kconfig
+++ b/hw/input/Kconfig
@@ -21,11 +21,13 @@ config TSC2005
 
 config VIRTIO_INPUT
     bool
+    default y
+    depends on VIRTIO
 
 config VIRTIO_INPUT_HOST
     bool
     default y if LINUX
-    depends on LINUX
+    depends on VIRTIO && LINUX
 
 config TSC210X
     bool
diff --git a/hw/net/Kconfig b/hw/net/Kconfig
index e575bf5..47368d7 100644
--- a/hw/net/Kconfig
+++ b/hw/net/Kconfig
@@ -94,6 +94,8 @@ config XILINX_ETHLITE
 
 config VIRTIO_NET
    bool
+   default y
+   depends on VIRTIO
 
 config ETSEC
     bool
diff --git a/hw/scsi/Kconfig b/hw/scsi/Kconfig
index b9cf269..b3ba540 100644
--- a/hw/scsi/Kconfig
+++ b/hw/scsi/Kconfig
@@ -43,10 +43,12 @@ config SPAPR_VSCSI
 
 config VIRTIO_SCSI
     bool
+    default y
+    depends on VIRTIO
     select SCSI
 
 config VHOST_USER_SCSI
     bool
     # Only PCI devices are provided for now
     default y if VIRTIO_PCI
-    depends on VHOST_USER && LINUX
+    depends on VIRTIO && VHOST_USER && LINUX
diff --git a/hw/virtio/Kconfig b/hw/virtio/Kconfig
index 5dafbe3..74f4573 100644
--- a/hw/virtio/Kconfig
+++ b/hw/virtio/Kconfig
@@ -3,6 +3,8 @@ config VIRTIO
 
 config VIRTIO_RNG
     bool
+    default y
+    depends on VIRTIO
 
 config VIRTIO_PCI
     bool
@@ -12,9 +14,14 @@ config VIRTIO_PCI
 
 config VIRTIO_MMIO
     bool
+    select VIRTIO
 
 config VIRTIO_BALLOON
     bool
+    default y
+    depends on VIRTIO
 
 config VIRTIO_CRYPTO
     bool
+    default y
+    depends on VIRTIO
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 49/52] tpm: express dependencies with Kconfig
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (47 preceding siblings ...)
  2019-01-25 10:07 ` [Qemu-devel] [PATCH 48/52] virtio: express virtio " Paolo Bonzini
@ 2019-01-25 10:07 ` Paolo Bonzini
  2019-01-25 10:07 ` [Qemu-devel] [PATCH 50/52] isa: express SuperIO " Paolo Bonzini
                   ` (12 subsequent siblings)
  61 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

This automatically removes the SCSI subsystem from the
binary altogether if no controllers are selected.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <20190123065618.3520-34-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/tpm/Kconfig | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/hw/tpm/Kconfig b/hw/tpm/Kconfig
index 8a63597..88890a2 100644
--- a/hw/tpm/Kconfig
+++ b/hw/tpm/Kconfig
@@ -1,18 +1,27 @@
 config TPM
     bool
 
+config TPMDEV
+    bool
+
 config TPM_TIS
     bool
     default y if PC
     depends on TPM
+    select TPMDEV
 
 config TPM_CRB
     bool
-    default y
-    depends on TPM && PC
+    default y if PC
+    depends on TPM
+    select TPMDEV
 
 config TPM_PASSTHROUGH
     bool
+    default y
+    depends on TPMDEV
 
 config TPM_EMULATOR
     bool
+    default y
+    depends on TPMDEV
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 50/52] isa: express SuperIO dependencies with Kconfig
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (48 preceding siblings ...)
  2019-01-25 10:07 ` [Qemu-devel] [PATCH 49/52] tpm: express " Paolo Bonzini
@ 2019-01-25 10:07 ` Paolo Bonzini
  2019-01-31 21:26   ` Philippe Mathieu-Daudé
  2019-01-25 10:07 ` [Qemu-devel] [PATCH 51/52] i386-softmmu.mak: remove all CONFIG_* except boards definitions Paolo Bonzini
                   ` (11 subsequent siblings)
  61 siblings, 1 reply; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/alpha-softmmu.mak |  5 -----
 default-configs/ppc-softmmu.mak   |  9 ---------
 default-configs/sh4-softmmu.mak   |  9 ++-------
 default-configs/sh4eb-softmmu.mak |  6 ------
 hw/isa/Kconfig                    | 21 +++++++++++++++++++++
 5 files changed, 23 insertions(+), 27 deletions(-)

diff --git a/default-configs/alpha-softmmu.mak b/default-configs/alpha-softmmu.mak
index f44c5bc..2ad4d40 100644
--- a/default-configs/alpha-softmmu.mak
+++ b/default-configs/alpha-softmmu.mak
@@ -2,13 +2,8 @@
 
 CONFIG_PCI=y
 CONFIG_PCI_DEVICES=y
-CONFIG_SERIAL=y
-CONFIG_SERIAL_ISA=y
 CONFIG_I82374=y
 CONFIG_I8254=y
-CONFIG_I8257=y
-CONFIG_PARALLEL=y
-CONFIG_FDC=y
 CONFIG_PCKBD=y
 CONFIG_VGA_CIRRUS=y
 CONFIG_VMWARE_VGA=y
diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
index f38c14c..87c2d6d 100644
--- a/default-configs/ppc-softmmu.mak
+++ b/default-configs/ppc-softmmu.mak
@@ -8,12 +8,10 @@ CONFIG_ISA_BUS=y
 CONFIG_PPC4XX=y
 CONFIG_M48T59=y
 CONFIG_SERIAL=y
-CONFIG_I8257=y
 CONFIG_OPENPIC=y
 CONFIG_PPCE500_PCI=y
 CONFIG_PFLASH_CFI01=y
 CONFIG_PFLASH_CFI02=y
-CONFIG_I8259=y
 CONFIG_XILINX=y
 CONFIG_XILINX_ETHLITE=y
 CONFIG_E500=y
@@ -59,18 +57,11 @@ CONFIG_MAC_NEWWORLD=y
 # For PReP
 CONFIG_PREP=y
 CONFIG_PREP_PCI=y
-CONFIG_SERIAL_ISA=y
-CONFIG_MC146818RTC=y
 CONFIG_ISA_TESTDEV=y
 CONFIG_RS6000_MC=y
-CONFIG_PARALLEL=y
 CONFIG_I82374=y
 CONFIG_I82378=y
-CONFIG_I8254=y
 CONFIG_PCKBD=y
-CONFIG_FDC=y
 CONFIG_NE2000_ISA=y
 CONFIG_PC87312=y
-CONFIG_PCSPK=y
-CONFIG_IDE_ISA=y
 CONFIG_CS4231A=y
diff --git a/default-configs/sh4-softmmu.mak b/default-configs/sh4-softmmu.mak
index 9e8e487..1b4582a 100644
--- a/default-configs/sh4-softmmu.mak
+++ b/default-configs/sh4-softmmu.mak
@@ -1,9 +1,8 @@
-# Default configuration for sh4-softmmu
+# Default configuration for sh4eb-softmmu
 
 CONFIG_PCI=y
 CONFIG_PCI_DEVICES=y
 CONFIG_SERIAL=y
-CONFIG_SERIAL_ISA=y
 CONFIG_PFLASH_CFI02=y
 CONFIG_SH4=y
 CONFIG_IDE_MMIO=y
@@ -12,11 +11,7 @@ CONFIG_I2C=y
 CONFIG_DDC=y
 CONFIG_ISA_TESTDEV=y
 CONFIG_I82378=y
-CONFIG_I8259=y
-CONFIG_I8254=y
-CONFIG_PCSPK=y
 CONFIG_I82374=y
-CONFIG_I8257=y
-CONFIG_MC146818RTC=y
 CONFIG_R2D=y
 CONFIG_SHIX=y
+CONFIG_TEST_DEVICES=y
diff --git a/default-configs/sh4eb-softmmu.mak b/default-configs/sh4eb-softmmu.mak
index 2a26946..baed9a4 100644
--- a/default-configs/sh4eb-softmmu.mak
+++ b/default-configs/sh4eb-softmmu.mak
@@ -3,7 +3,6 @@
 CONFIG_PCI=y
 CONFIG_PCI_DEVICES=y
 CONFIG_SERIAL=y
-CONFIG_SERIAL_ISA=y
 CONFIG_PFLASH_CFI02=y
 CONFIG_SH4=y
 CONFIG_IDE_MMIO=y
@@ -12,11 +11,6 @@ CONFIG_I2C=y
 CONFIG_DDC=y
 CONFIG_ISA_TESTDEV=y
 CONFIG_I82378=y
-CONFIG_I8259=y
-CONFIG_I8254=y
-CONFIG_PCSPK=y
 CONFIG_I82374=y
-CONFIG_I8257=y
-CONFIG_MC146818RTC=y
 CONFIG_R2D=y
 CONFIG_SHIX=y
diff --git a/hw/isa/Kconfig b/hw/isa/Kconfig
index fcd87b4..34711d0 100644
--- a/hw/isa/Kconfig
+++ b/hw/isa/Kconfig
@@ -7,26 +7,47 @@ config APM
 config I82378
     bool
     select ISA_BUS
+    select I8259
+    select I8254
+    select I8257
+    select MC146818RTC
 
 config PC87312
     bool
     select ISA_BUS
+    select I8259
+    select I8254
+    select I8257
+    select MC146818RTC
+    select SERIAL_ISA
+    select PARALLEL
+    select FDC
+    select IDE_ISA
 
 config PIIX4
     bool
+    # For historical reasons, SuperIO devices are created in the board
+    # for PIIX4.
     select ISA_BUS
 
 config VT82C686
     bool
     select ISA_BUS
     select ACPI_SMBUS
+    select SERIAL_ISA
+    select FDC
 
 config SMC37C669
     bool
     select ISA_BUS
+    select SERIAL_ISA
+    select PARALLEL
+    select FDC
 
 config LPC_ICH9
     bool
+    # For historical reasons, SuperIO devices are created in the board
+    # for ICH9.
     select ISA_BUS
     select ACPI_SMBUS
     select ACPI_X86_ICH
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 51/52] i386-softmmu.mak: remove all CONFIG_* except boards definitions
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (49 preceding siblings ...)
  2019-01-25 10:07 ` [Qemu-devel] [PATCH 50/52] isa: express SuperIO " Paolo Bonzini
@ 2019-01-25 10:07 ` Paolo Bonzini
  2019-01-25 10:07 ` [Qemu-devel] [PATCH 52/52] kconfig: introduce CONFIG_TEST_DEVICES Paolo Bonzini
                   ` (10 subsequent siblings)
  61 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

From: Yang Zhong <yang.zhong@intel.com>

%-softmmu.mak only keep boards definitions in Kconfig mode.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <20190123065618.3520-43-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/i386-softmmu.mak | 18 ------------------
 hw/acpi/Kconfig                  |  6 ++++++
 hw/i386/Kconfig                  |  5 +++++
 hw/ipmi/Kconfig                  |  8 ++++++++
 hw/mem/Kconfig                   |  2 ++
 hw/misc/Kconfig                  |  4 ++++
 hw/pci-bridge/Kconfig            |  1 +
 hw/timer/Kconfig                 |  1 +
 8 files changed, 27 insertions(+), 18 deletions(-)

diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmmu.mak
index f29f83e..07b1e82 100644
--- a/default-configs/i386-softmmu.mak
+++ b/default-configs/i386-softmmu.mak
@@ -1,25 +1,7 @@
 # Default configuration for i386-softmmu
 
-CONFIG_VMXNET3_PCI=y
-CONFIG_IPMI=y
-CONFIG_IPMI_LOCAL=y
-CONFIG_IPMI_EXTERN=y
-CONFIG_ISA_IPMI_KCS=y
-CONFIG_ISA_IPMI_BT=y
-
 # Optional devices:
 #
-CONFIG_HPET=y
-CONFIG_APPLESMC=y
-CONFIG_PFLASH_CFI01=y
-CONFIG_ISA_TESTDEV=y
-CONFIG_SGA=y
-CONFIG_PVPANIC=y
-CONFIG_MEM_DEVICE=y
-CONFIG_NVDIMM=y
-CONFIG_ACPI_NVDIMM=y
-CONFIG_PXB=y
-CONFIG_ACPI_VMGENID=y
 CONFIG_PCI_DEVICES=y
 
 # Boards:
diff --git a/hw/acpi/Kconfig b/hw/acpi/Kconfig
index 035a28f..eca3bee 100644
--- a/hw/acpi/Kconfig
+++ b/hw/acpi/Kconfig
@@ -4,6 +4,9 @@ config ACPI
 config ACPI_X86
     bool
     select ACPI
+    select ACPI_NVDIMM
+    select ACPI_CPU_HOTPLUG
+    select ACPI_MEMORY_HOTPLUG
 
 config ACPI_X86_ICH
     bool
@@ -18,6 +21,9 @@ config ACPI_MEMORY_HOTPLUG
 
 config ACPI_NVDIMM
     bool
+    depends on ACPI
 
 config ACPI_VMGENID
     bool
+    default y
+    depends on PC
diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
index 966c97c..8f0d6ce 100644
--- a/hw/i386/Kconfig
+++ b/hw/i386/Kconfig
@@ -5,6 +5,10 @@ config SEV
 config PC
     bool
 
+config SEV
+    bool
+    default y if PC && KVM
+
 config PC
     bool
     select ISA_DEBUG
@@ -28,6 +32,7 @@ config PC_ACPI
     select ACPI_CPU_HOTPLUG
     select ACPI_MEMORY_HOTPLUG
     select SMBUS_EEPROM
+    select PFLASH_CFI01
     depends on ACPI_SMBUS
 
 config I440FX
diff --git a/hw/ipmi/Kconfig b/hw/ipmi/Kconfig
index 68f8ba1..b15c7b3 100644
--- a/hw/ipmi/Kconfig
+++ b/hw/ipmi/Kconfig
@@ -3,12 +3,20 @@ config IPMI
 
 config IPMI_LOCAL
     bool
+    default y
+    depends on IPMI
 
 config IPMI_EXTERN
     bool
+    default y
+    depends on IPMI
 
 config ISA_IPMI_KCS
     bool
+    default y if PC
+    select IPMI
 
 config ISA_IPMI_BT
     bool
+    default y if PC
+    select IPMI
diff --git a/hw/mem/Kconfig b/hw/mem/Kconfig
index a3a4372..d1e635c 100644
--- a/hw/mem/Kconfig
+++ b/hw/mem/Kconfig
@@ -6,3 +6,5 @@ config MEM_DEVICE
 
 config NVDIMM
     bool
+    default y
+    depends on PC
diff --git a/hw/misc/Kconfig b/hw/misc/Kconfig
index 55170f6..823135c 100644
--- a/hw/misc/Kconfig
+++ b/hw/misc/Kconfig
@@ -1,5 +1,6 @@
 config APPLESMC
     bool
+    default y if PC
     depends on ISA_BUS
 
 config MAX111X
@@ -19,10 +20,12 @@ config ISA_DEBUG
 
 config SGA
     bool
+    default y if PC
     depends on ISA_BUS
 
 config ISA_TESTDEV
     bool
+    default y if PC
 
 config PCI_TESTDEV
     bool
@@ -100,6 +103,7 @@ config IOTKIT_SYSINFO
 
 config PVPANIC
     bool
+    default y if PC
     depends on ISA_BUS
 
 config AUX
diff --git a/hw/pci-bridge/Kconfig b/hw/pci-bridge/Kconfig
index 0519eb1..b167b98 100644
--- a/hw/pci-bridge/Kconfig
+++ b/hw/pci-bridge/Kconfig
@@ -5,6 +5,7 @@ config PCIE_PORT
 
 config PXB
     bool
+    default y if Q35
 
 config XIO3130
     bool
diff --git a/hw/timer/Kconfig b/hw/timer/Kconfig
index a021c74..51921eb 100644
--- a/hw/timer/Kconfig
+++ b/hw/timer/Kconfig
@@ -15,6 +15,7 @@ config DS1338
 
 config HPET
     bool
+    default y if PC
 
 config I8254
     bool
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* [Qemu-devel] [PATCH 52/52] kconfig: introduce CONFIG_TEST_DEVICES
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (50 preceding siblings ...)
  2019-01-25 10:07 ` [Qemu-devel] [PATCH 51/52] i386-softmmu.mak: remove all CONFIG_* except boards definitions Paolo Bonzini
@ 2019-01-25 10:07 ` Paolo Bonzini
  2019-01-25 11:07 ` [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Yang Zhong
                   ` (9 subsequent siblings)
  61 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 10:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: yang.zhong, thuth

This moves some devices that are mostly used for testing purposes
(for example in endianness-test) under a new symbol CONFIG_TEST_DEVICES
that has to be enabled explicitly in the default-configs file.  This makes
it easier to drop this code from QEMU if desirable.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 default-configs/alpha-softmmu.mak       | 2 +-
 default-configs/i386-softmmu.mak        | 1 +
 default-configs/mips-softmmu-common.mak | 2 +-
 default-configs/ppc-softmmu.mak         | 2 +-
 default-configs/sh4-softmmu.mak         | 3 +--
 default-configs/sh4eb-softmmu.mak       | 2 +-
 default-configs/sparc64-softmmu.mak     | 2 +-
 hw/Kconfig                              | 3 +++
 hw/hyperv/Kconfig                       | 2 +-
 hw/misc/Kconfig                         | 7 ++++---
 10 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/default-configs/alpha-softmmu.mak b/default-configs/alpha-softmmu.mak
index 2ad4d40..762e3a2 100644
--- a/default-configs/alpha-softmmu.mak
+++ b/default-configs/alpha-softmmu.mak
@@ -10,6 +10,6 @@ CONFIG_VMWARE_VGA=y
 CONFIG_IDE_CMD646=y
 CONFIG_I8259=y
 CONFIG_MC146818RTC=y
-CONFIG_ISA_TESTDEV=y
+CONFIG_TEST_DEVICES=y
 CONFIG_SMC37C669=y
 CONFIG_DP264=y
diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmmu.mak
index 07b1e82..0f30bd6 100644
--- a/default-configs/i386-softmmu.mak
+++ b/default-configs/i386-softmmu.mak
@@ -3,6 +3,7 @@
 # Optional devices:
 #
 CONFIG_PCI_DEVICES=y
+CONFIG_TEST_DEVICES=y
 
 # Boards:
 #
diff --git a/default-configs/mips-softmmu-common.mak b/default-configs/mips-softmmu-common.mak
index e5f0841..ac70f00 100644
--- a/default-configs/mips-softmmu-common.mak
+++ b/default-configs/mips-softmmu-common.mak
@@ -31,7 +31,6 @@ CONFIG_MIPSNET=y
 CONFIG_PFLASH_CFI01=y
 CONFIG_I8259=y
 CONFIG_MC146818RTC=y
-CONFIG_ISA_TESTDEV=y
 CONFIG_EMPTY_SLOT=y
 CONFIG_MIPS_CPS=y
 CONFIG_MIPS_ITU=y
@@ -41,3 +40,4 @@ CONFIG_MALTA=y
 CONFIG_MIPSSIM=y
 CONFIG_ACPI_SMBUS=y
 CONFIG_SMBUS_EEPROM=y
+CONFIG_TEST_DEVICES=y
diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
index 87c2d6d..05ba726 100644
--- a/default-configs/ppc-softmmu.mak
+++ b/default-configs/ppc-softmmu.mak
@@ -3,6 +3,7 @@
 CONFIG_PCI=y
 CONFIG_PCI_DEVICES=y
 CONFIG_ISA_BUS=y
+CONFIG_TEST_DEVICES=y
 
 # For embedded PPCs:
 CONFIG_PPC4XX=y
@@ -57,7 +58,6 @@ CONFIG_MAC_NEWWORLD=y
 # For PReP
 CONFIG_PREP=y
 CONFIG_PREP_PCI=y
-CONFIG_ISA_TESTDEV=y
 CONFIG_RS6000_MC=y
 CONFIG_I82374=y
 CONFIG_I82378=y
diff --git a/default-configs/sh4-softmmu.mak b/default-configs/sh4-softmmu.mak
index 1b4582a..4ebcaaa 100644
--- a/default-configs/sh4-softmmu.mak
+++ b/default-configs/sh4-softmmu.mak
@@ -9,9 +9,8 @@ CONFIG_IDE_MMIO=y
 CONFIG_SM501=y
 CONFIG_I2C=y
 CONFIG_DDC=y
-CONFIG_ISA_TESTDEV=y
+CONFIG_TEST_DEVICES=y
 CONFIG_I82378=y
 CONFIG_I82374=y
 CONFIG_R2D=y
 CONFIG_SHIX=y
-CONFIG_TEST_DEVICES=y
diff --git a/default-configs/sh4eb-softmmu.mak b/default-configs/sh4eb-softmmu.mak
index baed9a4..4ebcaaa 100644
--- a/default-configs/sh4eb-softmmu.mak
+++ b/default-configs/sh4eb-softmmu.mak
@@ -9,7 +9,7 @@ CONFIG_IDE_MMIO=y
 CONFIG_SM501=y
 CONFIG_I2C=y
 CONFIG_DDC=y
-CONFIG_ISA_TESTDEV=y
+CONFIG_TEST_DEVICES=y
 CONFIG_I82378=y
 CONFIG_I82374=y
 CONFIG_R2D=y
diff --git a/default-configs/sparc64-softmmu.mak b/default-configs/sparc64-softmmu.mak
index aef26a2..7fe1005 100644
--- a/default-configs/sparc64-softmmu.mak
+++ b/default-configs/sparc64-softmmu.mak
@@ -14,7 +14,7 @@ CONFIG_PCI_SABRE=y
 CONFIG_SIMBA=y
 CONFIG_SUNHME=y
 CONFIG_MC146818RTC=y
-CONFIG_ISA_TESTDEV=y
+CONFIG_TEST_DEVICES=y
 CONFIG_SUN4V_RTC=y
 CONFIG_SUN4U=y
 CONFIG_NIAGARA=y
diff --git a/hw/Kconfig b/hw/Kconfig
index e3c380f..d5ecd02 100644
--- a/hw/Kconfig
+++ b/hw/Kconfig
@@ -61,6 +61,9 @@ source unicore32/Kconfig
 source xtensa/Kconfig
 
 # Symbols used by multiple targets
+config TEST_DEVICES
+    bool
+
 config XILINX
     bool
     select PTIMER # for hw/timer/xilinx_timer.c
diff --git a/hw/hyperv/Kconfig b/hw/hyperv/Kconfig
index a178bac..892a472 100644
--- a/hw/hyperv/Kconfig
+++ b/hw/hyperv/Kconfig
@@ -5,5 +5,5 @@ config HYPERV
 
 config HYPERV_TESTDEV
     bool
-    default y if PC
+    default y if TEST_DEVICES
     depends on HYPERV
diff --git a/hw/misc/Kconfig b/hw/misc/Kconfig
index 823135c..3ebe30f 100644
--- a/hw/misc/Kconfig
+++ b/hw/misc/Kconfig
@@ -25,16 +25,17 @@ config SGA
 
 config ISA_TESTDEV
     bool
-    default y if PC
+    default y if TEST_DEVICES
+    depends on ISA_BUS
 
 config PCI_TESTDEV
     bool
-    default y if PCI_DEVICES
+    default y if TEST_DEVICES
     depends on PCI
 
 config EDU
     bool
-    default y if PCI_DEVICES
+    default y if TEST_DEVICES
     depends on PCI
 
 config PCA9552
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (51 preceding siblings ...)
  2019-01-25 10:07 ` [Qemu-devel] [PATCH 52/52] kconfig: introduce CONFIG_TEST_DEVICES Paolo Bonzini
@ 2019-01-25 11:07 ` Yang Zhong
  2019-01-31 17:56 ` no-reply
                   ` (8 subsequent siblings)
  61 siblings, 0 replies; 119+ messages in thread
From: Yang Zhong @ 2019-01-25 11:07 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel, thuth, yang.zhong

On Fri, Jan 25, 2019 at 11:06:19AM +0100, Paolo Bonzini wrote:
> (I'm only momentarily at the helm and will give control back to Yang after
> this iteration.)
> 
> This is still RFC mostly because of the lack of documentation, and because
> only x86 is fully converted, but it's converging.  Other targets still
> enable embedded devices in default-configs/ instead of using "select"
> directives.  For many targets, the conversion will be trivial because
> they only support one board.  The complex ones are ARM, MIPS and PPC
> of course.  s390 as usual is just different in some respects, but all
> of its issues are sorted out already in this series and so it's just
> yet another single-board target.
> 
> It supports defconfig (default-configs file chooses boards only)
> and allnoconfig (default-configs file chooses devices too) and builds
> all targets.  I haven't yet checked that the configuration is the same
> before and after the conversion, but at least device-introspection-test
> and other qtests all pass, which did catch some errors.
> 
> As mentioned in the previous versions, this is only a replacement
> for default-configs, in order to simplify configuration and remove
> the need to track dependencies between configuration symbols.  In
> fact, even with the current incomplete conversion the diffstat
> for default-configs is already
> 
>  31 files changed, 108 insertions(+), 241 deletions(-)
> 
> Devices can be disabled by adding for example
> 
>    CONFIG_HPET=n
> 
> to default-configs/i386-softmmu.mak.  If you prefer they can be
> listed manually and "make allnoconfig" can be executed before
> building.  This probably should become a configure option
> "--without-default-devices" instead.
> 
> For the previous discussions on the Kconfig design, see
> http://lists.nongnu.org/archive/html/qemu-devel/2018-09/msg02827.html
> 
> Patches 1-27 should probably be committed now, so please review!  Yang,
> once they are reviewed you can extract them and post them to the
> mailing list as non-RFC!
  Thanks Paolo, you helped me address comments in v4 and i will do it.

  Yang

> As to the rest, you're welcome to try them, post conversions for the
> simple targets, suggest usability improvements, and whatever.  Thanks to
> everyone for the work on the previous iterations.  It's great to see
> the work on this GSoC project come back to life after five years!
> 
> v4->v5: new patches 1, 2, 3, 13, 26, 27, 47, 49, 50, 52
> 	Removed CONFIG_TYPHOON (patch 20)
> 	Removed CONFIG_DINO (patch 22)
> 	ported minikconf to python 3
> 	improved some minikconf error messages
> 	added missing symbols in patch 32
> 	added CONFIG_VHOST_USER and CONFIG_LINUX, made CONFIG_KVM per target (patch 33)
> 	removed $(...) assignments from default-configs/ (patch 33)
> 	moved allnoconfig patch earlier, removed allyesconfig/randconfig
> 	add CONFIG_PCI_EXPRESS to non-x86 targets (patch 36)
> 	added CONFIG_PCI_DEVICES in patch 37 to support s390x
> 	virtio-mmio does not support vhost-user yet (patches 40 and 48)
> 	fix PCSPK for platforms that lack an i8254 (patch 41)
> 	add "select ISA_BUS" to I82378 and SUN4U (patch 41)
> 	changed QXL/VTD/AMD_IOMMU from "select" to "default y if ..." (patch 42)
> 	moved "select PAM" and "select ISA_BUS" from board to device (patch 42)
> 	brought patch 44 up to date
> 	fixed MILKYMIST_TMU2 to only apply to MILKYMIST (patch 45)
> 	new config symbol VIRTIO_INPUT_HOST
> 	fixed select/depends for virtio (patch 48)
> 	moved some ACPI dependencies from board to devices (patch 51)
> 
> Paolo Bonzini (27):
>   arm: disable CONFIG_SERIAL_ISA
>   ide: split ioport registration to a separate file
>   vfio: move conditional up to hw/Makefile.objs
>   build: actually use CONFIG_PAM
>   hw/i386/Makefile.objs: Build pc_piix* and pc_q35 boards
>   hw/s390/Makefile.objs: Create new CONFIG_* variables for s390x boards and devices
>   hw/i2c/Makefile.objs: Create new CONFIG_* variables for EEPROM and ACPI controller
>   hw/vfio/Makefile.objs: Create new CONFIG_* variables for VFIO core and PCI
>   minikconfig: add parser skeleton
>   minikconfig: add AST
>   minikconfig: add semantic analysis
>   kconfig: introduce kconfig files
>   build: switch to Kconfig
>   minikconf: implement allnoconfig and defconfig
>   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
>   isa: express dependencies with kconfig
>   i386: express dependencies with Kconfig
>   i2c: express dependencies with Kconfig
>   ptimer: express dependencies with Kconfig
>   vfio: express vfio dependencies with Kconfig
>   tpm: express dependencies with Kconfig
>   isa: express SuperIO dependencies with Kconfig
>   kconfig: introduce CONFIG_TEST_DEVICES
> 
> Yang Zhong (17):
>   hw/pci-host/Makefile.objs: make CONFIGS clear for PCI EXPRESS
>   hw/arm/Makefile.objs: CONFIG_VIRT created for virt board
>   hw/nios2/Makefile.objs: Conditionally build nios2
>   hw/riscv/Makefile.objs: Create CONFIG_* for riscv boards
>   hw/sparc64/Makefile.objs: Create CONFIG_* for sparc64
>   hw/alpha/Makefile.objs: Create CONFIG_* for alpha
>   hw/cris/Makefile.objs: Create CONFIG_* for cris
>   hw/hppa/Makefile.objs: Create CONFIG_* for hppa
>   hw/moxie/Makefile.objs: Conditionally build moxie
>   hw/openrisc/Makefile.objs: Create CONFIG_* for openrisc
>   hw/tricore/Makefile.objs: Create CONFIG_* for tricore
>   hw/display: make edid configurable
>   hw/pci/Makefile.objs: make pcie configurable
>   display: express dependencies with kconfig
>   hyperv: express dependencies with kconfig
>   virtio: express virtio dependencies with Kconfig
>   i386-softmmu.mak: remove all CONFIG_* except boards definitions
> 
> Ákos Kovács (8):
>   hw/m68k/Makefile.objs: Conditionally build boards
>   hw/microblaze/Makefile.objs: Create configs for petalogix and xilinx
>     boards
>   hw/mips/Makefile.objs: Create CONFIG_* for r4k, malta, mipssim boards
>   hw/ppc/Makefile.objs: Build all boards conditinally with CONFIG_*
>   hw/sh4/Makefile.objs: New CONFIG_* varibales created for sh4 boards
>     and device
>   hw/sparc/Makefile.objs: CONFIG_* for sun4m and leon3 created
>   hw/lm32/Makefile.objs: Conditionally build lm32 and milkmyst
>   hw/xtensa/Makefile.objs: Build xtensa_sim and xtensa_fpga
>     conditionally
> 
>  Kconfig.host                            |  24 ++
>  Makefile                                |  27 +-
>  Makefile.target                         |   7 +-
>  configure                               |   3 +
>  default-configs/alpha-softmmu.mak       |  14 +-
>  default-configs/arm-softmmu.mak         |  16 +-
>  default-configs/cris-softmmu.mak        |   2 +-
>  default-configs/hppa-softmmu.mak        |   6 +-
>  default-configs/hyperv.mak              |   2 -
>  default-configs/i386-softmmu.mak        |  77 +---
>  default-configs/lm32-softmmu.mak        |   2 -
>  default-configs/m68k-softmmu.mak        |   3 +-
>  default-configs/microblaze-softmmu.mak  |   4 +-
>  default-configs/mips-softmmu-common.mak |  13 +-
>  default-configs/mips64el-softmmu.mak    |   3 +-
>  default-configs/moxie-softmmu.mak       |   1 +
>  default-configs/nios2-softmmu.mak       |   2 +-
>  default-configs/or1k-softmmu.mak        |   1 +
>  default-configs/pci.mak                 |  49 ---
>  default-configs/ppc-softmmu.mak         |  28 +-
>  default-configs/ppc64-softmmu.mak       |   5 -
>  default-configs/riscv32-softmmu.mak     |  15 +-
>  default-configs/riscv64-softmmu.mak     |  15 +-
>  default-configs/s390x-softmmu.mak       |   9 +-
>  default-configs/sh4-softmmu.mak         |  17 +-
>  default-configs/sh4eb-softmmu.mak       |  15 +-
>  default-configs/sound.mak               |   4 -
>  default-configs/sparc-softmmu.mak       |   3 +-
>  default-configs/sparc64-softmmu.mak     |   9 +-
>  default-configs/tricore-softmmu.mak     |   1 +
>  default-configs/unicore32-softmmu.mak   |   1 -
>  default-configs/usb.mak                 |  11 -
>  default-configs/virtio.mak              |  15 -
>  default-configs/xtensa-softmmu.mak      |   3 +
>  default-configs/xtensaeb-softmmu.mak    |   3 +
>  docs/devel/build-system.txt             |   1 -
>  hw/9pfs/Kconfig                         |   6 +
>  hw/Kconfig                              |  73 ++++
>  hw/Makefile.objs                        |   4 +-
>  hw/acpi/Kconfig                         |  29 ++
>  hw/adc/Kconfig                          |   2 +
>  hw/alpha/Kconfig                        |   2 +
>  hw/alpha/Makefile.objs                  |   2 +-
>  hw/arm/Kconfig                          | 117 ++++++
>  hw/arm/Makefile.objs                    |   3 +-
>  hw/audio/Kconfig                        |  52 +++
>  hw/block/Kconfig                        |  38 ++
>  hw/bt/Kconfig                           |   2 +
>  hw/char/Kconfig                         |  42 ++
>  hw/core/Kconfig                         |  11 +
>  hw/cpu/Kconfig                          |   8 +
>  hw/cris/Kconfig                         |   6 +
>  hw/cris/Makefile.objs                   |   2 +-
>  hw/display/Kconfig                      | 107 +++++
>  hw/display/Makefile.objs                |   4 +-
>  hw/dma/Kconfig                          |  21 +
>  hw/gpio/Kconfig                         |   9 +
>  hw/hppa/Kconfig                         |   5 +
>  hw/hppa/Makefile.objs                   |   2 +-
>  hw/hyperv/Kconfig                       |   9 +
>  hw/i2c/Kconfig                          |  27 ++
>  hw/i2c/Makefile.objs                    |   7 +-
>  hw/i386/Kconfig                         |  88 ++++
>  hw/i386/Makefile.objs                   |   4 +-
>  hw/ide/Kconfig                          |  54 +++
>  hw/ide/Makefile.objs                    |   6 +-
>  hw/ide/core.c                           |  25 --
>  hw/ide/ioport.c                         |  67 ++++
>  hw/input/Kconfig                        |  33 ++
>  hw/intc/Kconfig                         |  59 +++
>  hw/ipack/Kconfig                        |   4 +
>  hw/ipmi/Kconfig                         |  22 +
>  hw/isa/Kconfig                          |  53 +++
>  hw/lm32/Kconfig                         |   7 +
>  hw/lm32/Makefile.objs                   |   4 +-
>  hw/m68k/Kconfig                         |  10 +
>  hw/m68k/Makefile.objs                   |   4 +-
>  hw/mem/Kconfig                          |  10 +
>  hw/microblaze/Kconfig                   |   8 +
>  hw/microblaze/Makefile.objs             |   6 +-
>  hw/mips/Kconfig                         |  21 +
>  hw/mips/Makefile.objs                   |   5 +-
>  hw/misc/Kconfig                         | 112 ++++++
>  hw/misc/macio/Kconfig                   |  11 +
>  hw/moxie/Kconfig                        |   2 +
>  hw/moxie/Makefile.objs                  |   2 +-
>  hw/net/Kconfig                          | 122 ++++++
>  hw/net/Makefile.objs                    |   4 +-
>  hw/nios2/Kconfig                        |   5 +
>  hw/nios2/Makefile.objs                  |   3 +-
>  hw/nvram/Kconfig                        |   8 +
>  hw/openrisc/Kconfig                     |   2 +
>  hw/openrisc/Makefile.objs               |   2 +-
>  hw/pci-bridge/Kconfig                   |  29 ++
>  hw/pci-host/Kconfig                     |  49 +++
>  hw/pci-host/Makefile.objs               |  10 +-
>  hw/pci/Kconfig                          |   9 +
>  hw/pci/Makefile.objs                    |   9 +-
>  hw/pcmcia/Kconfig                       |   2 +
>  hw/ppc/Kconfig                          |  60 +++
>  hw/ppc/Makefile.objs                    |  11 +-
>  hw/riscv/Kconfig                        |  19 +
>  hw/riscv/Makefile.objs                  |  22 +-
>  hw/s390x/Kconfig                        |   2 +
>  hw/s390x/Makefile.objs                  |   2 +
>  hw/scsi/Kconfig                         |  54 +++
>  hw/scsi/Makefile.objs                   |   2 +-
>  hw/sd/Kconfig                           |  14 +
>  hw/sh4/Kconfig                          |  12 +
>  hw/sh4/Makefile.objs                    |   4 +-
>  hw/smbios/Kconfig                       |   2 +
>  hw/sparc/Kconfig                        |  13 +
>  hw/sparc/Makefile.objs                  |   4 +-
>  hw/sparc64/Kconfig                      |   6 +
>  hw/sparc64/Makefile.objs                |   6 +-
>  hw/ssi/Kconfig                          |  14 +
>  hw/timer/Kconfig                        |  63 +++
>  hw/tpm/Kconfig                          |  27 ++
>  hw/tricore/Kconfig                      |   2 +
>  hw/tricore/Makefile.objs                |   2 +-
>  hw/unicore32/Kconfig                    |   3 +
>  hw/usb/Kconfig                          |  91 +++++
>  hw/vfio/Kconfig                         |  36 ++
>  hw/vfio/Makefile.objs                   |   9 +-
>  hw/virtio/Kconfig                       |  27 ++
>  hw/watchdog/Kconfig                     |  16 +
>  hw/xtensa/Kconfig                       |   5 +
>  hw/xtensa/Makefile.objs                 |   4 +-
>  rules.mak                               |   2 +-
>  scripts/make_device_config.sh           |  30 --
>  scripts/minikconf.py                    | 687 ++++++++++++++++++++++++++++++++
>  131 files changed, 2749 insertions(+), 374 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
>  delete mode 100644 default-configs/virtio.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/alpha/Kconfig
>  create mode 100644 hw/arm/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/cris/Kconfig
>  create mode 100644 hw/display/Kconfig
>  create mode 100644 hw/dma/Kconfig
>  create mode 100644 hw/gpio/Kconfig
>  create mode 100644 hw/hppa/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/ide/ioport.c
>  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/lm32/Kconfig
>  create mode 100644 hw/m68k/Kconfig
>  create mode 100644 hw/mem/Kconfig
>  create mode 100644 hw/microblaze/Kconfig
>  create mode 100644 hw/mips/Kconfig
>  create mode 100644 hw/misc/Kconfig
>  create mode 100644 hw/misc/macio/Kconfig
>  create mode 100644 hw/moxie/Kconfig
>  create mode 100644 hw/net/Kconfig
>  create mode 100644 hw/nios2/Kconfig
>  create mode 100644 hw/nvram/Kconfig
>  create mode 100644 hw/openrisc/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/ppc/Kconfig
>  create mode 100644 hw/riscv/Kconfig
>  create mode 100644 hw/s390x/Kconfig
>  create mode 100644 hw/scsi/Kconfig
>  create mode 100644 hw/sd/Kconfig
>  create mode 100644 hw/sh4/Kconfig
>  create mode 100644 hw/smbios/Kconfig
>  create mode 100644 hw/sparc/Kconfig
>  create mode 100644 hw/sparc64/Kconfig
>  create mode 100644 hw/ssi/Kconfig
>  create mode 100644 hw/timer/Kconfig
>  create mode 100644 hw/tpm/Kconfig
>  create mode 100644 hw/tricore/Kconfig
>  create mode 100644 hw/unicore32/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
>  create mode 100644 hw/xtensa/Kconfig
>  delete mode 100644 scripts/make_device_config.sh
>  create mode 100644 scripts/minikconf.py
> 
> -- 
> 1.8.3.1

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 01/52] arm: disable CONFIG_SERIAL_ISA
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 01/52] arm: disable CONFIG_SERIAL_ISA Paolo Bonzini
@ 2019-01-25 14:49   ` Thomas Huth
  2019-01-25 15:21     ` Paolo Bonzini
  0 siblings, 1 reply; 119+ messages in thread
From: Thomas Huth @ 2019-01-25 14:49 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: yang.zhong

On 2019-01-25 11:06, Paolo Bonzini wrote:
> ARM does not have an ISA bus, this device should not be enabled.  Kconfig
> catches the contradiction because ARM does not define CONFIG_ISA_BUS.

That description is a little bit wrong, since ARM includes pci.mak, and
pci.mak enables CONFIG_ISA_BUS=y for the IDE code.

> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  default-configs/arm-softmmu.mak | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
> index 2420491..3c9351f 100644
> --- a/default-configs/arm-softmmu.mak
> +++ b/default-configs/arm-softmmu.mak
> @@ -6,7 +6,6 @@ CONFIG_VGA=y
>  CONFIG_NAND=y
>  CONFIG_ECC=y
>  CONFIG_SERIAL=y
> -CONFIG_SERIAL_ISA=y
>  CONFIG_PTIMER=y
>  CONFIG_SD=y
>  CONFIG_MAX7310=y

Anyway, looking through the code and the description of commit
1401c322c8d431fa750cff8276 I think you're right that CONFIG_SERIAL_ISA
is not required for ARM, so if you change the commit message a little bit:

Reviewed-by: Thomas Huth <thuth@redhat.com>

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 02/52] ide: split ioport registration to a separate file
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 02/52] ide: split ioport registration to a separate file Paolo Bonzini
@ 2019-01-25 14:53   ` Thomas Huth
  2019-01-25 15:22     ` Paolo Bonzini
  2019-01-30 12:07   ` Thomas Huth
  1 sibling, 1 reply; 119+ messages in thread
From: Thomas Huth @ 2019-01-25 14:53 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: yang.zhong, John Snow

On 2019-01-25 11:06, Paolo Bonzini wrote:
> This is not needed on ARM, and brings in ISA bus code which is otherwise not
> necessary.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  hw/ide/Makefile.objs |  6 ++---
>  hw/ide/core.c        | 25 --------------------
>  hw/ide/ioport.c      | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 70 insertions(+), 28 deletions(-)
>  create mode 100644 hw/ide/ioport.c
> 
> diff --git a/hw/ide/Makefile.objs b/hw/ide/Makefile.objs
> index fc328ff..3f3edd10 100644
> --- a/hw/ide/Makefile.objs
> +++ b/hw/ide/Makefile.objs
> @@ -1,12 +1,12 @@
>  common-obj-$(CONFIG_IDE_CORE) += core.o atapi.o
>  common-obj-$(CONFIG_IDE_QDEV) += qdev.o
> -common-obj-$(CONFIG_IDE_PCI) += pci.o
> -common-obj-$(CONFIG_IDE_ISA) += isa.o
> +common-obj-$(CONFIG_IDE_PCI) += pci.o ioport.o
> +common-obj-$(CONFIG_IDE_ISA) += isa.o ioport.o
>  common-obj-$(CONFIG_IDE_PIIX) += piix.o
>  common-obj-$(CONFIG_IDE_CMD646) += cmd646.o
>  common-obj-$(CONFIG_IDE_MACIO) += macio.o
>  common-obj-$(CONFIG_IDE_MMIO) += mmio.o
> -common-obj-$(CONFIG_IDE_VIA) += via.o
> +common-obj-$(CONFIG_IDE_VIA) += via.o ioport.o
>  common-obj-$(CONFIG_MICRODRIVE) += microdrive.o
>  common-obj-$(CONFIG_AHCI) += ahci.o
>  common-obj-$(CONFIG_AHCI) += ich.o

Since the ioport code clearly depends on ISA, I think you could also
simply do:

common-obj-$(CONFIG_ISA_BUS) += ioport.o

instead of adding it to three different lines here?

Well, the linker should be smart enough to deal with multiple entries,
so it's likely just a matter of taste.

> diff --git a/hw/ide/core.c b/hw/ide/core.c
> index c3d779d..8483200 100644
> --- a/hw/ide/core.c
> +++ b/hw/ide/core.c
> @@ -2686,31 +2686,6 @@ void ide_exit(IDEState *s)
>      qemu_vfree(s->io_buffer);
>  }
>  
> -static const MemoryRegionPortio ide_portio_list[] = {
> -    { 0, 8, 1, .read = ide_ioport_read, .write = ide_ioport_write },
> -    { 0, 1, 2, .read = ide_data_readw, .write = ide_data_writew },
> -    { 0, 1, 4, .read = ide_data_readl, .write = ide_data_writel },
> -    PORTIO_END_OF_LIST(),
> -};
> -
> -static const MemoryRegionPortio ide_portio2_list[] = {
> -    { 0, 1, 1, .read = ide_status_read, .write = ide_cmd_write },
> -    PORTIO_END_OF_LIST(),
> -};
> -
> -void ide_init_ioport(IDEBus *bus, ISADevice *dev, int iobase, int iobase2)
> -{
> -    /* ??? Assume only ISA and PCI configurations, and that the PCI-ISA
> -       bridge has been setup properly to always register with ISA.  */
> -    isa_register_portio_list(dev, &bus->portio_list,
> -                             iobase, ide_portio_list, bus, "ide");
> -
> -    if (iobase2) {
> -        isa_register_portio_list(dev, &bus->portio2_list,
> -                                 iobase2, ide_portio2_list, bus, "ide");
> -    }
> -}
> -
>  static bool is_identify_set(void *opaque, int version_id)
>  {
>      IDEState *s = opaque;
> diff --git a/hw/ide/ioport.c b/hw/ide/ioport.c
> new file mode 100644
> index 0000000..b8f1b3f
> --- /dev/null
> +++ b/hw/ide/ioport.c
> @@ -0,0 +1,67 @@
> +/*
> + * QEMU IDE disk and CD/DVD-ROM Emulator
> + *
> + * Copyright (c) 2003 Fabrice Bellard
> + * Copyright (c) 2006 Openedhand Ltd.
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a copy
> + * of this software and associated documentation files (the "Software"), to deal
> + * in the Software without restriction, including without limitation the rights
> + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> + * copies of the Software, and to permit persons to whom the Software is
> + * furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice shall be included in
> + * all copies or substantial portions of the Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
> + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
> + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
> + * THE SOFTWARE.
> + */
> +
> +#include "qemu/osdep.h"
> +#include "hw/hw.h"
> +#include "hw/isa/isa.h"
> +#include "qemu/error-report.h"
> +#include "qemu/timer.h"
> +#include "sysemu/sysemu.h"
> +#include "sysemu/blockdev.h"
> +#include "sysemu/dma.h"
> +#include "hw/block/block.h"
> +#include "sysemu/block-backend.h"
> +#include "qapi/error.h"
> +#include "qemu/cutils.h"
> +#include "sysemu/replay.h"
> +
> +#include "hw/ide/internal.h"
> +#include "trace.h"

Maybe shorten the #include list a little bit?

> +static const MemoryRegionPortio ide_portio_list[] = {
> +    { 0, 8, 1, .read = ide_ioport_read, .write = ide_ioport_write },
> +    { 0, 1, 2, .read = ide_data_readw, .write = ide_data_writew },
> +    { 0, 1, 4, .read = ide_data_readl, .write = ide_data_writel },
> +    PORTIO_END_OF_LIST(),
> +};
> +
> +static const MemoryRegionPortio ide_portio2_list[] = {
> +    { 0, 1, 1, .read = ide_status_read, .write = ide_cmd_write },
> +    PORTIO_END_OF_LIST(),
> +};
> +
> +void ide_init_ioport(IDEBus *bus, ISADevice *dev, int iobase, int iobase2)
> +{
> +    /* ??? Assume only ISA and PCI configurations, and that the PCI-ISA
> +       bridge has been setup properly to always register with ISA.  */
> +    isa_register_portio_list(dev, &bus->portio_list,
> +                             iobase, ide_portio_list, bus, "ide");
> +
> +    if (iobase2) {
> +        isa_register_portio_list(dev, &bus->portio2_list,
> +                                 iobase2, ide_portio2_list, bus, "ide");
> +    }
> +}

Anyway:

Reviewed-by: Thomas Huth <thuth@redhat.com>

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 03/52] vfio: move conditional up to hw/Makefile.objs
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 03/52] vfio: move conditional up to hw/Makefile.objs Paolo Bonzini
@ 2019-01-25 15:04   ` Thomas Huth
  0 siblings, 0 replies; 119+ messages in thread
From: Thomas Huth @ 2019-01-25 15:04 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: yang.zhong, Alex Williamson

On 2019-01-25 11:06, Paolo Bonzini wrote:
> Instead of wrapping the entire Makefile.objs with an ifeq/endif, just
> include the directory only for Linux.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  hw/Makefile.objs      | 2 +-
>  hw/vfio/Makefile.objs | 2 --
>  2 files changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/hw/Makefile.objs b/hw/Makefile.objs
> index 39d882a..22dd211 100644
> --- a/hw/Makefile.objs
> +++ b/hw/Makefile.objs
> @@ -30,7 +30,7 @@ devices-dirs-$(CONFIG_SOFTMMU) += ssi/
>  devices-dirs-$(CONFIG_SOFTMMU) += timer/
>  devices-dirs-$(CONFIG_TPM) += tpm/
>  devices-dirs-$(CONFIG_SOFTMMU) += usb/
> -devices-dirs-$(CONFIG_SOFTMMU) += vfio/
> +devices-dirs-$(CONFIG_LINUX) += vfio/
>  devices-dirs-$(CONFIG_SOFTMMU) += virtio/
>  devices-dirs-$(CONFIG_SOFTMMU) += watchdog/
>  devices-dirs-$(CONFIG_SOFTMMU) += xen/
> diff --git a/hw/vfio/Makefile.objs b/hw/vfio/Makefile.objs
> index 8b3f664..9180589 100644
> --- a/hw/vfio/Makefile.objs
> +++ b/hw/vfio/Makefile.objs
> @@ -1,4 +1,3 @@
> -ifeq ($(CONFIG_LINUX), y)
>  obj-$(CONFIG_SOFTMMU) += common.o
>  obj-$(CONFIG_PCI) += pci.o pci-quirks.o display.o
>  obj-$(CONFIG_VFIO_CCW) += ccw.o
> @@ -7,4 +6,3 @@ obj-$(CONFIG_VFIO_XGMAC) += calxeda-xgmac.o
>  obj-$(CONFIG_VFIO_AMD_XGBE) += amd-xgbe.o
>  obj-$(CONFIG_SOFTMMU) += spapr.o
>  obj-$(CONFIG_VFIO_AP) += ap.o
> -endif
> 

Reviewed-by: Thomas Huth <thuth@redhat.com>

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 07/52] hw/arm/Makefile.objs: CONFIG_VIRT created for virt board
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 07/52] hw/arm/Makefile.objs: CONFIG_VIRT created for virt board Paolo Bonzini
@ 2019-01-25 15:06   ` Thomas Huth
  2019-01-25 15:23     ` Paolo Bonzini
  0 siblings, 1 reply; 119+ messages in thread
From: Thomas Huth @ 2019-01-25 15:06 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: yang.zhong

On 2019-01-25 11:06, Paolo Bonzini wrote:
> From: Yang Zhong <yang.zhong@intel.com>
> 
> make virt code configurable and the new CONFIG_VIRT definitions
> added to the default-configs/arm-softmmu.mak to replace CONFIG_ACPI
> in arm board.
> 
> Signed-off-by: Yang Zhong <yang.zhong@intel.com>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> Message-Id: <20190123065618.3520-5-yang.zhong@intel.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  default-configs/arm-softmmu.mak | 1 +
>  hw/arm/Makefile.objs            | 3 ++-
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
> index 107f801..68deb1c 100644
> --- a/default-configs/arm-softmmu.mak
> +++ b/default-configs/arm-softmmu.mak
> @@ -147,6 +147,7 @@ CONFIG_XIO3130=y
>  CONFIG_IOH3420=y
>  CONFIG_I82801B11=y
>  CONFIG_ACPI=y
> +CONFIG_VIRT=y
>  CONFIG_SMBIOS=y
>  CONFIG_ASPEED_SOC=y
>  CONFIG_GPIO_KEY=y
> diff --git a/hw/arm/Makefile.objs b/hw/arm/Makefile.objs
> index 50c7b4a..41dab8a 100644
> --- a/hw/arm/Makefile.objs
> +++ b/hw/arm/Makefile.objs
> @@ -1,4 +1,5 @@
> -obj-y += boot.o virt.o sysbus-fdt.o
> +obj-y += boot.o sysbus-fdt.o
> +obj-$(CONFIG_VIRT) += virt.o
>  obj-$(CONFIG_ACPI) += virt-acpi-build.o
>  obj-$(CONFIG_DIGIC) += digic_boards.o
>  obj-$(CONFIG_EXYNOS4) += exynos4_boards.o

<bikeshedding>
Maybe we should rather name that option CONFIG_ARM_VIRT, since other
targets like riscv have also a "virt" machine?
</bikeshedding>

 Thomas

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 08/52] hw/m68k/Makefile.objs: Conditionally build boards
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 08/52] hw/m68k/Makefile.objs: Conditionally build boards Paolo Bonzini
@ 2019-01-25 15:08   ` Thomas Huth
  0 siblings, 0 replies; 119+ messages in thread
From: Thomas Huth @ 2019-01-25 15:08 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: yang.zhong, Ákos Kovács

On 2019-01-25 11:06, Paolo Bonzini wrote:
> From: Ákos Kovács <akoskovacs@gmx.com>
> 
> CONFIG_AN5206, CONFIG_MCF5206 and CONFIG_MCF5208 make
> variables created for m68k boards, and added to
> default-configs/m86k-softmmu.mak.
> 
> Signed-off-by: Ákos Kovács <akoskovacs@gmx.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> Message-Id: <20190123065618.3520-6-yang.zhong@intel.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  default-configs/m68k-softmmu.mak | 2 ++
>  hw/m68k/Makefile.objs            | 4 ++--
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/default-configs/m68k-softmmu.mak b/default-configs/m68k-softmmu.mak
> index 60f7cdf..27f5274 100644
> --- a/default-configs/m68k-softmmu.mak
> +++ b/default-configs/m68k-softmmu.mak
> @@ -2,3 +2,5 @@
>  
>  CONFIG_COLDFIRE=y
>  CONFIG_PTIMER=y
> +CONFIG_AN5206=y
> +CONFIG_MCF5208=y
> diff --git a/hw/m68k/Makefile.objs b/hw/m68k/Makefile.objs
> index d1f089c..482f847 100644
> --- a/hw/m68k/Makefile.objs
> +++ b/hw/m68k/Makefile.objs
> @@ -1,2 +1,2 @@
> -obj-y += an5206.o mcf5208.o
> -obj-y += mcf5206.o mcf_intc.o
> +obj-$(CONFIG_AN5206) += an5206.o mcf5206.o
> +obj-$(CONFIG_MCF5208) += mcf5208.o mcf_intc.o

Still:
Reviewed-by: Thomas Huth <thuth@redhat.com>

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 13/52] hw/s390/Makefile.objs: Create new CONFIG_* variables for s390x boards and devices
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 13/52] hw/s390/Makefile.objs: Create new CONFIG_* variables for s390x boards and devices Paolo Bonzini
@ 2019-01-25 15:17   ` Thomas Huth
  2019-01-25 15:23     ` Paolo Bonzini
  0 siblings, 1 reply; 119+ messages in thread
From: Thomas Huth @ 2019-01-25 15:17 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: yang.zhong

On 2019-01-25 11:06, Paolo Bonzini wrote:
> Make hw/s390x configurable and add new CONFIG_* to the default-configs/s390x*-softmmu.mak.
> This will be used to enable/disable vfio-ccw.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> Message-Id: <20190123065618.3520-10-yang.zhong@intel.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  default-configs/s390x-softmmu.mak | 1 +
>  hw/s390x/Makefile.objs            | 2 ++
>  2 files changed, 3 insertions(+)
> 
> diff --git a/default-configs/s390x-softmmu.mak b/default-configs/s390x-softmmu.mak
> index 5eef375..8bb7e43 100644
> --- a/default-configs/s390x-softmmu.mak
> +++ b/default-configs/s390x-softmmu.mak
> @@ -8,3 +8,4 @@ CONFIG_S390_FLIC_KVM=$(CONFIG_KVM)
>  CONFIG_VFIO_CCW=$(CONFIG_LINUX)
>  CONFIG_WDT_DIAG288=y
>  CONFIG_VFIO_AP=$(CONFIG_LINUX)
> +CONFIG_S390_CCW_VIRTIO=y
> diff --git a/hw/s390x/Makefile.objs b/hw/s390x/Makefile.objs
> index ca68806..a884aae 100644
> --- a/hw/s390x/Makefile.objs
> +++ b/hw/s390x/Makefile.objs
> @@ -1,3 +1,4 @@
> +ifeq ($(CONFIG_S390_CCW_VIRTIO),y)
>  obj-y += s390-virtio-hcall.o
>  obj-y += sclp.o
>  obj-y += event-facility.o
> @@ -33,3 +34,4 @@ obj-$(CONFIG_KVM) += s390-stattrib-kvm.o
>  obj-y += s390-ccw.o
>  obj-y += ap-device.o
>  obj-y += ap-bridge.o
> +endif

That won't really work, a lot of code in target/s390x still depends on
the functions in these files here. I suggest to just disable the file
that defines the machine initially, i.e.:

obj-$(CONFIG_S390_CCW_VIRTIO) += s390-virtio-ccw.o

We can still fine-tune this later.

 Thomas

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 01/52] arm: disable CONFIG_SERIAL_ISA
  2019-01-25 14:49   ` Thomas Huth
@ 2019-01-25 15:21     ` Paolo Bonzini
  0 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 15:21 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel; +Cc: yang.zhong

On 25/01/19 15:49, Thomas Huth wrote:
> On 2019-01-25 11:06, Paolo Bonzini wrote:
>> ARM does not have an ISA bus, this device should not be enabled.  Kconfig
>> catches the contradiction because ARM does not define CONFIG_ISA_BUS.
> 
> That description is a little bit wrong, since ARM includes pci.mak, and
> pci.mak enables CONFIG_ISA_BUS=y for the IDE code.

Right:

ARM should not have an ISA bus, this device should not be enabled.
Kconfig allows to clean up the dependencies and remove CONFIG_ISA_BUS=y
from ARM, and then catches a contradiction between the hardcoded
CONFIG_SERIAL_ISA=y and CONFIG_ISA_BUS=n.

Paolo

>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>> ---
>>  default-configs/arm-softmmu.mak | 1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
>> index 2420491..3c9351f 100644
>> --- a/default-configs/arm-softmmu.mak
>> +++ b/default-configs/arm-softmmu.mak
>> @@ -6,7 +6,6 @@ CONFIG_VGA=y
>>  CONFIG_NAND=y
>>  CONFIG_ECC=y
>>  CONFIG_SERIAL=y
>> -CONFIG_SERIAL_ISA=y
>>  CONFIG_PTIMER=y
>>  CONFIG_SD=y
>>  CONFIG_MAX7310=y
> 
> Anyway, looking through the code and the description of commit
> 1401c322c8d431fa750cff8276 I think you're right that CONFIG_SERIAL_ISA
> is not required for ARM, so if you change the commit message a little bit:
> 
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> 

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 02/52] ide: split ioport registration to a separate file
  2019-01-25 14:53   ` Thomas Huth
@ 2019-01-25 15:22     ` Paolo Bonzini
  0 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 15:22 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel; +Cc: yang.zhong, John Snow

On 25/01/19 15:53, Thomas Huth wrote:
> Since the ioport code clearly depends on ISA, I think you could also
> simply do:
> 
> common-obj-$(CONFIG_ISA_BUS) += ioport.o
> 
> instead of adding it to three different lines here?

No, because that would add the function even if !IDE && ISA_BUS, causing
undefined symbols from ide_ioport_read and friends.

> Well, the linker should be smart enough to deal with multiple entries,
> so it's likely just a matter of taste.

It's not the linker, rules.mak explicitly drops duplicates.

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 07/52] hw/arm/Makefile.objs: CONFIG_VIRT created for virt board
  2019-01-25 15:06   ` Thomas Huth
@ 2019-01-25 15:23     ` Paolo Bonzini
  0 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 15:23 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel; +Cc: yang.zhong

On 25/01/19 16:06, Thomas Huth wrote:
>> -obj-y += boot.o virt.o sysbus-fdt.o
>> +obj-y += boot.o sysbus-fdt.o
>> +obj-$(CONFIG_VIRT) += virt.o
>>  obj-$(CONFIG_ACPI) += virt-acpi-build.o
>>  obj-$(CONFIG_DIGIC) += digic_boards.o
>>  obj-$(CONFIG_EXYNOS4) += exynos4_boards.o
> <bikeshedding>
> Maybe we should rather name that option CONFIG_ARM_VIRT, since other
> targets like riscv have also a "virt" machine?
> </bikeshedding>

Yes, why not, especially since CONFIG_* symbols are not namespaced
per-target.

Paolo

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 13/52] hw/s390/Makefile.objs: Create new CONFIG_* variables for s390x boards and devices
  2019-01-25 15:17   ` Thomas Huth
@ 2019-01-25 15:23     ` Paolo Bonzini
  0 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 15:23 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel; +Cc: yang.zhong

On 25/01/19 16:17, Thomas Huth wrote:
>> +ifeq ($(CONFIG_S390_CCW_VIRTIO),y)
>>  obj-y += s390-virtio-hcall.o
>>  obj-y += sclp.o
>>  obj-y += event-facility.o
>> @@ -33,3 +34,4 @@ obj-$(CONFIG_KVM) += s390-stattrib-kvm.o
>>  obj-y += s390-ccw.o
>>  obj-y += ap-device.o
>>  obj-y += ap-bridge.o
>> +endif
> That won't really work, a lot of code in target/s390x still depends on
> the functions in these files here. I suggest to just disable the file
> that defines the machine initially, i.e.:
> 
> obj-$(CONFIG_S390_CCW_VIRTIO) += s390-virtio-ccw.o
> 
> We can still fine-tune this later.

Ok, I'll leave this and the other changes you suggest to Yang for v6. :)

Paolo

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 20/52] hw/alpha/Makefile.objs: Create CONFIG_* for alpha
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 20/52] hw/alpha/Makefile.objs: Create CONFIG_* for alpha Paolo Bonzini
@ 2019-01-25 15:29   ` Thomas Huth
  2019-01-25 20:04   ` Richard Henderson
  1 sibling, 0 replies; 119+ messages in thread
From: Thomas Huth @ 2019-01-25 15:29 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: yang.zhong, Richard Henderson

On 2019-01-25 11:06, Paolo Bonzini wrote:
> From: Yang Zhong <yang.zhong@intel.com>
> 
> Add the new configs to default-configs/alpha-sofmmu.mak.
> 
> Signed-off-by: Yang Zhong <yang.zhong@intel.com>
> Message-Id: <20190123065618.3520-17-yang.zhong@intel.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  default-configs/alpha-softmmu.mak | 1 +
>  hw/alpha/Makefile.objs            | 2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/default-configs/alpha-softmmu.mak b/default-configs/alpha-softmmu.mak
> index 4d654ea..49cb7ce 100644
> --- a/default-configs/alpha-softmmu.mak
> +++ b/default-configs/alpha-softmmu.mak
> @@ -19,3 +19,4 @@ CONFIG_I8259=y
>  CONFIG_MC146818RTC=y
>  CONFIG_ISA_TESTDEV=y
>  CONFIG_SMC37C669=y
> +CONFIG_DP264=y
> diff --git a/hw/alpha/Makefile.objs b/hw/alpha/Makefile.objs
> index 5c74275..62fdf3e 100644
> --- a/hw/alpha/Makefile.objs
> +++ b/hw/alpha/Makefile.objs
> @@ -1 +1 @@
> -obj-y += dp264.o pci.o typhoon.o
> +obj-$(CONFIG_DP264) += dp264.o pci.o typhoon.o

Reviewed-by: Thomas Huth <thuth@redhat.com>

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 23/52] hw/moxie/Makefile.objs: Conditionally build moxie
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 23/52] hw/moxie/Makefile.objs: Conditionally build moxie Paolo Bonzini
@ 2019-01-25 15:33   ` Thomas Huth
  0 siblings, 0 replies; 119+ messages in thread
From: Thomas Huth @ 2019-01-25 15:33 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: yang.zhong, Anthony Green

On 2019-01-25 11:06, Paolo Bonzini wrote:
> From: Yang Zhong <yang.zhong@intel.com>
> 
> CONFIG_MOXIE added for moxiesim board.
> 
> Signed-off-by: Yang Zhong <yang.zhong@intel.com>
> Message-Id: <20190123065618.3520-20-yang.zhong@intel.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  default-configs/moxie-softmmu.mak | 1 +
>  hw/moxie/Makefile.objs            | 2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/default-configs/moxie-softmmu.mak b/default-configs/moxie-softmmu.mak
> index e00d099..b176563 100644
> --- a/default-configs/moxie-softmmu.mak
> +++ b/default-configs/moxie-softmmu.mak
> @@ -5,3 +5,4 @@ CONFIG_MC146818RTC=y
>  CONFIG_SERIAL=y
>  CONFIG_SERIAL_ISA=y
>  CONFIG_VGA=y
> +CONFIG_MOXIE=y
> diff --git a/hw/moxie/Makefile.objs b/hw/moxie/Makefile.objs
> index bfc9001..cb575ef 100644
> --- a/hw/moxie/Makefile.objs
> +++ b/hw/moxie/Makefile.objs
> @@ -1,2 +1,2 @@
>  # moxie boards
> -obj-y += moxiesim.o
> +obj-$(CONFIG_MOXIE) += moxiesim.o

<bikeshedding>
Let's call it CONFIG_MOXIESIM - like the machine, not the CPU.
</bikeshedding>

Anyway:
Reviewed-by: Thomas Huth <thuth@redhat.com>

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 24/52] hw/openrisc/Makefile.objs: Create CONFIG_* for openrisc
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 24/52] hw/openrisc/Makefile.objs: Create CONFIG_* for openrisc Paolo Bonzini
@ 2019-01-25 15:35   ` Thomas Huth
  2019-01-25 17:33     ` Paolo Bonzini
  0 siblings, 1 reply; 119+ messages in thread
From: Thomas Huth @ 2019-01-25 15:35 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: yang.zhong, Jia Liu

On 2019-01-25 11:06, Paolo Bonzini wrote:
> From: Yang Zhong <yang.zhong@intel.com>
> 
> Add the new configs to default-configs/or1k-sofmmu.mak.
> 
> Signed-off-by: Yang Zhong <yang.zhong@intel.com>
> Message-Id: <20190123065618.3520-21-yang.zhong@intel.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  default-configs/or1k-softmmu.mak | 1 +
>  hw/openrisc/Makefile.objs        | 2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/default-configs/or1k-softmmu.mak b/default-configs/or1k-softmmu.mak
> index 6f5824f..85a7e69 100644
> --- a/default-configs/or1k-softmmu.mak
> +++ b/default-configs/or1k-softmmu.mak
> @@ -3,3 +3,4 @@
>  CONFIG_SERIAL=y
>  CONFIG_OPENCORES_ETH=y
>  CONFIG_OMPIC=y
> +CONFIG_OPENRISC=y
> diff --git a/hw/openrisc/Makefile.objs b/hw/openrisc/Makefile.objs
> index 61246b1..8dc413c 100644
> --- a/hw/openrisc/Makefile.objs
> +++ b/hw/openrisc/Makefile.objs
> @@ -1,2 +1,2 @@
>  obj-y = pic_cpu.o cputimer.o
> -obj-y += openrisc_sim.o 
> +obj-$(CONFIG_OPENRISC) += openrisc_sim.o
> 

<bikeshedding>
CONFIG_OR1K_SIM instead of CONFIG_OPENRISC ?
</bikeshedding>

Anyway:
Reviewed-by: Thomas Huth <thuth@redhat.com>

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 26/52] hw/i2c/Makefile.objs: Create new CONFIG_* variables for EEPROM and ACPI controller
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 26/52] hw/i2c/Makefile.objs: Create new CONFIG_* variables for EEPROM and ACPI controller Paolo Bonzini
@ 2019-01-25 15:42   ` Thomas Huth
  0 siblings, 0 replies; 119+ messages in thread
From: Thomas Huth @ 2019-01-25 15:42 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel
  Cc: yang.zhong, Michael S. Tsirkin, Aurelien Jarno, Magnus Damm

On 2019-01-25 11:06, Paolo Bonzini wrote:
> Create separate variables for these components, they are used in many boards
> but not all.  This allows finer-grain selection of the included code with
> default-configs/*.mak.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> Message-Id: <20190123065618.3520-10-yang.zhong@intel.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  default-configs/arm-softmmu.mak         | 1 +
>  default-configs/i386-softmmu.mak        | 2 ++
>  default-configs/mips-softmmu-common.mak | 2 ++
>  default-configs/ppc-softmmu.mak         | 1 +
>  hw/i2c/Makefile.objs                    | 5 +++--
>  5 files changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
> index 68deb1c..caf7d7e 100644
> --- a/default-configs/arm-softmmu.mak
> +++ b/default-configs/arm-softmmu.mak
> @@ -150,6 +150,7 @@ CONFIG_ACPI=y
>  CONFIG_VIRT=y
>  CONFIG_SMBIOS=y
>  CONFIG_ASPEED_SOC=y
> +CONFIG_SMBUS_EEPROM=y
>  CONFIG_GPIO_KEY=y
>  CONFIG_MSF2=y
>  CONFIG_FW_CFG_DMA=y
> diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmmu.mak
> index 71c9f6f..15b6287 100644
> --- a/default-configs/i386-softmmu.mak
> +++ b/default-configs/i386-softmmu.mak
> @@ -62,6 +62,8 @@ CONFIG_I82801B11=y
>  CONFIG_SMBIOS=y
>  CONFIG_PXB=y
>  CONFIG_ACPI_VMGENID=y
> +CONFIG_ACPI_SMBUS=y
> +CONFIG_SMBUS_EEPROM=y
>  CONFIG_FW_CFG_DMA=y
>  CONFIG_I2C=y
>  CONFIG_SEV=$(CONFIG_KVM)
> diff --git a/default-configs/mips-softmmu-common.mak b/default-configs/mips-softmmu-common.mak
> index 479fb4d..ded7498 100644
> --- a/default-configs/mips-softmmu-common.mak
> +++ b/default-configs/mips-softmmu-common.mak
> @@ -39,3 +39,5 @@ CONFIG_I2C=y
>  CONFIG_R4K=y
>  CONFIG_MALTA=y
>  CONFIG_MIPSSIM=y
> +CONFIG_ACPI_SMBUS=y
> +CONFIG_SMBUS_EEPROM=y
> diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
> index 7f80f0c..52acb7c 100644
> --- a/default-configs/ppc-softmmu.mak
> +++ b/default-configs/ppc-softmmu.mak
> @@ -36,6 +36,7 @@ CONFIG_AT24C=y
>  CONFIG_BITBANG_I2C=y
>  CONFIG_M41T80=y
>  CONFIG_VGA_CIRRUS=y
> +CONFIG_SMBUS_EEPROM=y
>  
>  # For Macs
>  CONFIG_ESCC=y
> diff --git a/hw/i2c/Makefile.objs b/hw/i2c/Makefile.objs
> index 37cacde..61ac50a 100644
> --- a/hw/i2c/Makefile.objs
> +++ b/hw/i2c/Makefile.objs
> @@ -1,8 +1,9 @@
> -common-obj-$(CONFIG_I2C) += core.o smbus.o smbus_eeprom.o
> +common-obj-$(CONFIG_I2C) += core.o smbus.o
> +common-obj-$(CONFIG_SMBUS_EEPROM) += smbus_eeprom.o
>  common-obj-$(CONFIG_DDC) += i2c-ddc.o
>  common-obj-$(CONFIG_VERSATILE_I2C) += versatile_i2c.o
>  common-obj-$(CONFIG_ACPI_X86) += smbus_ich9.o
> -common-obj-$(CONFIG_APM) += pm_smbus.o
> +common-obj-$(CONFIG_ACPI_SMBUS) += pm_smbus.o
>  common-obj-$(CONFIG_BITBANG_I2C) += bitbang_i2c.o
>  common-obj-$(CONFIG_EXYNOS4) += exynos4210_i2c.o
>  common-obj-$(CONFIG_IMX_I2C) += imx_i2c.o

smbus_eeprom.o is now not linked into the sh4 executables anymore. But
as far as I can see, this should be ok, since they don't use this device.

Reviewed-by: Thomas Huth <thuth@redhat.com>

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 24/52] hw/openrisc/Makefile.objs: Create CONFIG_* for openrisc
  2019-01-25 15:35   ` Thomas Huth
@ 2019-01-25 17:33     ` Paolo Bonzini
  0 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-25 17:33 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel; +Cc: yang.zhong, Jia Liu

On 25/01/19 16:35, Thomas Huth wrote:
> <bikeshedding>
> CONFIG_OR1K_SIM instead of CONFIG_OPENRISC ?
> </bikeshedding>

Sure, I just missed those two remarks.

Paolo

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 47/52] vfio: express vfio dependencies with Kconfig
  2019-01-25 10:07 ` [Qemu-devel] [PATCH 47/52] vfio: express vfio dependencies with Kconfig Paolo Bonzini
@ 2019-01-25 20:00   ` Alex Williamson
  2019-01-28 10:54     ` Paolo Bonzini
  0 siblings, 1 reply; 119+ messages in thread
From: Alex Williamson @ 2019-01-25 20:00 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel, yang.zhong, thuth

On Fri, 25 Jan 2019 11:07:06 +0100
Paolo Bonzini <pbonzini@redhat.com> wrote:

> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  hw/vfio/Kconfig | 18 ++++++++++--------
>  1 file changed, 10 insertions(+), 8 deletions(-)
> 
> diff --git a/hw/vfio/Kconfig b/hw/vfio/Kconfig
> index f896779..ebda9fd 100644
> --- a/hw/vfio/Kconfig
> +++ b/hw/vfio/Kconfig
> @@ -7,28 +7,30 @@ config VFIO_PCI
>      select VFIO
>      depends on LINUX
>  
> -config VFIO_SPAPR
> -    bool
> -    default y
> -    depends on VFIO && LINUX && PSERIES


I can't say I really understand what happened with this through the
course of the series.  In patch 27 spapr.o became obj-y, VFIO_SPAPR
came about in patch 32, tweaked in patch 33, then removed in 47.  I was
really hoping the Makefile was going to reflect this as a config option
so we could follow-up with some patches to stub or ifdef out the
dependencies.  The remainder here seems to set the right precedent and
we can add VFIO_SPAPR back later and wire it through the Makefile.

Unfortunately with the full series applied I'm not able to make either
allnoconfig or defconfig:

$ make allnoconfig
  GEN     x86_64-softmmu/config-devices.mak.tmp
  GEN     x86_64-softmmu/config-devices.mak
  GEN     config-all-devices.mak
	CHK version_gen.h
	CHK version_gen.h
rm */config-devices.mak config-all-devices.mak
make MINIKCONF="python -B /home/alwillia/Work/qemu.git/scripts/minikconf.py  --" config-all-devices.mak
make[1]: Entering directory '/home/alwillia/Work/qemu.git'
  GEN     x86_64-softmmu/config-devices.mak.tmp
/home/alwillia/Work/qemu.git/scripts/minikconf.py: invalid option --
	CHK version_gen.h
make[1]: *** No rule to make target 'x86_64-softmmu/config-devices.mak', needed by 'config-all-devices.mak'.  Stop.
make[1]: Leaving directory '/home/alwillia/Work/qemu.git'
make: *** [Makefile:346: allnoconfig] Error 2

Something wrong with this expansion from patch 34 I guess:

.PHONY: allnoconfig defconfig
allnoconfig defconfig:
        rm */config-devices.mak config-all-devices.mak
        $(MAKE) MINIKCONF="$(MINIKCONF) --$<" config-all-devices.mak

Thanks,
Alex

> -
>  config VFIO_CCW
>      bool
> +    default y
>      select VFIO
> -    depends on LINUX
> +    depends on LINUX && S390_CCW_VIRTIO
>  
>  config VFIO_PLATFORM
>      bool
> +    default y
>      select VFIO
> -    depends on LINUX
> +    depends on LINUX && PLATFORM_BUS
>  
>  config VFIO_XGMAC
>      bool
> +    default y
> +    depends on VFIO_PLATFORM
>  
>  config VFIO_AMD_XGBE
>      bool
> +    default y
> +    depends on VFIO_PLATFORM
>  
>  config VFIO_AP
>      bool
> +    default y
>      select VFIO
> -    depends on LINUX
> +    depends on LINUX && S390_CCW_VIRTIO

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 20/52] hw/alpha/Makefile.objs: Create CONFIG_* for alpha
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 20/52] hw/alpha/Makefile.objs: Create CONFIG_* for alpha Paolo Bonzini
  2019-01-25 15:29   ` Thomas Huth
@ 2019-01-25 20:04   ` Richard Henderson
  1 sibling, 0 replies; 119+ messages in thread
From: Richard Henderson @ 2019-01-25 20:04 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: yang.zhong, thuth

On 1/25/19 2:06 AM, Paolo Bonzini wrote:
> From: Yang Zhong <yang.zhong@intel.com>
> 
> Add the new configs to default-configs/alpha-sofmmu.mak.
> 
> Signed-off-by: Yang Zhong <yang.zhong@intel.com>
> Message-Id: <20190123065618.3520-17-yang.zhong@intel.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  default-configs/alpha-softmmu.mak | 1 +
>  hw/alpha/Makefile.objs            | 2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 22/52] hw/hppa/Makefile.objs: Create CONFIG_* for hppa
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 22/52] hw/hppa/Makefile.objs: Create CONFIG_* for hppa Paolo Bonzini
@ 2019-01-25 20:05   ` Richard Henderson
  0 siblings, 0 replies; 119+ messages in thread
From: Richard Henderson @ 2019-01-25 20:05 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: yang.zhong, thuth

On 1/25/19 2:06 AM, Paolo Bonzini wrote:
> From: Yang Zhong <yang.zhong@intel.com>
> 
> Add the new configs to default-configs/hppa-sofmmu.mak.
> 
> Signed-off-by: Yang Zhong <yang.zhong@intel.com>
> Message-Id: <20190123065618.3520-19-yang.zhong@intel.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  default-configs/hppa-softmmu.mak | 1 +
>  hw/hppa/Makefile.objs            | 2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 47/52] vfio: express vfio dependencies with Kconfig
  2019-01-25 20:00   ` Alex Williamson
@ 2019-01-28 10:54     ` Paolo Bonzini
  0 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-28 10:54 UTC (permalink / raw)
  To: Alex Williamson; +Cc: qemu-devel, yang.zhong, thuth

On 25/01/19 21:00, Alex Williamson wrote:
>>  
>> -config VFIO_SPAPR
>> -    bool
>> -    default y
>> -    depends on VFIO && LINUX && PSERIES
> 
> I can't say I really understand what happened with this through the
> course of the series.  In patch 27 spapr.o became obj-y, VFIO_SPAPR
> came about in patch 32, tweaked in patch 33, then removed in 47.

Oops, that's a rebasing issue that I messed out when I finally got
ppc64-softmmu to build with the series.  I initially assumed that
spapr.o was not needed for non-pseries machines, but as you say below it
is not stubbed yet if not needed.

> .PHONY: allnoconfig defconfig
> allnoconfig defconfig:
>         rm */config-devices.mak config-all-devices.mak
>         $(MAKE) MINIKCONF="$(MINIKCONF) --$<" config-all-devices.mak

This seemed to work here (besides the fact that "rm" should have been
"rm -f").  The makefile needs some work apparently.

Paolo

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 42/52] i386: express dependencies with Kconfig
  2019-01-25 10:07 ` [Qemu-devel] [PATCH 42/52] i386: express dependencies with Kconfig Paolo Bonzini
@ 2019-01-28 14:21   ` Thomas Huth
  2019-02-01 15:05   ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 119+ messages in thread
From: Thomas Huth @ 2019-01-28 14:21 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: yang.zhong

On 2019-01-25 11:07, Paolo Bonzini wrote:
> This way, the default-configs file only need to specify the boards
> and any optional devices.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Yang Zhong <yang.zhong@intel.com>
> Message-Id: <20190123065618.3520-37-yang.zhong@intel.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
[...]
> diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
> index ff41be3..8814b7c 100644
> --- a/hw/i386/Kconfig
> +++ b/hw/i386/Kconfig
> @@ -5,20 +5,73 @@ config SEV
>  config PC
>      bool
>  
> +config PC
> +    bool
> +    select ISA_DEBUG
> +    select I8259
> +    select I8254
> +    select PCSPK
> +    select I82374
> +    select I8257
> +    select MC146818RTC

You've duplicated the "config PC" line here. The "select"s should be
added to the previous "config PC" section instead.

 Thomas

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 41/52] isa: express dependencies with kconfig
  2019-01-25 10:07 ` [Qemu-devel] [PATCH 41/52] isa: express dependencies with kconfig Paolo Bonzini
@ 2019-01-30 10:53   ` Thomas Huth
  2019-01-30 11:13     ` Paolo Bonzini
  2019-01-30 11:58   ` Thomas Huth
  2019-01-31 21:22   ` Philippe Mathieu-Daudé
  2 siblings, 1 reply; 119+ messages in thread
From: Thomas Huth @ 2019-01-30 10:53 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: yang.zhong

On 2019-01-25 11:07, Paolo Bonzini wrote:
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Yang Zhong <yang.zhong@intel.com>
> Message-Id: <20190123065618.3520-36-yang.zhong@intel.com>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  default-configs/i386-softmmu.mak | 9 ---------
>  hw/audio/Kconfig                 | 2 ++
>  hw/block/Kconfig                 | 2 ++
>  hw/char/Kconfig                  | 6 ++++++
>  hw/display/Kconfig               | 3 +++
>  hw/dma/Kconfig                   | 1 +
>  hw/i386/Kconfig                  | 1 +
>  hw/ide/Kconfig                   | 1 +
>  hw/input/Kconfig                 | 2 ++
>  hw/isa/Kconfig                   | 7 +++++++
>  hw/misc/Kconfig                  | 4 ++++
>  hw/net/Kconfig                   | 3 +++
>  hw/sparc64/Kconfig               | 1 +
>  hw/watchdog/Kconfig              | 2 ++
>  14 files changed, 35 insertions(+), 9 deletions(-)
> 
> diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmmu.mak
> index 4073c62..8e6a810 100644
> --- a/default-configs/i386-softmmu.mak
> +++ b/default-configs/i386-softmmu.mak
> @@ -8,19 +8,12 @@ CONFIG_VGA_ISA=y
>  CONFIG_VMWARE_VGA=y
>  CONFIG_VMXNET3_PCI=y
>  CONFIG_VIRTIO_VGA=y
> -CONFIG_VMMOUSE=y
>  CONFIG_IPMI=y
>  CONFIG_IPMI_LOCAL=y
>  CONFIG_IPMI_EXTERN=y
>  CONFIG_ISA_IPMI_KCS=y
>  CONFIG_ISA_IPMI_BT=y
> -CONFIG_SERIAL=y
> -CONFIG_SERIAL_ISA=y
> -CONFIG_PARALLEL=y
>  CONFIG_I8254=y
> -CONFIG_PCSPK=y
> -CONFIG_PCKBD=y
> -CONFIG_FDC=y
>  CONFIG_ACPI=y
>  CONFIG_ACPI_X86=y
>  CONFIG_ACPI_X86_ICH=y
> @@ -30,14 +23,12 @@ CONFIG_APM=y
>  CONFIG_I8257=y
>  CONFIG_IDE_ISA=y
>  CONFIG_IDE_PIIX=y
> -CONFIG_NE2000_ISA=y
>  CONFIG_HPET=y
>  CONFIG_APPLESMC=y
>  CONFIG_I8259=y
>  CONFIG_PFLASH_CFI01=y
>  CONFIG_MC146818RTC=y
>  CONFIG_PCI_PIIX=y
> -CONFIG_WDT_IB700=y
>  CONFIG_ISA_DEBUG=y
>  CONFIG_ISA_TESTDEV=y
>  CONFIG_VMPORT=y
> diff --git a/hw/audio/Kconfig b/hw/audio/Kconfig
> index dedb513..01aea55 100644
> --- a/hw/audio/Kconfig
> +++ b/hw/audio/Kconfig
> @@ -35,6 +35,8 @@ config HDA
>  
>  config PCSPK
>      bool
> +    default y
> +    depends on I8254
>  
>  config WM8750
>      bool
> diff --git a/hw/block/Kconfig b/hw/block/Kconfig
> index f7b9d3a..dc91e67 100644
> --- a/hw/block/Kconfig
> +++ b/hw/block/Kconfig
> @@ -1,5 +1,7 @@
>  config FDC
>      bool
> +    default y
> +    depends on ISA_BUS
>  
>  config SSI_M25P80
>      bool
> diff --git a/hw/char/Kconfig b/hw/char/Kconfig
> index 6eba69a..fc18481 100644
> --- a/hw/char/Kconfig
> +++ b/hw/char/Kconfig
> @@ -3,6 +3,8 @@ config ESCC
>  
>  config PARALLEL
>      bool
> +    default y
> +    depends on ISA_BUS
>  
>  config PL011
>      bool
> @@ -12,11 +14,15 @@ config SERIAL
>  
>  config SERIAL_ISA
>      bool
> +    default y
> +    depends on ISA_BUS
> +    select SERIAL
>  
>  config SERIAL_PCI
>      bool
>      default y if PCI_DEVICES
>      depends on PCI
> +    select SERIAL
>  
>  config VIRTIO_SERIAL
>      bool
> diff --git a/hw/display/Kconfig b/hw/display/Kconfig
> index f8d63c6..64a5764 100644
> --- a/hw/display/Kconfig
> +++ b/hw/display/Kconfig
> @@ -39,9 +39,12 @@ config VGA_PCI
>  
>  config VGA_ISA
>      bool
> +    depends on ISA_BUS
> +    select VGA
>  
>  config VGA_ISA_MM
>      bool
> +    select VGA
>  
>  config VMWARE_VGA
>      bool
> diff --git a/hw/dma/Kconfig b/hw/dma/Kconfig
> index b9ce1c5..751dec5 100644
> --- a/hw/dma/Kconfig
> +++ b/hw/dma/Kconfig
> @@ -9,6 +9,7 @@ config PL330
>  
>  config I82374
>      bool
> +    select I8257
>  
>  config I8257
>      bool
> diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
> index 9a0e559..ff41be3 100644
> --- a/hw/i386/Kconfig
> +++ b/hw/i386/Kconfig
> @@ -10,6 +10,7 @@ config I440FX
>  
>  config ISAPC
>      bool
> +    select ISA_BUS
>  
>  config Q35
>      bool
> diff --git a/hw/ide/Kconfig b/hw/ide/Kconfig
> index 246e27b..ab47b6a 100644
> --- a/hw/ide/Kconfig
> +++ b/hw/ide/Kconfig
> @@ -12,6 +12,7 @@ config IDE_PCI
>  
>  config IDE_ISA
>      bool
> +    depends on ISA_BUS
>      select IDE_QDEV
>  
>  config IDE_PIIX
> diff --git a/hw/input/Kconfig b/hw/input/Kconfig
> index 98a18a1..bdb4237 100644
> --- a/hw/input/Kconfig
> +++ b/hw/input/Kconfig
> @@ -6,6 +6,8 @@ config LM832X
>  
>  config PCKBD
>      bool
> +    default y
> +    depends on ISA_BUS
>  
>  config PL050
>      bool
> diff --git a/hw/isa/Kconfig b/hw/isa/Kconfig
> index b59d074..af68af9 100644
> --- a/hw/isa/Kconfig
> +++ b/hw/isa/Kconfig
> @@ -6,18 +6,25 @@ config APM
>  
>  config I82378
>      bool
> +    select ISA_BUS
>  
>  config PC87312
>      bool
> +    select ISA_BUS
>  
>  config PIIX4
>      bool
> +    select ISA_BUS
>  
>  config VT82C686
>      bool
> +    select ISA_BUS
>  
>  config SMC37C669
>      bool
> +    select ISA_BUS
>  
>  config LPC_ICH9
>      bool
> +    select ISA_BUS
> +    select ACPI_X86_ICH
> diff --git a/hw/misc/Kconfig b/hw/misc/Kconfig
> index c85c085..ca051fb 100644
> --- a/hw/misc/Kconfig
> +++ b/hw/misc/Kconfig
> @@ -1,5 +1,6 @@
>  config APPLESMC
>      bool
> +    depends on ISA_BUS
>  
>  config MAX111X
>      bool
> @@ -12,9 +13,11 @@ config TMP421
>  
>  config ISA_DEBUG
>      bool
> +    depends on ISA_BUS
>  
>  config SGA
>      bool
> +    depends on ISA_BUS
>  
>  config ISA_TESTDEV
>      bool
> @@ -93,6 +96,7 @@ config IOTKIT_SYSINFO
>  
>  config PVPANIC
>      bool
> +    depends on ISA_BUS
>  
>  config AUX
>      bool
> diff --git a/hw/net/Kconfig b/hw/net/Kconfig
> index d50e301..6d15720 100644
> --- a/hw/net/Kconfig
> +++ b/hw/net/Kconfig
> @@ -48,6 +48,9 @@ config LAN9118
>  
>  config NE2000_ISA
>      bool
> +    default y
> +    depends on ISA_BUS
> +    depends on PCI # for NE2000State
>  
>  config OPENCORES_ETH
>      bool
> diff --git a/hw/sparc64/Kconfig b/hw/sparc64/Kconfig
> index 8c13345..41f7295 100644
> --- a/hw/sparc64/Kconfig
> +++ b/hw/sparc64/Kconfig
> @@ -1,5 +1,6 @@
>  config SUN4U
>      bool
> +    select ISA_BUS
>  
>  config NIAGARA
>      bool
> diff --git a/hw/watchdog/Kconfig b/hw/watchdog/Kconfig
> index edb3d42..35ccb72 100644
> --- a/hw/watchdog/Kconfig
> +++ b/hw/watchdog/Kconfig
> @@ -8,6 +8,8 @@ config WDT_IB6300ESB
>  
>  config WDT_IB700
>      bool
> +    default y
> +    depends on ISA_BUS

By the way, for pluggable ISA devices (like NE2000_ISA or WDT_IB700), it
would be great to have a ISA_DEVICES config switch, just like the
"PCI_DEVICES" switch, which the ISA devices should then depend on
instead of "ISA_BUS". Then it would be easier for the users to disable
optional devices in their builds.

 Thomas

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 41/52] isa: express dependencies with kconfig
  2019-01-30 10:53   ` Thomas Huth
@ 2019-01-30 11:13     ` Paolo Bonzini
  2019-01-30 11:32       ` Thomas Huth
  0 siblings, 1 reply; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-30 11:13 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel; +Cc: yang.zhong

On 30/01/19 11:53, Thomas Huth wrote:
>> diff --git a/hw/watchdog/Kconfig b/hw/watchdog/Kconfig
>> index edb3d42..35ccb72 100644
>> --- a/hw/watchdog/Kconfig
>> +++ b/hw/watchdog/Kconfig
>> @@ -8,6 +8,8 @@ config WDT_IB6300ESB
>>  
>>  config WDT_IB700
>>      bool
>> +    default y
>> +    depends on ISA_BUS
> By the way, for pluggable ISA devices (like NE2000_ISA or WDT_IB700), it
> would be great to have a ISA_DEVICES config switch, just like the
> "PCI_DEVICES" switch, which the ISA devices should then depend on
> instead of "ISA_BUS". Then it would be easier for the users to disable
> optional devices in their builds.

Note that the only reason for PCI_DEVICES's existence is that s390x does
not want _all_ PCI devices.  Is there a use case for disabling
CONFIG_ISA_DEVICES but not wanting to base your configuration on
"allnoconfig"?

Paolo

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 41/52] isa: express dependencies with kconfig
  2019-01-30 11:13     ` Paolo Bonzini
@ 2019-01-30 11:32       ` Thomas Huth
  2019-01-30 11:43         ` Paolo Bonzini
  0 siblings, 1 reply; 119+ messages in thread
From: Thomas Huth @ 2019-01-30 11:32 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: yang.zhong

On 2019-01-30 12:13, Paolo Bonzini wrote:
> On 30/01/19 11:53, Thomas Huth wrote:
>>> diff --git a/hw/watchdog/Kconfig b/hw/watchdog/Kconfig
>>> index edb3d42..35ccb72 100644
>>> --- a/hw/watchdog/Kconfig
>>> +++ b/hw/watchdog/Kconfig
>>> @@ -8,6 +8,8 @@ config WDT_IB6300ESB
>>>  
>>>  config WDT_IB700
>>>      bool
>>> +    default y
>>> +    depends on ISA_BUS
>> By the way, for pluggable ISA devices (like NE2000_ISA or WDT_IB700), it
>> would be great to have a ISA_DEVICES config switch, just like the
>> "PCI_DEVICES" switch, which the ISA devices should then depend on
>> instead of "ISA_BUS". Then it would be easier for the users to disable
>> optional devices in their builds.
> 
> Note that the only reason for PCI_DEVICES's existence is that s390x does
> not want _all_ PCI devices.

Oh, I thought this was for convenience. So for s390x, the main problem is
AFAIK that the architecture does not support LSI, so all devices that
require LSI can not work here. Maybe we should introduce a "LSI" switch
instead, so that the boards which provide LSI can select it, and all normal
PCI devices (at least the ones that do not work with MSI only) would
"depend on LSI", too?

> Is there a use case for disabling
> CONFIG_ISA_DEVICES but not wanting to base your configuration on
> "allnoconfig"?

"make allnoconfig" is not working for me yet:

make MINIKCONF="python -B /home/thuth/devel/qemu/scripts/minikconf.py  --" config-all-devices.mak
make[1]: Entering directory `/tmp/qemu-kconfig'
  GEN     x86_64-softmmu/config-devices.mak.tmp
/home/thuth/devel/qemu/scripts/minikconf.py: invalid option --

So I disabled PCI_DEVICES here intead for my tests for the hard
requirements, and then I ran into this error:

hw/net/ne2000-isa.c:65: undefined reference to `ne2000_setup_io'
hw/net/ne2000-isa.c:71: undefined reference to `ne2000_reset'
../hw/net/ne2000-isa.o:(.data.rel+0x1d0): undefined reference to `vmstate_ne2000'
../hw/net/ne2000-isa.o:(.data.rel+0x270): undefined reference to `ne2000_receive'

That's why I thought a CONFIG_ISA_DEVICES switch would be good, too.
But we likely should simply fix the dependency of the NE2000_ISA switch
instead.

 Thomas

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 41/52] isa: express dependencies with kconfig
  2019-01-30 11:32       ` Thomas Huth
@ 2019-01-30 11:43         ` Paolo Bonzini
  0 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-30 11:43 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel; +Cc: yang.zhong

On 30/01/19 12:32, Thomas Huth wrote:
> Oh, I thought this was for convenience. So for s390x, the main problem is
> AFAIK that the architecture does not support LSI, so all devices that
> require LSI can not work here. Maybe we should introduce a "LSI" switch
> instead, so that the boards which provide LSI can select it, and all normal
> PCI devices (at least the ones that do not work with MSI only) would
> "depend on LSI", too?

Makes sense (I would call it "depends on PCI_INTX", or even make it a
negative "depends on !NO_PCI_INTX" that would only be selected by s390).

Another idea is to provide an alternative way

    config X
        imply Y

to write

    config Y
        default y if X

("imply" was added a year or two ago to Kconfig).  This would simplify
writing the configuration for variables such as CONFIG_PCI_DEVICES, and
it would also be useful to express soft dependencies such as

    config PC
        imply PCI_DEVICES
        imply QXL

    config Q35
        imply VTD

etc.  This can be left for future work though.

>> Is there a use case for disabling
>> CONFIG_ISA_DEVICES but not wanting to base your configuration on
>> "allnoconfig"?
> 
> "make allnoconfig" is not working for me yet:
> 
> make MINIKCONF="python -B /home/thuth/devel/qemu/scripts/minikconf.py  --" config-all-devices.mak
> make[1]: Entering directory `/tmp/qemu-kconfig'
>   GEN     x86_64-softmmu/config-devices.mak.tmp
> /home/thuth/devel/qemu/scripts/minikconf.py: invalid option --
> 
> So I disabled PCI_DEVICES here intead for my tests for the hard
> requirements, and then I ran into this error:
> 
> hw/net/ne2000-isa.c:65: undefined reference to `ne2000_setup_io'
> hw/net/ne2000-isa.c:71: undefined reference to `ne2000_reset'
> ../hw/net/ne2000-isa.o:(.data.rel+0x1d0): undefined reference to `vmstate_ne2000'
> ../hw/net/ne2000-isa.o:(.data.rel+0x270): undefined reference to `ne2000_receive'
> 
> That's why I thought a CONFIG_ISA_DEVICES switch would be good, too.
> But we likely should simply fix the dependency of the NE2000_ISA switch
> instead.

Ok!

Paolo

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 41/52] isa: express dependencies with kconfig
  2019-01-25 10:07 ` [Qemu-devel] [PATCH 41/52] isa: express dependencies with kconfig Paolo Bonzini
  2019-01-30 10:53   ` Thomas Huth
@ 2019-01-30 11:58   ` Thomas Huth
  2019-01-30 12:00     ` Yang Zhong
  2019-01-31 21:22   ` Philippe Mathieu-Daudé
  2 siblings, 1 reply; 119+ messages in thread
From: Thomas Huth @ 2019-01-30 11:58 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: yang.zhong

On 2019-01-25 11:07, Paolo Bonzini wrote:
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Yang Zhong <yang.zhong@intel.com>
> Message-Id: <20190123065618.3520-36-yang.zhong@intel.com>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
[...]
> diff --git a/hw/net/Kconfig b/hw/net/Kconfig
> index d50e301..6d15720 100644
> --- a/hw/net/Kconfig
> +++ b/hw/net/Kconfig
> @@ -48,6 +48,9 @@ config LAN9118
>  
>  config NE2000_ISA
>      bool
> +    default y
> +    depends on ISA_BUS
> +    depends on PCI # for NE2000State

 Yang,

for the time being, could you please change the last line into

 depends on NE2000_PCI

instead? Otherwise, it's still possible to enable NE2000_ISA while
NE2000_PCI is disabled, and this will currently result in linking errors.

In the long run, we should likely put the common functions into a
separate file, but that's future work, after your series has been
merged, I think.

 Thanks,
  Thomas

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 41/52] isa: express dependencies with kconfig
  2019-01-30 11:58   ` Thomas Huth
@ 2019-01-30 12:00     ` Yang Zhong
  0 siblings, 0 replies; 119+ messages in thread
From: Yang Zhong @ 2019-01-30 12:00 UTC (permalink / raw)
  To: Thomas Huth; +Cc: qemu-devel, pbonzini, yang.zhong

On Wed, Jan 30, 2019 at 12:58:23PM +0100, Thomas Huth wrote:
> On 2019-01-25 11:07, Paolo Bonzini wrote:
> > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> > Signed-off-by: Yang Zhong <yang.zhong@intel.com>
> > Message-Id: <20190123065618.3520-36-yang.zhong@intel.com>
> > Reviewed-by: Thomas Huth <thuth@redhat.com>
> > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> > ---
> [...]
> > diff --git a/hw/net/Kconfig b/hw/net/Kconfig
> > index d50e301..6d15720 100644
> > --- a/hw/net/Kconfig
> > +++ b/hw/net/Kconfig
> > @@ -48,6 +48,9 @@ config LAN9118
> >  
> >  config NE2000_ISA
> >      bool
> > +    default y
> > +    depends on ISA_BUS
> > +    depends on PCI # for NE2000State
> 
>  Yang,
> 
> for the time being, could you please change the last line into
> 
>  depends on NE2000_PCI
> 
> instead? Otherwise, it's still possible to enable NE2000_ISA while
> NE2000_PCI is disabled, and this will currently result in linking errors.
>
  Yes, i will use "depends on NE2000_PCI" to replace "depends on PCI # for NE2000State". thanks!

  Yang
 
> In the long run, we should likely put the common functions into a
> separate file, but that's future work, after your series has been
> merged, I think.
> 
>  Thanks,
>   Thomas

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 02/52] ide: split ioport registration to a separate file
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 02/52] ide: split ioport registration to a separate file Paolo Bonzini
  2019-01-25 14:53   ` Thomas Huth
@ 2019-01-30 12:07   ` Thomas Huth
  2019-01-30 12:20     ` Paolo Bonzini
  1 sibling, 1 reply; 119+ messages in thread
From: Thomas Huth @ 2019-01-30 12:07 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: yang.zhong, BALATON Zoltan

On 2019-01-25 11:06, Paolo Bonzini wrote:
> This is not needed on ARM, and brings in ISA bus code which is otherwise not
> necessary.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  hw/ide/Makefile.objs |  6 ++---
>  hw/ide/core.c        | 25 --------------------
>  hw/ide/ioport.c      | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 70 insertions(+), 28 deletions(-)
>  create mode 100644 hw/ide/ioport.c
> 
> diff --git a/hw/ide/Makefile.objs b/hw/ide/Makefile.objs
> index fc328ff..3f3edd10 100644
> --- a/hw/ide/Makefile.objs
> +++ b/hw/ide/Makefile.objs
> @@ -1,12 +1,12 @@
>  common-obj-$(CONFIG_IDE_CORE) += core.o atapi.o
>  common-obj-$(CONFIG_IDE_QDEV) += qdev.o
> -common-obj-$(CONFIG_IDE_PCI) += pci.o
> -common-obj-$(CONFIG_IDE_ISA) += isa.o
> +common-obj-$(CONFIG_IDE_PCI) += pci.o ioport.o
> +common-obj-$(CONFIG_IDE_ISA) += isa.o ioport.o
>  common-obj-$(CONFIG_IDE_PIIX) += piix.o
>  common-obj-$(CONFIG_IDE_CMD646) += cmd646.o
>  common-obj-$(CONFIG_IDE_MACIO) += macio.o
>  common-obj-$(CONFIG_IDE_MMIO) += mmio.o
> -common-obj-$(CONFIG_IDE_VIA) += via.o
> +common-obj-$(CONFIG_IDE_VIA) += via.o ioport.o
>  common-obj-$(CONFIG_MICRODRIVE) += microdrive.o
>  common-obj-$(CONFIG_AHCI) += ahci.o
>  common-obj-$(CONFIG_AHCI) += ich.o

This caused some trouble in the "ppc: Express dependencies of the
Sam460EX machines with kconfig" patch - I had to select ISA_BUS there to
avoid linker problems, even though the machine does not use ISA.

I think adding ioport.o to IDE_PCI and IDE_VIA is wrong. The
ide_init_ioport() function is only used by isa.c and piix.c, so it
should only be added for IDE_ISA and IDE_PIIX here.

 Thomas

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 02/52] ide: split ioport registration to a separate file
  2019-01-30 12:07   ` Thomas Huth
@ 2019-01-30 12:20     ` Paolo Bonzini
  2019-01-30 12:55       ` Yang Zhong
  0 siblings, 1 reply; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-30 12:20 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel; +Cc: yang.zhong, BALATON Zoltan

On 30/01/19 13:07, Thomas Huth wrote:
> I think adding ioport.o to IDE_PCI and IDE_VIA is wrong. The
> ide_init_ioport() function is only used by isa.c and piix.c, so it
> should only be added for IDE_ISA and IDE_PIIX here.

Good idea, another one for Yang. :)

Paolo

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 02/52] ide: split ioport registration to a separate file
  2019-01-30 12:20     ` Paolo Bonzini
@ 2019-01-30 12:55       ` Yang Zhong
  2019-01-30 15:55         ` BALATON Zoltan
  0 siblings, 1 reply; 119+ messages in thread
From: Yang Zhong @ 2019-01-30 12:55 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel, Thomas Huth, BALATON Zoltan, yang.zhong

On Wed, Jan 30, 2019 at 01:20:42PM +0100, Paolo Bonzini wrote:
> On 30/01/19 13:07, Thomas Huth wrote:
> > I think adding ioport.o to IDE_PCI and IDE_VIA is wrong. The
> > ide_init_ioport() function is only used by isa.c and piix.c, so it
> > should only be added for IDE_ISA and IDE_PIIX here.
> 
> Good idea, another one for Yang. :)
>
  Yes, for ioport.o, i will add as below: 

  +common-obj-$(CONFIG_IDE_ISA) += isa.o ioport.o
  +common-obj-$(CONFIG_IDE_PIIX) += piix.o ioport.o

  The newest hw/ide/via.c has removed ide_init_ioport() call.

  By the way, i plan to send non-RFC patches 1-27 tomorrow if there is not any new comments. thanks!

  Yang 
 
> Paolo

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 02/52] ide: split ioport registration to a separate file
  2019-01-30 12:55       ` Yang Zhong
@ 2019-01-30 15:55         ` BALATON Zoltan
  0 siblings, 0 replies; 119+ messages in thread
From: BALATON Zoltan @ 2019-01-30 15:55 UTC (permalink / raw)
  To: Yang Zhong; +Cc: Paolo Bonzini, qemu-devel, Thomas Huth, John Snow

On Wed, 30 Jan 2019, Yang Zhong wrote:
> On Wed, Jan 30, 2019 at 01:20:42PM +0100, Paolo Bonzini wrote:
>> On 30/01/19 13:07, Thomas Huth wrote:
>>> I think adding ioport.o to IDE_PCI and IDE_VIA is wrong. The
>>> ide_init_ioport() function is only used by isa.c and piix.c, so it
>>> should only be added for IDE_ISA and IDE_PIIX here.
>>
>> Good idea, another one for Yang. :)
>>
>  Yes, for ioport.o, i will add as below:
>
>  +common-obj-$(CONFIG_IDE_ISA) += isa.o ioport.o
>  +common-obj-$(CONFIG_IDE_PIIX) += piix.o ioport.o
>
>  The newest hw/ide/via.c has removed ide_init_ioport() call.

This was my change. I've changed via.c to implement PCI IDE instead of ISA 
legacy mode that it used to do before (as that's what clients use more). 
However it still needs isa_get_irq() and thus ISA. This IDE controller is 
usually part of VIA superio chips (such as VT82C686 and similar) that have 
ISA and the IRQ seems to be wired to that. This could probably be 
separated further but since device has a register to set IRQ number it 
probably does not worth the added complexity. So it's still not completely 
independent of ISA. (But don't make it dependent on vt82c686 either 
because I'll add another such chip which will also use it later. The 
vt82c686 should depend on via-ide.)

Regards,
BALATON Zoltan

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 32/52] kconfig: introduce kconfig files
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 32/52] kconfig: introduce kconfig files Paolo Bonzini
@ 2019-01-31 13:21   ` Thomas Huth
  2019-01-31 13:37     ` Paolo Bonzini
  0 siblings, 1 reply; 119+ messages in thread
From: Thomas Huth @ 2019-01-31 13:21 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: yang.zhong

On 2019-01-25 11:06, Paolo Bonzini wrote:
[...]
> diff --git a/hw/misc/macio/Kconfig b/hw/misc/macio/Kconfig
> new file mode 100644
> index 0000000..c6caeb6
> --- /dev/null
> +++ b/hw/misc/macio/Kconfig
> @@ -0,0 +1,11 @@
> +config CUDA
> +    bool
> +
> +config MAC_PMU
> +    bool
> +
> +config MAC_DBDMA
> +    bool
> +
> +config MACIO_GPIO
> +    bool
[...]
> diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
> new file mode 100644
> index 0000000..9da9d7d
> --- /dev/null
> +++ b/hw/ppc/Kconfig
[...]
> +
> +config MAC_DBDMA
> +    bool
> +
> +config MAC_PMU
> +    bool
> +
> +config XIVE
> +    bool
> +
> +config MACIO_GPIO
> +    bool
> +
> +config XIVE_SPAPR
> +    bool
> +
> +config CUDA
> +    bool

I just noticed that the config switches from hw/misc/macio/Kconfig are
duplicated here. Kind of ugly. Would it be possible to define them only
in one place?

 Thomas

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 32/52] kconfig: introduce kconfig files
  2019-01-31 13:21   ` Thomas Huth
@ 2019-01-31 13:37     ` Paolo Bonzini
  0 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-31 13:37 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel; +Cc: yang.zhong

On 31/01/19 14:21, Thomas Huth wrote:
> On 2019-01-25 11:06, Paolo Bonzini wrote:
> [...]
>> diff --git a/hw/misc/macio/Kconfig b/hw/misc/macio/Kconfig
>> new file mode 100644
>> index 0000000..c6caeb6
>> --- /dev/null
>> +++ b/hw/misc/macio/Kconfig
>> @@ -0,0 +1,11 @@
>> +config CUDA
>> +    bool
>> +
>> +config MAC_PMU
>> +    bool
>> +
>> +config MAC_DBDMA
>> +    bool
>> +
>> +config MACIO_GPIO
>> +    bool
> [...]
>> diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
>> new file mode 100644
>> index 0000000..9da9d7d
>> --- /dev/null
>> +++ b/hw/ppc/Kconfig
> [...]
>> +
>> +config MAC_DBDMA
>> +    bool
>> +
>> +config MAC_PMU
>> +    bool
>> +
>> +config XIVE
>> +    bool
>> +
>> +config MACIO_GPIO
>> +    bool
>> +
>> +config XIVE_SPAPR
>> +    bool
>> +
>> +config CUDA
>> +    bool
> 
> I just noticed that the config switches from hw/misc/macio/Kconfig are
> duplicated here. Kind of ugly. Would it be possible to define them only
> in one place?

Yes, of course.  It's also a good idea to detect duplicate "config"
directives.

Paolo

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (52 preceding siblings ...)
  2019-01-25 11:07 ` [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Yang Zhong
@ 2019-01-31 17:56 ` no-reply
  2019-01-31 21:57 ` no-reply
                   ` (7 subsequent siblings)
  61 siblings, 0 replies; 119+ messages in thread
From: no-reply @ 2019-01-31 17:56 UTC (permalink / raw)
  To: pbonzini; +Cc: fam, qemu-devel, yang.zhong, thuth

Patchew URL: https://patchew.org/QEMU/1548410831-19553-1-git-send-email-pbonzini@redhat.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Subject: [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU
Type: series
Message-id: 1548410831-19553-1-git-send-email-pbonzini@redhat.com

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
dbc584d8e4 kconfig: introduce CONFIG_TEST_DEVICES
8152c3cdcd i386-softmmu.mak: remove all CONFIG_* except boards definitions
9125dc81b3 isa: express SuperIO dependencies with Kconfig
d5069fb84d tpm: express dependencies with Kconfig
95cedf00b5 virtio: express virtio dependencies with Kconfig
c08aa5bf58 vfio: express vfio dependencies with Kconfig
fd1c33aa2b hyperv: express dependencies with kconfig
113498fae7 display: express dependencies with kconfig
a8e13fa63b ptimer: express dependencies with Kconfig
a1bc5ac825 i2c: express dependencies with Kconfig
77fbb8a4f9 i386: express dependencies with Kconfig
15f86dff14 isa: express dependencies with kconfig
07a5dd70ec scsi: express dependencies with Kconfig
e3be0ba561 build: convert usb.mak to Kconfig
289f8ee6eb build: convert sound.mak to Kconfig
cc9459f304 build: convert pci.mak to Kconfig
e9e0f95878 hw/pci/Makefile.objs: make pcie configurable
cb484d2faa ide: express dependencies with Kconfig
34ef087788 minikconf: implement allnoconfig and defconfig
6d20af9496 build: switch to Kconfig
633d26b675 kconfig: introduce kconfig files
6894a6f9ac hw/display: make edid configurable
545dfba6e3 minikconfig: add semantic analysis
3f7644c209 minikconfig: add AST
019214c143 minikconfig: add parser skeleton
471f15950f hw/vfio/Makefile.objs: Create new CONFIG_* variables for VFIO core and PCI
f73711c181 hw/i2c/Makefile.objs: Create new CONFIG_* variables for EEPROM and ACPI controller
6d368d08e3 hw/tricore/Makefile.objs: Create CONFIG_* for tricore
0ffeea9e1d hw/openrisc/Makefile.objs: Create CONFIG_* for openrisc
3bb75e756c hw/moxie/Makefile.objs: Conditionally build moxie
9254086f91 hw/hppa/Makefile.objs: Create CONFIG_* for hppa
48afb37c92 hw/cris/Makefile.objs: Create CONFIG_* for cris
5e20c54774 hw/alpha/Makefile.objs: Create CONFIG_* for alpha
166db688d0 hw/sparc64/Makefile.objs: Create CONFIG_* for sparc64
901c168998 hw/riscv/Makefile.objs: Create CONFIG_* for riscv boards
dfad8241eb hw/nios2/Makefile.objs: Conditionally build nios2
18a4fba2fa hw/xtensa/Makefile.objs: Build xtensa_sim and xtensa_fpga conditionally
7a747835ae hw/lm32/Makefile.objs: Conditionally build lm32 and milkmyst
d9c2d7c8c5 hw/sparc/Makefile.objs: CONFIG_* for sun4m and leon3 created
4f9987bbfa hw/s390/Makefile.objs: Create new CONFIG_* variables for s390x boards and devices
dae7848cc4 hw/sh4/Makefile.objs: New CONFIG_* varibales created for sh4 boards and device
d89b1b3045 hw/ppc/Makefile.objs: Build all boards conditinally with CONFIG_*
18c42d91d1 hw/mips/Makefile.objs: Create CONFIG_* for r4k, malta, mipssim boards
a6753004dc hw/microblaze/Makefile.objs: Create configs for petalogix and xilinx boards
70e6a3881f hw/m68k/Makefile.objs: Conditionally build boards
89445f8a5c hw/arm/Makefile.objs: CONFIG_VIRT created for virt board
074cee383c hw/i386/Makefile.objs: Build pc_piix* and pc_q35 boards
562fe684db build: actually use CONFIG_PAM
af189a2289 hw/pci-host/Makefile.objs: make CONFIGS clear for PCI EXPRESS
144835aff2 vfio: move conditional up to hw/Makefile.objs
8318087cea ide: split ioport registration to a separate file
f0334c7173 arm: disable CONFIG_SERIAL_ISA

=== OUTPUT BEGIN ===
1/52 Checking commit f0334c717327 (arm: disable CONFIG_SERIAL_ISA)
2/52 Checking commit 8318087ceaae (ide: split ioport registration to a separate file)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#71: 
new file mode 100644

WARNING: Block comments use a leading /* on a separate line
#132: FILE: hw/ide/ioport.c:57:
+    /* ??? Assume only ISA and PCI configurations, and that the PCI-ISA

WARNING: Block comments use * on subsequent lines
#133: FILE: hw/ide/ioport.c:58:
+    /* ??? Assume only ISA and PCI configurations, and that the PCI-ISA
+       bridge has been setup properly to always register with ISA.  */

WARNING: Block comments use a trailing */ on a separate line
#133: FILE: hw/ide/ioport.c:58:
+       bridge has been setup properly to always register with ISA.  */

total: 0 errors, 4 warnings, 113 lines checked

Patch 2/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
3/52 Checking commit 144835aff233 (vfio: move conditional up to hw/Makefile.objs)
4/52 Checking commit af189a22894e (hw/pci-host/Makefile.objs: make CONFIGS clear for PCI EXPRESS)
5/52 Checking commit 562fe684db9d (build: actually use CONFIG_PAM)
6/52 Checking commit 074cee383cdd (hw/i386/Makefile.objs: Build pc_piix* and pc_q35 boards)
7/52 Checking commit 89445f8a5c91 (hw/arm/Makefile.objs: CONFIG_VIRT created for virt board)
8/52 Checking commit 70e6a3881fa2 (hw/m68k/Makefile.objs: Conditionally build boards)
9/52 Checking commit a6753004dcac (hw/microblaze/Makefile.objs: Create configs for petalogix and xilinx boards)
10/52 Checking commit 18c42d91d100 (hw/mips/Makefile.objs: Create CONFIG_* for r4k, malta, mipssim boards)
11/52 Checking commit d89b1b3045d9 (hw/ppc/Makefile.objs: Build all boards conditinally with CONFIG_*)
12/52 Checking commit dae7848cc4c2 (hw/sh4/Makefile.objs: New CONFIG_* varibales created for sh4 boards and device)
13/52 Checking commit 4f9987bbfa0f (hw/s390/Makefile.objs: Create new CONFIG_* variables for s390x boards and devices)
14/52 Checking commit d9c2d7c8c5b8 (hw/sparc/Makefile.objs: CONFIG_* for sun4m and leon3 created)
15/52 Checking commit 7a747835ae3a (hw/lm32/Makefile.objs: Conditionally build lm32 and milkmyst)
16/52 Checking commit 18a4fba2fae2 (hw/xtensa/Makefile.objs: Build xtensa_sim and xtensa_fpga conditionally)
17/52 Checking commit dfad8241eb23 (hw/nios2/Makefile.objs: Conditionally build nios2)
18/52 Checking commit 901c168998a7 (hw/riscv/Makefile.objs: Create CONFIG_* for riscv boards)
19/52 Checking commit 166db688d08e (hw/sparc64/Makefile.objs: Create CONFIG_* for sparc64)
20/52 Checking commit 5e20c547748d (hw/alpha/Makefile.objs: Create CONFIG_* for alpha)
21/52 Checking commit 48afb37c926a (hw/cris/Makefile.objs: Create CONFIG_* for cris)
22/52 Checking commit 9254086f9151 (hw/hppa/Makefile.objs: Create CONFIG_* for hppa)
23/52 Checking commit 3bb75e756cee (hw/moxie/Makefile.objs: Conditionally build moxie)
24/52 Checking commit 0ffeea9e1dd8 (hw/openrisc/Makefile.objs: Create CONFIG_* for openrisc)
25/52 Checking commit 6d368d08e36a (hw/tricore/Makefile.objs: Create CONFIG_* for tricore)
26/52 Checking commit f73711c18197 (hw/i2c/Makefile.objs: Create new CONFIG_* variables for EEPROM and ACPI controller)
27/52 Checking commit 471f15950f23 (hw/vfio/Makefile.objs: Create new CONFIG_* variables for VFIO core and PCI)
28/52 Checking commit 019214c143ad (minikconfig: add parser skeleton)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#35: 
new file mode 100644

WARNING: line over 80 characters
#251: FILE: scripts/minikconf.py:212:
+                           'Expected identifier starting with "CONFIG_"', TOK_NONE)

WARNING: line over 80 characters
#344: FILE: scripts/minikconf.py:305:
+            raise KconfigParserError(self, 'expected "source", "config", identifier, '

WARNING: line over 80 characters
#370: FILE: scripts/minikconf.py:331:
+            raise KconfigParserError(self, 'expected "source", "config" or identifier')

ERROR: line over 90 characters
#395: FILE: scripts/minikconf.py:356:
+        if self.src[self.cursor + length].isalnum() or self.src[self.cursor + length] == '|':

WARNING: line over 80 characters
#448: FILE: scripts/minikconf.py:409:
+            while self.src[self.cursor].isalnum() or self.src[self.cursor] == '_':

total: 1 errors, 5 warnings, 425 lines checked

Patch 28/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

29/52 Checking commit 3f7644c20919 (minikconfig: add AST)
WARNING: line over 80 characters
#89: FILE: scripts/minikconf.py:86:
+                return "config %s default %s if %s" % (self.dest, value, self.cond)

total: 0 errors, 1 warnings, 170 lines checked

Patch 29/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
30/52 Checking commit 545dfba6e34b (minikconfig: add semantic analysis)
WARNING: line over 80 characters
#112: FILE: scripts/minikconf.py:102:
+                raise Exception('contradiction between clauses when setting %s' % self)

WARNING: line over 80 characters
#215: FILE: scripts/minikconf.py:214:
+            debug_print(i, "->", [str(x) for x in self.referenced_vars[i].outgoing])

total: 0 errors, 2 warnings, 223 lines checked

Patch 30/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
31/52 Checking commit 6894a6f9ac98 (hw/display: make edid configurable)
32/52 Checking commit 633d26b67534 (kconfig: introduce kconfig files)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#44: 
new file mode 100644

WARNING: line over 80 characters
#1762: FILE: scripts/minikconf.py:636:
+        print ("%s: at least one argument is required" % argv[0], file=sys.stderr)

total: 0 errors, 2 warnings, 1363 lines checked

Patch 32/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
33/52 Checking commit 6d20af9496e7 (build: switch to Kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#481: 
deleted file mode 100644

total: 0 errors, 1 warnings, 325 lines checked

Patch 33/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
34/52 Checking commit 34ef0877882f (minikconf: implement allnoconfig and defconfig)
35/52 Checking commit cb484d2faa02 (ide: express dependencies with Kconfig)
36/52 Checking commit e9e0f95878f9 (hw/pci/Makefile.objs: make pcie configurable)
37/52 Checking commit cc9459f304c7 (build: convert pci.mak to Kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#120: 
deleted file mode 100644

total: 0 errors, 1 warnings, 472 lines checked

Patch 37/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
38/52 Checking commit 289f8ee6ebea (build: convert sound.mak to Kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#70: 
deleted file mode 100644

total: 0 errors, 1 warnings, 51 lines checked

Patch 38/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
39/52 Checking commit e3be0ba56197 (build: convert usb.mak to Kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#158: 
deleted file mode 100644

total: 0 errors, 1 warnings, 157 lines checked

Patch 39/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
40/52 Checking commit 07a5dd70ec98 (scsi: express dependencies with Kconfig)
41/52 Checking commit 15f86dff14a3 (isa: express dependencies with kconfig)
42/52 Checking commit 77fbb8a4f9a3 (i386: express dependencies with Kconfig)
43/52 Checking commit a1bc5ac825b6 (i2c: express dependencies with Kconfig)
44/52 Checking commit a8e13fa63b07 (ptimer: express dependencies with Kconfig)
45/52 Checking commit 113498fae707 (display: express dependencies with kconfig)
46/52 Checking commit fd1c33aa2b65 (hyperv: express dependencies with kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#17: 
deleted file mode 100644

total: 0 errors, 1 warnings, 15 lines checked

Patch 46/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
47/52 Checking commit c08aa5bf58f4 (vfio: express vfio dependencies with Kconfig)
48/52 Checking commit 95cedf00b5f9 (virtio: express virtio dependencies with Kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#37: 
deleted file mode 100644

total: 0 errors, 1 warnings, 109 lines checked

Patch 48/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
49/52 Checking commit d5069fb84d2c (tpm: express dependencies with Kconfig)
50/52 Checking commit 9125dc81b384 (isa: express SuperIO dependencies with Kconfig)
51/52 Checking commit 8152c3cdcd36 (i386-softmmu.mak: remove all CONFIG_* except boards definitions)
52/52 Checking commit dbc584d8e473 (kconfig: introduce CONFIG_TEST_DEVICES)
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/1548410831-19553-1-git-send-email-pbonzini@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@redhat.com

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 41/52] isa: express dependencies with kconfig
  2019-01-25 10:07 ` [Qemu-devel] [PATCH 41/52] isa: express dependencies with kconfig Paolo Bonzini
  2019-01-30 10:53   ` Thomas Huth
  2019-01-30 11:58   ` Thomas Huth
@ 2019-01-31 21:22   ` Philippe Mathieu-Daudé
  2019-01-31 22:14     ` Paolo Bonzini
  2 siblings, 1 reply; 119+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-01-31 21:22 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: yang.zhong, thuth

Hi Paolo,

On 1/25/19 11:07 AM, Paolo Bonzini wrote:
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Yang Zhong <yang.zhong@intel.com>
> Message-Id: <20190123065618.3520-36-yang.zhong@intel.com>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  default-configs/i386-softmmu.mak | 9 ---------
>  hw/audio/Kconfig                 | 2 ++
>  hw/block/Kconfig                 | 2 ++
>  hw/char/Kconfig                  | 6 ++++++
>  hw/display/Kconfig               | 3 +++
>  hw/dma/Kconfig                   | 1 +
>  hw/i386/Kconfig                  | 1 +
>  hw/ide/Kconfig                   | 1 +
>  hw/input/Kconfig                 | 2 ++
>  hw/isa/Kconfig                   | 7 +++++++
>  hw/misc/Kconfig                  | 4 ++++
>  hw/net/Kconfig                   | 3 +++
>  hw/sparc64/Kconfig               | 1 +
>  hw/watchdog/Kconfig              | 2 ++
>  14 files changed, 35 insertions(+), 9 deletions(-)
> 
> diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmmu.mak
> index 4073c62..8e6a810 100644
> --- a/default-configs/i386-softmmu.mak
> +++ b/default-configs/i386-softmmu.mak
> @@ -8,19 +8,12 @@ CONFIG_VGA_ISA=y
>  CONFIG_VMWARE_VGA=y
>  CONFIG_VMXNET3_PCI=y
>  CONFIG_VIRTIO_VGA=y
> -CONFIG_VMMOUSE=y
>  CONFIG_IPMI=y
>  CONFIG_IPMI_LOCAL=y
>  CONFIG_IPMI_EXTERN=y
>  CONFIG_ISA_IPMI_KCS=y
>  CONFIG_ISA_IPMI_BT=y
> -CONFIG_SERIAL=y
> -CONFIG_SERIAL_ISA=y
> -CONFIG_PARALLEL=y
>  CONFIG_I8254=y
> -CONFIG_PCSPK=y
> -CONFIG_PCKBD=y
> -CONFIG_FDC=y
>  CONFIG_ACPI=y
>  CONFIG_ACPI_X86=y
>  CONFIG_ACPI_X86_ICH=y
> @@ -30,14 +23,12 @@ CONFIG_APM=y
>  CONFIG_I8257=y
>  CONFIG_IDE_ISA=y
>  CONFIG_IDE_PIIX=y
> -CONFIG_NE2000_ISA=y
>  CONFIG_HPET=y
>  CONFIG_APPLESMC=y
>  CONFIG_I8259=y
>  CONFIG_PFLASH_CFI01=y
>  CONFIG_MC146818RTC=y
>  CONFIG_PCI_PIIX=y
> -CONFIG_WDT_IB700=y
>  CONFIG_ISA_DEBUG=y
>  CONFIG_ISA_TESTDEV=y
>  CONFIG_VMPORT=y
> diff --git a/hw/audio/Kconfig b/hw/audio/Kconfig
> index dedb513..01aea55 100644
> --- a/hw/audio/Kconfig
> +++ b/hw/audio/Kconfig
> @@ -35,6 +35,8 @@ config HDA
>  
>  config PCSPK
>      bool
> +    default y
> +    depends on I8254
>  
>  config WM8750
>      bool
> diff --git a/hw/block/Kconfig b/hw/block/Kconfig
> index f7b9d3a..dc91e67 100644
> --- a/hw/block/Kconfig
> +++ b/hw/block/Kconfig
> @@ -1,5 +1,7 @@
>  config FDC
>      bool
> +    default y
> +    depends on ISA_BUS
>  
>  config SSI_M25P80
>      bool
> diff --git a/hw/char/Kconfig b/hw/char/Kconfig
> index 6eba69a..fc18481 100644
> --- a/hw/char/Kconfig
> +++ b/hw/char/Kconfig
> @@ -3,6 +3,8 @@ config ESCC
>  
>  config PARALLEL
>      bool
> +    default y
> +    depends on ISA_BUS
>  
>  config PL011
>      bool
> @@ -12,11 +14,15 @@ config SERIAL
>  
>  config SERIAL_ISA
>      bool
> +    default y
> +    depends on ISA_BUS
> +    select SERIAL
>  
>  config SERIAL_PCI
>      bool
>      default y if PCI_DEVICES
>      depends on PCI
> +    select SERIAL
>  
>  config VIRTIO_SERIAL
>      bool
> diff --git a/hw/display/Kconfig b/hw/display/Kconfig
> index f8d63c6..64a5764 100644
> --- a/hw/display/Kconfig
> +++ b/hw/display/Kconfig
> @@ -39,9 +39,12 @@ config VGA_PCI
>  
>  config VGA_ISA
>      bool
> +    depends on ISA_BUS
> +    select VGA
>  
>  config VGA_ISA_MM
>      bool
> +    select VGA
>  
>  config VMWARE_VGA
>      bool
> diff --git a/hw/dma/Kconfig b/hw/dma/Kconfig
> index b9ce1c5..751dec5 100644
> --- a/hw/dma/Kconfig
> +++ b/hw/dma/Kconfig
> @@ -9,6 +9,7 @@ config PL330
>  
>  config I82374
>      bool
> +    select I8257
>  
>  config I8257
>      bool
> diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
> index 9a0e559..ff41be3 100644
> --- a/hw/i386/Kconfig
> +++ b/hw/i386/Kconfig
> @@ -10,6 +10,7 @@ config I440FX
>  
>  config ISAPC
>      bool
> +    select ISA_BUS
>  
>  config Q35
>      bool
> diff --git a/hw/ide/Kconfig b/hw/ide/Kconfig
> index 246e27b..ab47b6a 100644
> --- a/hw/ide/Kconfig
> +++ b/hw/ide/Kconfig
> @@ -12,6 +12,7 @@ config IDE_PCI
>  
>  config IDE_ISA
>      bool
> +    depends on ISA_BUS
>      select IDE_QDEV
>  
>  config IDE_PIIX
> diff --git a/hw/input/Kconfig b/hw/input/Kconfig
> index 98a18a1..bdb4237 100644
> --- a/hw/input/Kconfig
> +++ b/hw/input/Kconfig
> @@ -6,6 +6,8 @@ config LM832X
>  
>  config PCKBD
>      bool
> +    default y
> +    depends on ISA_BUS
>  
>  config PL050
>      bool
> diff --git a/hw/isa/Kconfig b/hw/isa/Kconfig
> index b59d074..af68af9 100644
> --- a/hw/isa/Kconfig
> +++ b/hw/isa/Kconfig
> @@ -6,18 +6,25 @@ config APM
>  
>  config I82378
>      bool
> +    select ISA_BUS
>  
>  config PC87312
>      bool
> +    select ISA_BUS
>  
>  config PIIX4
>      bool
> +    select ISA_BUS
>  
>  config VT82C686
>      bool
> +    select ISA_BUS
>  
>  config SMC37C669
>      bool
> +    select ISA_BUS

I kinda disagree with the SuperIO generated configs here, but partly my
fault because the previous Makefile.objs missed the CONFIG_ISA_SUPERIO
(I missed to review eae2e2e96bf from Thomas where is introduced
CONFIG_SMC37C669).
So introducing ISA_SUPERIO simplifies this files and SouthBridge
devices. I'm not sure how to provide this patch:

 # generic SuperIO
 config ISA_SUPERIO
     bool
     select ISA_BUS
     select SERIAL_ISA
     select PARALLEL
     select FDC
     select IDE_ISA

 config PC87312
     bool
     select ISA_SUPERIO
     select I8259
     select I8254
     select I8257
     select MC146818RTC

 config SMC37C669
     bool
     select ISA_SUPERIO

I'll see, if the changes are trivial you can cherry-pick at the correct
place in your branch.

>  
>  config LPC_ICH9
>      bool
> +    select ISA_BUS
> +    select ACPI_X86_ICH
> diff --git a/hw/misc/Kconfig b/hw/misc/Kconfig
> index c85c085..ca051fb 100644
> --- a/hw/misc/Kconfig
> +++ b/hw/misc/Kconfig
> @@ -1,5 +1,6 @@
>  config APPLESMC
>      bool
> +    depends on ISA_BUS
>  
>  config MAX111X
>      bool
> @@ -12,9 +13,11 @@ config TMP421
>  
>  config ISA_DEBUG
>      bool
> +    depends on ISA_BUS
>  
>  config SGA
>      bool
> +    depends on ISA_BUS
>  
>  config ISA_TESTDEV
>      bool
> @@ -93,6 +96,7 @@ config IOTKIT_SYSINFO
>  
>  config PVPANIC
>      bool
> +    depends on ISA_BUS
>  
>  config AUX
>      bool
> diff --git a/hw/net/Kconfig b/hw/net/Kconfig
> index d50e301..6d15720 100644
> --- a/hw/net/Kconfig
> +++ b/hw/net/Kconfig
> @@ -48,6 +48,9 @@ config LAN9118
>  
>  config NE2000_ISA
>      bool
> +    default y
> +    depends on ISA_BUS
> +    depends on PCI # for NE2000State
>  
>  config OPENCORES_ETH
>      bool
> diff --git a/hw/sparc64/Kconfig b/hw/sparc64/Kconfig
> index 8c13345..41f7295 100644
> --- a/hw/sparc64/Kconfig
> +++ b/hw/sparc64/Kconfig
> @@ -1,5 +1,6 @@
>  config SUN4U
>      bool
> +    select ISA_BUS
>  
>  config NIAGARA
>      bool
> diff --git a/hw/watchdog/Kconfig b/hw/watchdog/Kconfig
> index edb3d42..35ccb72 100644
> --- a/hw/watchdog/Kconfig
> +++ b/hw/watchdog/Kconfig
> @@ -8,6 +8,8 @@ config WDT_IB6300ESB
>  
>  config WDT_IB700
>      bool
> +    default y
> +    depends on ISA_BUS
>  
>  config WDT_DIAG288
>      bool
> 

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 40/52] scsi: express dependencies with Kconfig
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 40/52] scsi: express dependencies with Kconfig Paolo Bonzini
@ 2019-01-31 21:23   ` Philippe Mathieu-Daudé
  2019-01-31 22:11     ` Paolo Bonzini
  0 siblings, 1 reply; 119+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-01-31 21:23 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: yang.zhong, thuth

On 1/25/19 11:06 AM, Paolo Bonzini wrote:
> This automatically removes the SCSI subsystem from the
> binary altogether if no controllers are selected.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Yang Zhong <yang.zhong@intel.com>
> Message-Id: <20190123065618.3520-34-yang.zhong@intel.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  hw/scsi/Kconfig       | 11 ++++++++++-
>  hw/scsi/Makefile.objs |  2 +-
>  hw/usb/Kconfig        |  2 ++
>  3 files changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/scsi/Kconfig b/hw/scsi/Kconfig
> index c02d880..b9cf269 100644
> --- a/hw/scsi/Kconfig
> +++ b/hw/scsi/Kconfig
> @@ -5,24 +5,29 @@ config LSI_SCSI_PCI
>      bool
>      default y if PCI_DEVICES
>      depends on PCI
> +    select SCSI
>  
>  config MPTSAS_SCSI_PCI
>      bool
>      default y if PCI_DEVICES
>      depends on PCI
> +    select SCSI
>  
>  config MEGASAS_SCSI_PCI
>      bool
>      default y if PCI_DEVICES
>      depends on PCI
> +    select SCSI
>  
>  config VMW_PVSCSI_SCSI_PCI
>      bool
>      default y if PCI_DEVICES
>      depends on PCI
> +    select SCSI
>  
>  config ESP
>      bool
> +    select SCSI
>  
>  config ESP_PCI
>      bool
> @@ -34,10 +39,14 @@ config SPAPR_VSCSI
>      bool
>      default y
>      depends on PSERIES
> +    select SCSI
>  
>  config VIRTIO_SCSI
>      bool
> +    select SCSI
>  
>  config VHOST_USER_SCSI
>      bool
> -    default y if VHOST_USER && LINUX
> +    # Only PCI devices are provided for now
> +    default y if VIRTIO_PCI
> +    depends on VHOST_USER && LINUX
> diff --git a/hw/scsi/Makefile.objs b/hw/scsi/Makefile.objs
> index 45167ba..54b36ed 100644
> --- a/hw/scsi/Makefile.objs
> +++ b/hw/scsi/Makefile.objs
> @@ -6,7 +6,7 @@ common-obj-$(CONFIG_MEGASAS_SCSI_PCI) += megasas.o

You missed:

-common-obj-y += scsi-disk.o emulation.o
-common-obj-y += scsi-generic.o scsi-bus.o
+common-obj-$(CONFIG_SCSI) += scsi-disk.o emulation.o
+common-obj-$(CONFIG_SCSI) += scsi-generic.o scsi-bus.o

>  common-obj-$(CONFIG_VMW_PVSCSI_SCSI_PCI) += vmw_pvscsi.o
>  common-obj-$(CONFIG_ESP) += esp.o
>  common-obj-$(CONFIG_ESP_PCI) += esp-pci.o
> -obj-$(CONFIG_PSERIES) += spapr_vscsi.o
> +obj-$(CONFIG_SPAPR_VSCSI) += spapr_vscsi.o
>  
>  ifeq ($(CONFIG_VIRTIO_SCSI),y)
>  obj-y += virtio-scsi.o virtio-scsi-dataplane.o
> diff --git a/hw/usb/Kconfig b/hw/usb/Kconfig
> index e20670a..a1b7acb 100644
> --- a/hw/usb/Kconfig
> +++ b/hw/usb/Kconfig
> @@ -52,11 +52,13 @@ config USB_STORAGE_BOT
>      bool
>      default y
>      depends on USB
> +    select SCSI
>  
>  config USB_STORAGE_UAS
>      bool
>      default y
>      depends on USB
> +    select SCSI
>  
>  config USB_AUDIO
>      bool
> 

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 50/52] isa: express SuperIO dependencies with Kconfig
  2019-01-25 10:07 ` [Qemu-devel] [PATCH 50/52] isa: express SuperIO " Paolo Bonzini
@ 2019-01-31 21:26   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 119+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-01-31 21:26 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: yang.zhong, thuth

On 1/25/19 11:07 AM, Paolo Bonzini wrote:
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  default-configs/alpha-softmmu.mak |  5 -----
>  default-configs/ppc-softmmu.mak   |  9 ---------
>  default-configs/sh4-softmmu.mak   |  9 ++-------
>  default-configs/sh4eb-softmmu.mak |  6 ------
>  hw/isa/Kconfig                    | 21 +++++++++++++++++++++
>  5 files changed, 23 insertions(+), 27 deletions(-)
> 
> diff --git a/default-configs/alpha-softmmu.mak b/default-configs/alpha-softmmu.mak
> index f44c5bc..2ad4d40 100644
> --- a/default-configs/alpha-softmmu.mak
> +++ b/default-configs/alpha-softmmu.mak
> @@ -2,13 +2,8 @@
>  
>  CONFIG_PCI=y
>  CONFIG_PCI_DEVICES=y
> -CONFIG_SERIAL=y
> -CONFIG_SERIAL_ISA=y
>  CONFIG_I82374=y
>  CONFIG_I8254=y
> -CONFIG_I8257=y
> -CONFIG_PARALLEL=y
> -CONFIG_FDC=y
>  CONFIG_PCKBD=y
>  CONFIG_VGA_CIRRUS=y
>  CONFIG_VMWARE_VGA=y
> diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
> index f38c14c..87c2d6d 100644
> --- a/default-configs/ppc-softmmu.mak
> +++ b/default-configs/ppc-softmmu.mak
> @@ -8,12 +8,10 @@ CONFIG_ISA_BUS=y
>  CONFIG_PPC4XX=y
>  CONFIG_M48T59=y
>  CONFIG_SERIAL=y
> -CONFIG_I8257=y
>  CONFIG_OPENPIC=y
>  CONFIG_PPCE500_PCI=y
>  CONFIG_PFLASH_CFI01=y
>  CONFIG_PFLASH_CFI02=y
> -CONFIG_I8259=y
>  CONFIG_XILINX=y
>  CONFIG_XILINX_ETHLITE=y
>  CONFIG_E500=y
> @@ -59,18 +57,11 @@ CONFIG_MAC_NEWWORLD=y
>  # For PReP
>  CONFIG_PREP=y
>  CONFIG_PREP_PCI=y
> -CONFIG_SERIAL_ISA=y
> -CONFIG_MC146818RTC=y
>  CONFIG_ISA_TESTDEV=y
>  CONFIG_RS6000_MC=y
> -CONFIG_PARALLEL=y
>  CONFIG_I82374=y
>  CONFIG_I82378=y
> -CONFIG_I8254=y
>  CONFIG_PCKBD=y
> -CONFIG_FDC=y
>  CONFIG_NE2000_ISA=y
>  CONFIG_PC87312=y
> -CONFIG_PCSPK=y
> -CONFIG_IDE_ISA=y
>  CONFIG_CS4231A=y
> diff --git a/default-configs/sh4-softmmu.mak b/default-configs/sh4-softmmu.mak
> index 9e8e487..1b4582a 100644
> --- a/default-configs/sh4-softmmu.mak
> +++ b/default-configs/sh4-softmmu.mak
> @@ -1,9 +1,8 @@
> -# Default configuration for sh4-softmmu
> +# Default configuration for sh4eb-softmmu
>  
>  CONFIG_PCI=y
>  CONFIG_PCI_DEVICES=y
>  CONFIG_SERIAL=y
> -CONFIG_SERIAL_ISA=y
>  CONFIG_PFLASH_CFI02=y
>  CONFIG_SH4=y
>  CONFIG_IDE_MMIO=y
> @@ -12,11 +11,7 @@ CONFIG_I2C=y
>  CONFIG_DDC=y
>  CONFIG_ISA_TESTDEV=y
>  CONFIG_I82378=y
> -CONFIG_I8259=y
> -CONFIG_I8254=y
> -CONFIG_PCSPK=y
>  CONFIG_I82374=y
> -CONFIG_I8257=y
> -CONFIG_MC146818RTC=y
>  CONFIG_R2D=y
>  CONFIG_SHIX=y
> +CONFIG_TEST_DEVICES=y
> diff --git a/default-configs/sh4eb-softmmu.mak b/default-configs/sh4eb-softmmu.mak
> index 2a26946..baed9a4 100644
> --- a/default-configs/sh4eb-softmmu.mak
> +++ b/default-configs/sh4eb-softmmu.mak
> @@ -3,7 +3,6 @@
>  CONFIG_PCI=y
>  CONFIG_PCI_DEVICES=y
>  CONFIG_SERIAL=y
> -CONFIG_SERIAL_ISA=y
>  CONFIG_PFLASH_CFI02=y
>  CONFIG_SH4=y
>  CONFIG_IDE_MMIO=y
> @@ -12,11 +11,6 @@ CONFIG_I2C=y
>  CONFIG_DDC=y
>  CONFIG_ISA_TESTDEV=y
>  CONFIG_I82378=y
> -CONFIG_I8259=y
> -CONFIG_I8254=y
> -CONFIG_PCSPK=y
>  CONFIG_I82374=y
> -CONFIG_I8257=y
> -CONFIG_MC146818RTC=y
>  CONFIG_R2D=y
>  CONFIG_SHIX=y
> diff --git a/hw/isa/Kconfig b/hw/isa/Kconfig
> index fcd87b4..34711d0 100644
> --- a/hw/isa/Kconfig
> +++ b/hw/isa/Kconfig
> @@ -7,26 +7,47 @@ config APM
>  config I82378
>      bool
>      select ISA_BUS
> +    select I8259
> +    select I8254
> +    select I8257
> +    select MC146818RTC
>  
>  config PC87312
>      bool
>      select ISA_BUS
> +    select I8259
> +    select I8254
> +    select I8257
> +    select MC146818RTC
> +    select SERIAL_ISA
> +    select PARALLEL
> +    select FDC
> +    select IDE_ISA
>  
>  config PIIX4
>      bool
> +    # For historical reasons, SuperIO devices are created in the board
> +    # for PIIX4.
>      select ISA_BUS
>  
>  config VT82C686
>      bool
>      select ISA_BUS
>      select ACPI_SMBUS
> +    select SERIAL_ISA
> +    select FDC
>  
>  config SMC37C669
>      bool
>      select ISA_BUS
> +    select SERIAL_ISA
> +    select PARALLEL
> +    select FDC
>  
>  config LPC_ICH9
>      bool
> +    # For historical reasons, SuperIO devices are created in the board
> +    # for ICH9.
>      select ISA_BUS
>      select ACPI_SMBUS
>      select ACPI_X86_ICH
> 

Now I see this patch, so my suggestions on patch #41 of this series go here.

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 33/52] build: switch to Kconfig
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 33/52] build: switch to Kconfig Paolo Bonzini
@ 2019-01-31 21:48   ` Philippe Mathieu-Daudé
  2019-01-31 22:15     ` Paolo Bonzini
  2019-02-04 15:45     ` Anthony PERARD
  0 siblings, 2 replies; 119+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-01-31 21:48 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel, Stefano Stabellini, Anthony Perard,
	Paul Durrant
  Cc: yang.zhong, thuth

Hi Paolo,

On 1/25/19 11:06 AM, Paolo Bonzini wrote:
> The make_device_config.sh script is replaced by minikconf, which
> is modified to support the same command line as its predecessor.
> 
> The roots of the parsing are default-configs/*.mak, Kconfig.host and
> hw/Kconfig.  One difference with make_device_config.sh is that all symbols
> have to be defined in a Kconfig file, including those coming from the
> configure script.  This is the reason for the Kconfig.host file introduced
> in the previous patch. Whenever a file in default-configs/*.mak used
> $(...) to refer to a config-host.mak symbol, this is replaced by a
> Kconfig dependency; this part must be done already in this patch
> for bisectability.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Yang Zhong <yang.zhong@intel.com>
> Acked-by: Thomas Huth <thuth@redhat.com>
> Message-Id: <20190123065618.3520-28-yang.zhong@intel.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  Kconfig.host                      |  3 ++-
>  Makefile                          | 19 ++++++++++++++++---
>  Makefile.target                   |  7 ++++++-
>  configure                         |  3 +++
>  default-configs/arm-softmmu.mak   |  2 --
>  default-configs/i386-softmmu.mak  |  5 +----
>  default-configs/lm32-softmmu.mak  |  1 -
>  default-configs/pci.mak           |  1 -
>  default-configs/ppc-softmmu.mak   |  1 -
>  default-configs/ppc64-softmmu.mak |  6 ------
>  default-configs/s390x-softmmu.mak |  4 +---
>  default-configs/virtio.mak        |  3 ---
>  hw/9pfs/Kconfig                   |  1 +
>  hw/block/Kconfig                  |  1 +
>  hw/display/Kconfig                |  4 ++++
>  hw/i386/Kconfig                   |  6 +++++-
>  hw/input/Kconfig                  |  5 +++++
>  hw/intc/Kconfig                   | 12 ++++++++++++
>  hw/misc/Kconfig                   |  2 ++
>  hw/ppc/Kconfig                    |  4 ++++
>  hw/scsi/Kconfig                   |  6 ++++++
>  hw/tpm/Kconfig                    |  2 ++
>  hw/vfio/Kconfig                   | 11 +++++++++++
>  rules.mak                         |  2 +-
>  scripts/make_device_config.sh     | 30 ------------------------------
>  25 files changed, 83 insertions(+), 58 deletions(-)
>  delete mode 100644 scripts/make_device_config.sh
> 
> diff --git a/Kconfig.host b/Kconfig.host
> index f43f418..3772627 100644
> --- a/Kconfig.host
> +++ b/Kconfig.host
> @@ -1,5 +1,6 @@
>  # These are "proxy" symbols used to pass config-host.mak values
> -# down to Kconfig.
> +# down to Kconfig.  See also MINIKCONF_ARGS in the Makefile:
> +# these two need to be kept in sync.
>  
>  config KVM
>      bool
> diff --git a/Makefile b/Makefile
> index de898ea..70b9aec 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -326,9 +326,22 @@ endif
>  
>  -include $(SUBDIR_DEVICES_MAK_DEP)
>  
> -%/config-devices.mak: default-configs/%.mak $(SRC_PATH)/scripts/make_device_config.sh
> -	$(call quiet-command, \
> -            $(SHELL) $(SRC_PATH)/scripts/make_device_config.sh $< $*-config-devices.mak.d $@ > $@.tmp,"GEN","$@.tmp")
> +# This has to be kept in sync with Kconfig.host.
> +MINIKCONF_ARGS = \
> +    $@ $*-config.devices.mak.d $< $(MINIKCONF_INPUTS) \
> +    CONFIG_KVM=$(CONFIG_KVM) \
> +    CONFIG_SPICE=$(CONFIG_SPICE) \
> +    CONFIG_TPM=$(CONFIG_TPM) \
> +    CONFIG_XEN=$(CONFIG_XEN) \

There is something I don't understand here: Does CONFIG_XEN in
Kconfig.host take precedence over the target configs? I'm looking at
these configs:

 if supported_xen_target $target; then
     echo "CONFIG_XEN=n" >> $config_target_mak
     if test "$xen_pci_passthrough" = yes; then
         echo "CONFIG_XEN_PCI_PASSTHROUGH=y" >> "$config_target_mak"
     fi
 fi

It seems Kconfig.host has precedence over them, so if all targets are
trying to build with Xen even if they don't support it.

I cc'ed the Xen team, it would be nice if one of them also tests this.

> +    CONFIG_OPENGL=$(CONFIG_OPENGL) \
> +    CONFIG_VHOST_USER=$(CONFIG_VHOST_USER) \
> +    CONFIG_LINUX=$(CONFIG_LINUX)
> +
> +MINIKCONF_INPUTS = $(SRC_PATH)/Kconfig.host $(SRC_PATH)/hw/Kconfig
> +MINIKCONF = $(PYTHON) $(SRC_PATH)/scripts/minikconf.py \
> +
> +%/config-devices.mak: default-configs/%.mak $(MINIKCONF_INPUTS)
> +	$(call quiet-command, $(MINIKCONF) $(MINIKCONF_ARGS) > $@.tmp, "GEN", "$@.tmp")
>  	$(call quiet-command, if test -f $@; then \
>  	  if cmp -s $@.old $@; then \
>  	    mv $@.tmp $@; \
> diff --git a/Makefile.target b/Makefile.target
> index 39f72e8..f31692c 100644
> --- a/Makefile.target
> +++ b/Makefile.target
> @@ -4,9 +4,12 @@ BUILD_DIR?=$(CURDIR)/..
>  
>  include ../config-host.mak
>  include config-target.mak
> -include config-devices.mak
>  include $(SRC_PATH)/rules.mak
>  
> +ifdef CONFIG_SOFTMMU
> +include config-devices.mak
> +endif
> +
>  $(call set-vpath, $(SRC_PATH):$(BUILD_DIR))
>  ifdef CONFIG_LINUX
>  QEMU_CFLAGS += -I../linux-headers
> @@ -190,7 +193,9 @@ all-obj-$(CONFIG_SOFTMMU) += $(crypto-obj-y)
>  all-obj-$(CONFIG_SOFTMMU) += $(io-obj-y)
>  all-obj-$(CONFIG_SOFTMMU) += $(slirp-obj-y)
>  
> +ifdef CONFIG_SOFTMMU
>  $(QEMU_PROG_BUILD): config-devices.mak
> +endif
>  
>  COMMON_LDADDS = ../libqemuutil.a
>  
> diff --git a/configure b/configure
> index 8f312ac..dae1b67 100755
> --- a/configure
> +++ b/configure
> @@ -7377,12 +7377,15 @@ if supported_xen_target $target; then
>  fi
>  if supported_kvm_target $target; then
>      echo "CONFIG_KVM=y" >> $config_target_mak
> +    echo "$target/config-devices.mak: CONFIG_KVM=y" >> $config_host_mak
>      if test "$vhost_net" = "yes" ; then
>          echo "CONFIG_VHOST_NET=y" >> $config_target_mak
>          if test "$vhost_user" = "yes" ; then
>              echo "CONFIG_VHOST_USER_NET_TEST_$target_name=y" >> $config_host_mak
>          fi
>      fi
> +else
> +    echo "$target/config-devices.mak: CONFIG_KVM=n" >> $config_host_mak
>  fi
>  if supported_hax_target $target; then
>      echo "CONFIG_HAX=y" >> $config_target_mak
> diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
> index 4f0ecba..b0995a0 100644
> --- a/default-configs/arm-softmmu.mak
> +++ b/default-configs/arm-softmmu.mak
> @@ -51,7 +51,6 @@ CONFIG_ARM_V7M=y
>  CONFIG_NETDUINO2=y
>  
>  CONFIG_ARM_GIC=y
> -CONFIG_ARM_GIC_KVM=$(CONFIG_KVM)
>  CONFIG_ARM_TIMER=y
>  CONFIG_ARM_MPTIMER=y
>  CONFIG_A9_GTIMER=y
> @@ -123,7 +122,6 @@ CONFIG_VERSATILE_PCI=y
>  CONFIG_VERSATILE_I2C=y
>  
>  CONFIG_PCI_EXPRESS_GENERIC_BRIDGE=y
> -CONFIG_VFIO=$(CONFIG_LINUX)
>  CONFIG_VFIO_PLATFORM=y
>  CONFIG_VFIO_XGMAC=y
>  CONFIG_VFIO_AMD_XGBE=y
> diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmmu.mak
> index 15b6287..412c8c5 100644
> --- a/default-configs/i386-softmmu.mak
> +++ b/default-configs/i386-softmmu.mak
> @@ -4,7 +4,6 @@ include pci.mak
>  include sound.mak
>  include usb.mak
>  include hyperv.mak
> -CONFIG_QXL=$(CONFIG_SPICE)
>  CONFIG_VGA_ISA=y
>  CONFIG_VGA_CIRRUS=y
>  CONFIG_VMWARE_VGA=y
> @@ -37,8 +36,6 @@ CONFIG_HPET=y
>  CONFIG_APPLESMC=y
>  CONFIG_I8259=y
>  CONFIG_PFLASH_CFI01=y
> -CONFIG_TPM_TIS=$(CONFIG_TPM)
> -CONFIG_TPM_CRB=$(CONFIG_TPM)
>  CONFIG_MC146818RTC=y
>  CONFIG_PCI_PIIX=y
>  CONFIG_WDT_IB700=y
> @@ -66,9 +63,9 @@ CONFIG_ACPI_SMBUS=y
>  CONFIG_SMBUS_EEPROM=y
>  CONFIG_FW_CFG_DMA=y
>  CONFIG_I2C=y
> -CONFIG_SEV=$(CONFIG_KVM)
>  CONFIG_VTD=y
>  CONFIG_AMD_IOMMU=y
>  CONFIG_PAM=y
> +CONFIG_PC=y
>  CONFIG_I440FX=y
>  CONFIG_Q35=y
> diff --git a/default-configs/lm32-softmmu.mak b/default-configs/lm32-softmmu.mak
> index 4889348..ef0f4ba 100644
> --- a/default-configs/lm32-softmmu.mak
> +++ b/default-configs/lm32-softmmu.mak
> @@ -2,7 +2,6 @@
>  
>  CONFIG_LM32=y
>  CONFIG_MILKYMIST=y
> -CONFIG_MILKYMIST_TMU2=$(CONFIG_OPENGL)
>  CONFIG_FRAMEBUFFER=y
>  CONFIG_PTIMER=y
>  CONFIG_PFLASH_CFI01=y
> diff --git a/default-configs/pci.mak b/default-configs/pci.mak
> index 0552190..3d4c71d 100644
> --- a/default-configs/pci.mak
> +++ b/default-configs/pci.mak
> @@ -47,6 +47,5 @@ CONFIG_VGA_PCI=y
>  CONFIG_BOCHS_DISPLAY=y
>  CONFIG_IVSHMEM_DEVICE=$(CONFIG_IVSHMEM)
>  CONFIG_ROCKER=y
> -CONFIG_VFIO=$(CONFIG_LINUX)
>  CONFIG_VFIO_PCI=y
>  CONFIG_EDID=y
> diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
> index 52acb7c..90118cb 100644
> --- a/default-configs/ppc-softmmu.mak
> +++ b/default-configs/ppc-softmmu.mak
> @@ -18,7 +18,6 @@ CONFIG_I8259=y
>  CONFIG_XILINX=y
>  CONFIG_XILINX_ETHLITE=y
>  CONFIG_E500=y
> -CONFIG_OPENPIC_KVM=$(call land,$(CONFIG_E500),$(CONFIG_KVM))
>  CONFIG_PLATFORM_BUS=y
>  CONFIG_ETSEC=y
>  CONFIG_PPC405=y
> diff --git a/default-configs/ppc64-softmmu.mak b/default-configs/ppc64-softmmu.mak
> index ccd7b17..a0a9151 100644
> --- a/default-configs/ppc64-softmmu.mak
> +++ b/default-configs/ppc64-softmmu.mak
> @@ -13,12 +13,6 @@ CONFIG_ISA_IPMI_BT=y
>  # For pSeries
>  CONFIG_PSERIES=y
>  CONFIG_VIRTIO_VGA=y
> -CONFIG_XICS=$(CONFIG_PSERIES)
> -CONFIG_XICS_SPAPR=$(CONFIG_PSERIES)
> -CONFIG_XICS_KVM=$(call land,$(CONFIG_PSERIES),$(CONFIG_KVM))
> -CONFIG_XIVE=$(CONFIG_PSERIES)
> -CONFIG_XIVE_SPAPR=$(CONFIG_PSERIES)
> -CONFIG_VFIO_SPAPR=$(CONFIG_PSERIES)
>  CONFIG_MEM_DEVICE=y
>  CONFIG_DIMM=y
>  CONFIG_SPAPR_RNG=y
> diff --git a/default-configs/s390x-softmmu.mak b/default-configs/s390x-softmmu.mak
> index 6f2c6ce..2794ffb 100644
> --- a/default-configs/s390x-softmmu.mak
> +++ b/default-configs/s390x-softmmu.mak
> @@ -1,12 +1,10 @@
>  CONFIG_PCI=y
> -CONFIG_VIRTIO_PCI=$(CONFIG_PCI)
> +CONFIG_VIRTIO_PCI=y
>  include virtio.mak
>  CONFIG_SCLPCONSOLE=y
>  CONFIG_TERMINAL3270=y
>  CONFIG_S390_FLIC=y
> -CONFIG_S390_FLIC_KVM=$(CONFIG_KVM)
>  CONFIG_WDT_DIAG288=y
>  CONFIG_S390_CCW_VIRTIO=y
> -CONFIG_VFIO=$(CONFIG_LINUX)
>  CONFIG_VFIO_CCW=y
>  CONFIG_VFIO_AP=y
> diff --git a/default-configs/virtio.mak b/default-configs/virtio.mak
> index ecb4420..51599ed 100644
> --- a/default-configs/virtio.mak
> +++ b/default-configs/virtio.mak
> @@ -1,5 +1,3 @@
> -CONFIG_VHOST_USER_SCSI=$(call land,$(CONFIG_VHOST_USER),$(CONFIG_LINUX))
> -CONFIG_VHOST_USER_BLK=$(call land,$(CONFIG_VHOST_USER),$(CONFIG_LINUX))
>  CONFIG_VIRTIO=y
>  CONFIG_VIRTIO_9P=$(CONFIG_VIRTFS)
>  CONFIG_VIRTIO_BALLOON=y
> @@ -12,4 +10,3 @@ CONFIG_VIRTIO_RNG=y
>  CONFIG_SCSI=y
>  CONFIG_VIRTIO_SCSI=y
>  CONFIG_VIRTIO_SERIAL=y
> -CONFIG_VIRTIO_INPUT_HOST=$(CONFIG_LINUX)
> diff --git a/hw/9pfs/Kconfig b/hw/9pfs/Kconfig
> index be8e5b3..84d2366 100644
> --- a/hw/9pfs/Kconfig
> +++ b/hw/9pfs/Kconfig
> @@ -2,3 +2,4 @@ config VIRTFS
>  
>  config VIRTIO_9P
>      bool
> +    default y if VIRTFS
> diff --git a/hw/block/Kconfig b/hw/block/Kconfig
> index 9d418bc..1780569 100644
> --- a/hw/block/Kconfig
> +++ b/hw/block/Kconfig
> @@ -27,3 +27,4 @@ config VIRTIO_BLK
>  
>  config VHOST_USER_BLK
>      bool
> +    default y if VHOST_USER && LINUX
> diff --git a/hw/display/Kconfig b/hw/display/Kconfig
> index d5c022c..429056b 100644
> --- a/hw/display/Kconfig
> +++ b/hw/display/Kconfig
> @@ -51,6 +51,8 @@ config FRAMEBUFFER
>  
>  config MILKYMIST_TMU2
>      bool
> +    default y
> +    depends on OPENGL
>  
>  config SM501
>      bool
> @@ -66,6 +68,8 @@ config VGA
>  
>  config QXL
>      bool
> +    default y if PC
> +    depends on SPICE && PCI
>  
>  config VIRTIO_GPU
>      bool
> diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
> index 2dbe2b5..9a0e559 100644
> --- a/hw/i386/Kconfig
> +++ b/hw/i386/Kconfig
> @@ -1,4 +1,8 @@
> -config KVM
> +config SEV
> +    bool
> +    default y if PC && KVM
> +
> +config PC
>      bool
>  
>  config I440FX
> diff --git a/hw/input/Kconfig b/hw/input/Kconfig
> index 91bae47..98a18a1 100644
> --- a/hw/input/Kconfig
> +++ b/hw/input/Kconfig
> @@ -19,5 +19,10 @@ config TSC2005
>  config VIRTIO_INPUT
>      bool
>  
> +config VIRTIO_INPUT_HOST
> +    bool
> +    default y if LINUX
> +    depends on LINUX
> +
>  config TSC210X
>      bool
> diff --git a/hw/intc/Kconfig b/hw/intc/Kconfig
> index 69adbd1..6eea14e 100644
> --- a/hw/intc/Kconfig
> +++ b/hw/intc/Kconfig
> @@ -21,18 +21,28 @@ config APIC
>  
>  config ARM_GIC_KVM
>      bool
> +    default y
> +    depends on ARM_GIC && KVM
>  
>  config OPENPIC_KVM
>      bool
> +    default y
> +    depends on OPENPIC && KVM
>  
>  config XICS
>      bool
> +    default y
> +    depends on PSERIES
>  
>  config XICS_SPAPR
>      bool
> +    default y
> +    depends on PSERIES
>  
>  config XICS_KVM
>      bool
> +    default y
> +    depends on XICS && KVM
>  
>  config ALLWINNER_A10_PIC
>      bool
> @@ -42,6 +52,8 @@ config S390_FLIC
>  
>  config S390_FLIC_KVM
>      bool
> +    default y
> +    depends on S390_FLIC && KVM
>  
>  config OMPIC
>      bool
> diff --git a/hw/misc/Kconfig b/hw/misc/Kconfig
> index c006b04..cc8dbed 100644
> --- a/hw/misc/Kconfig
> +++ b/hw/misc/Kconfig
> @@ -48,6 +48,8 @@ config MACIO
>  
>  config IVSHMEM_DEVICE
>      bool
> +    default y
> +    depends on PCI
>  
>  config ECCMEMCTL
>      bool
> diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
> index 9da9d7d..b0095e1 100644
> --- a/hw/ppc/Kconfig
> +++ b/hw/ppc/Kconfig
> @@ -45,12 +45,16 @@ config MAC_PMU
>  
>  config XIVE
>      bool
> +    default y
> +    depends on PSERIES
>  
>  config MACIO_GPIO
>      bool
>  
>  config XIVE_SPAPR
>      bool
> +    default y
> +    depends on PSERIES
>  
>  config CUDA
>      bool
> diff --git a/hw/scsi/Kconfig b/hw/scsi/Kconfig
> index eb78478..834413b 100644
> --- a/hw/scsi/Kconfig
> +++ b/hw/scsi/Kconfig
> @@ -19,8 +19,14 @@ config ESP
>  config ESP_PCI
>      bool
>  
> +config SPAPR_VSCSI
> +    bool
> +    default y
> +    depends on PSERIES
> +
>  config VIRTIO_SCSI
>      bool
>  
>  config VHOST_USER_SCSI
>      bool
> +    default y if VHOST_USER && LINUX
> diff --git a/hw/tpm/Kconfig b/hw/tpm/Kconfig
> index 2eee8eb..db57388 100644
> --- a/hw/tpm/Kconfig
> +++ b/hw/tpm/Kconfig
> @@ -3,6 +3,8 @@ config TPM
>  
>  config TPM_TIS
>      bool
> +    default y if PC
> +    depends on TPM
>  
>  config TPM_CRB
>      bool
> diff --git a/hw/vfio/Kconfig b/hw/vfio/Kconfig
> index 31d8dfc..f896779 100644
> --- a/hw/vfio/Kconfig
> +++ b/hw/vfio/Kconfig
> @@ -1,17 +1,26 @@
>  config VFIO
>      bool
> +    depends on LINUX
>  
>  config VFIO_PCI
>      bool
> +    select VFIO
> +    depends on LINUX
>  
>  config VFIO_SPAPR
>      bool
> +    default y
> +    depends on VFIO && LINUX && PSERIES
>  
>  config VFIO_CCW
>      bool
> +    select VFIO
> +    depends on LINUX
>  
>  config VFIO_PLATFORM
>      bool
> +    select VFIO
> +    depends on LINUX
>  
>  config VFIO_XGMAC
>      bool
> @@ -21,3 +30,5 @@ config VFIO_AMD_XGBE
>  
>  config VFIO_AP
>      bool
> +    select VFIO
> +    depends on LINUX
> diff --git a/rules.mak b/rules.mak
> index 86e033d..62cf02e 100644
> --- a/rules.mak
> +++ b/rules.mak
> @@ -144,7 +144,7 @@ cc-option = $(if $(shell $(CC) $1 $2 -S -o /dev/null -xc /dev/null \
>  cc-c-option = $(if $(shell $(CC) $1 $2 -c -o /dev/null -xc /dev/null \
>                  >/dev/null 2>&1 && echo OK), $2, $3)
>  
> -VPATH_SUFFIXES = %.c %.h %.S %.cc %.cpp %.m %.mak %.texi %.sh %.rc
> +VPATH_SUFFIXES = %.c %.h %.S %.cc %.cpp %.m %.mak %.texi %.sh %.rc Kconfig%
>  set-vpath = $(if $1,$(foreach PATTERN,$(VPATH_SUFFIXES),$(eval vpath $(PATTERN) $1)))
>  
>  # install-prog list, dir
> diff --git a/scripts/make_device_config.sh b/scripts/make_device_config.sh
> deleted file mode 100644
> index 354af31..0000000
> --- a/scripts/make_device_config.sh
> +++ /dev/null
> @@ -1,30 +0,0 @@
> -#! /bin/sh
> -# Writes a target device config file to stdout, from a default and from
> -# include directives therein.  Also emits Makefile dependencies.
> -#
> -# Usage: make_device_config.sh SRC DEPFILE-NAME DEPFILE-TARGET > DEST
> -
> -src=$1
> -dep=$2
> -target=$3
> -src_dir=$(dirname $src)
> -all_includes=
> -
> -process_includes () {
> -  cat $1 | grep '^include' | \
> -  while read include file ; do
> -    all_includes="$all_includes $src_dir/$file"
> -    process_includes $src_dir/$file
> -  done
> -}
> -
> -f=$src
> -while [ -n "$f" ] ; do
> -  f=$(cat $f | tr -d '\r' | awk '/^include / {printf "'$src_dir'/%s ", $2}')
> -  [ $? = 0 ] || exit 1
> -  all_includes="$all_includes $f"
> -done
> -process_includes $src
> -
> -cat $src $all_includes | grep -v '^include'
> -echo "$target: $all_includes" > $dep
> 

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 10/52] hw/mips/Makefile.objs: Create CONFIG_* for r4k, malta, mipssim boards
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 10/52] hw/mips/Makefile.objs: Create CONFIG_* for r4k, malta, mipssim boards Paolo Bonzini
@ 2019-01-31 21:50   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 119+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-01-31 21:50 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: yang.zhong, thuth, Ákos Kovács

On 1/25/19 11:06 AM, Paolo Bonzini wrote:
> From: Ákos Kovács <akoskovacs@gmx.com>
> 
> Add the new configs to default-configs/mips*-sofmmu.mak.
> 
> Signed-off-by: Ákos Kovács <akoskovacs@gmx.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Yang Zhong <yang.zhong@intel.com>
> Message-Id: <20190123065618.3520-8-yang.zhong@intel.com>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> ---
>  default-configs/mips-softmmu-common.mak | 3 +++
>  hw/mips/Makefile.objs                   | 5 +++--
>  2 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/default-configs/mips-softmmu-common.mak b/default-configs/mips-softmmu-common.mak
> index fae2347..479fb4d 100644
> --- a/default-configs/mips-softmmu-common.mak
> +++ b/default-configs/mips-softmmu-common.mak
> @@ -36,3 +36,6 @@ CONFIG_EMPTY_SLOT=y
>  CONFIG_MIPS_CPS=y
>  CONFIG_MIPS_ITU=y
>  CONFIG_I2C=y
> +CONFIG_R4K=y
> +CONFIG_MALTA=y
> +CONFIG_MIPSSIM=y
> diff --git a/hw/mips/Makefile.objs b/hw/mips/Makefile.objs
> index 17a311a..525809a 100644
> --- a/hw/mips/Makefile.objs
> +++ b/hw/mips/Makefile.objs
> @@ -1,7 +1,8 @@
> -obj-y += mips_r4k.o mips_malta.o mips_mipssim.o
>  obj-y += addr.o mips_int.o
> +obj-$(CONFIG_R4K) += mips_r4k.o
> +obj-$(CONFIG_MALTA) += gt64xxx_pci.o mips_malta.o
> +obj-$(CONFIG_MIPSSIM) += mips_mipssim.o
>  obj-$(CONFIG_JAZZ) += mips_jazz.o
>  obj-$(CONFIG_FULONG) += mips_fulong2e.o
> -obj-y += gt64xxx_pci.o
>  obj-$(CONFIG_MIPS_CPS) += cps.o
>  obj-$(CONFIG_MIPS_BOSTON) += boston.o
> 

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 05/52] build: actually use CONFIG_PAM
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 05/52] build: actually use CONFIG_PAM Paolo Bonzini
@ 2019-01-31 21:50   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 119+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-01-31 21:50 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: yang.zhong, thuth

On 1/25/19 11:06 AM, Paolo Bonzini wrote:
> Do not link it unconditionally into all binaries.

Nice :)

> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Yang Zhong <yang.zhong@intel.com>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> Message-Id: <20190123065618.3520-3-yang.zhong@intel.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> ---
>  default-configs/i386-softmmu.mak | 1 +
>  hw/pci-host/Makefile.objs        | 2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmmu.mak
> index 2f919df..48da996 100644
> --- a/default-configs/i386-softmmu.mak
> +++ b/default-configs/i386-softmmu.mak
> @@ -67,3 +67,4 @@ CONFIG_I2C=y
>  CONFIG_SEV=$(CONFIG_KVM)
>  CONFIG_VTD=y
>  CONFIG_AMD_IOMMU=y
> +CONFIG_PAM=y
> diff --git a/hw/pci-host/Makefile.objs b/hw/pci-host/Makefile.objs
> index 073d512..a9cd3e0 100644
> --- a/hw/pci-host/Makefile.objs
> +++ b/hw/pci-host/Makefile.objs
> @@ -1,4 +1,4 @@
> -common-obj-y += pam.o
> +common-obj-$(CONFIG_PAM) += pam.o
>  
>  # PPC devices
>  common-obj-$(CONFIG_PREP_PCI) += prep.o
> 

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 31/52] hw/display: make edid configurable
  2019-01-25 10:06 ` [Qemu-devel] [PATCH 31/52] hw/display: make edid configurable Paolo Bonzini
@ 2019-01-31 21:53   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 119+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-01-31 21:53 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: yang.zhong, thuth

On 1/25/19 11:06 AM, Paolo Bonzini wrote:
> From: Yang Zhong <yang.zhong@intel.com>
> 
> Use CONFIG_EDID to make edid-generate.c and edid-region.c
> configurable.
> 
> Signed-off-by: Yang Zhong <yang.zhong@intel.com>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> Message-Id: <20190123065618.3520-26-yang.zhong@intel.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> ---
>  default-configs/pci.mak  | 1 +
>  hw/display/Makefile.objs | 4 +---
>  2 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/default-configs/pci.mak b/default-configs/pci.mak
> index 037636f..0552190 100644
> --- a/default-configs/pci.mak
> +++ b/default-configs/pci.mak
> @@ -49,3 +49,4 @@ CONFIG_IVSHMEM_DEVICE=$(CONFIG_IVSHMEM)
>  CONFIG_ROCKER=y
>  CONFIG_VFIO=$(CONFIG_LINUX)
>  CONFIG_VFIO_PCI=y
> +CONFIG_EDID=y
> diff --git a/hw/display/Makefile.objs b/hw/display/Makefile.objs
> index 97acd5b..a8e23c8 100644
> --- a/hw/display/Makefile.objs
> +++ b/hw/display/Makefile.objs
> @@ -1,4 +1,4 @@
> -common-obj-y += edid-generate.o
> +common-obj-$(CONFIG_EDID) += edid-generate.o edid-region.o
>  
>  common-obj-$(CONFIG_FW_CFG_DMA) += ramfb.o
>  common-obj-$(CONFIG_FW_CFG_DMA) += ramfb-standalone.o
> @@ -15,12 +15,10 @@ common-obj-$(CONFIG_SSD0323) += ssd0323.o
>  common-obj-$(CONFIG_XEN) += xenfb.o
>  
>  common-obj-$(CONFIG_VGA_PCI) += vga-pci.o
> -common-obj-$(CONFIG_VGA_PCI) += edid-region.o
>  common-obj-$(CONFIG_VGA_ISA) += vga-isa.o
>  common-obj-$(CONFIG_VGA_ISA_MM) += vga-isa-mm.o
>  common-obj-$(CONFIG_VMWARE_VGA) += vmware_vga.o
>  common-obj-$(CONFIG_BOCHS_DISPLAY) += bochs-display.o
> -common-obj-$(CONFIG_BOCHS_DISPLAY) += edid-region.o
>  
>  common-obj-$(CONFIG_BLIZZARD) += blizzard.o
>  common-obj-$(CONFIG_EXYNOS4) += exynos4210_fimd.o
> 

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (53 preceding siblings ...)
  2019-01-31 17:56 ` no-reply
@ 2019-01-31 21:57 ` no-reply
  2019-01-31 21:58 ` no-reply
                   ` (6 subsequent siblings)
  61 siblings, 0 replies; 119+ messages in thread
From: no-reply @ 2019-01-31 21:57 UTC (permalink / raw)
  To: pbonzini; +Cc: fam, qemu-devel, yang.zhong, thuth

Patchew URL: https://patchew.org/QEMU/1548410831-19553-1-git-send-email-pbonzini@redhat.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Subject: [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU
Type: series
Message-id: 1548410831-19553-1-git-send-email-pbonzini@redhat.com

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 t [tag update]            patchew/1548410831-19553-1-git-send-email-pbonzini@redhat.com -> patchew/1548410831-19553-1-git-send-email-pbonzini@redhat.com
Switched to a new branch 'test'
12539e4899 kconfig: introduce CONFIG_TEST_DEVICES
2fadac69d9 i386-softmmu.mak: remove all CONFIG_* except boards definitions
8c1fb84ff4 isa: express SuperIO dependencies with Kconfig
8e3174384e tpm: express dependencies with Kconfig
7ffb3fa21b virtio: express virtio dependencies with Kconfig
5a72a0c385 vfio: express vfio dependencies with Kconfig
a597633380 hyperv: express dependencies with kconfig
1ef5cc5fb7 display: express dependencies with kconfig
fdd2c128b7 ptimer: express dependencies with Kconfig
fdf78be1f4 i2c: express dependencies with Kconfig
9b937662f4 i386: express dependencies with Kconfig
583608364d isa: express dependencies with kconfig
7a26eaae95 scsi: express dependencies with Kconfig
74950a85f9 build: convert usb.mak to Kconfig
069934d3cb build: convert sound.mak to Kconfig
5d186272f9 build: convert pci.mak to Kconfig
f08f56a670 hw/pci/Makefile.objs: make pcie configurable
f4642a7c62 ide: express dependencies with Kconfig
5a452a1fc1 minikconf: implement allnoconfig and defconfig
8aa73695da build: switch to Kconfig
26b1ac2c0b kconfig: introduce kconfig files
c4119d6e81 hw/display: make edid configurable
9a6e43617c minikconfig: add semantic analysis
afcf405ac2 minikconfig: add AST
2f64711b7c minikconfig: add parser skeleton
18ac9b6814 hw/vfio/Makefile.objs: Create new CONFIG_* variables for VFIO core and PCI
5e30d1f03e hw/i2c/Makefile.objs: Create new CONFIG_* variables for EEPROM and ACPI controller
8254b1b5e1 hw/tricore/Makefile.objs: Create CONFIG_* for tricore
150eb60214 hw/openrisc/Makefile.objs: Create CONFIG_* for openrisc
b1fe09618b hw/moxie/Makefile.objs: Conditionally build moxie
baf0d866cb hw/hppa/Makefile.objs: Create CONFIG_* for hppa
13aa0274be hw/cris/Makefile.objs: Create CONFIG_* for cris
1098821e31 hw/alpha/Makefile.objs: Create CONFIG_* for alpha
aa55c758c4 hw/sparc64/Makefile.objs: Create CONFIG_* for sparc64
3d4876ad59 hw/riscv/Makefile.objs: Create CONFIG_* for riscv boards
c2ce7cf461 hw/nios2/Makefile.objs: Conditionally build nios2
60bf62c31c hw/xtensa/Makefile.objs: Build xtensa_sim and xtensa_fpga conditionally
6a9dfa037f hw/lm32/Makefile.objs: Conditionally build lm32 and milkmyst
e341e43ea7 hw/sparc/Makefile.objs: CONFIG_* for sun4m and leon3 created
c02d4cdf59 hw/s390/Makefile.objs: Create new CONFIG_* variables for s390x boards and devices
d90d4f8bb0 hw/sh4/Makefile.objs: New CONFIG_* varibales created for sh4 boards and device
aa9c376735 hw/ppc/Makefile.objs: Build all boards conditinally with CONFIG_*
4feddc17c4 hw/mips/Makefile.objs: Create CONFIG_* for r4k, malta, mipssim boards
d681b512df hw/microblaze/Makefile.objs: Create configs for petalogix and xilinx boards
8a86443748 hw/m68k/Makefile.objs: Conditionally build boards
9321f38d4c hw/arm/Makefile.objs: CONFIG_VIRT created for virt board
67293f7ac0 hw/i386/Makefile.objs: Build pc_piix* and pc_q35 boards
a2f1b83828 build: actually use CONFIG_PAM
48ca0b0bb0 hw/pci-host/Makefile.objs: make CONFIGS clear for PCI EXPRESS
f9385aff8c vfio: move conditional up to hw/Makefile.objs
3c1f0c425e ide: split ioport registration to a separate file
de15bc290e arm: disable CONFIG_SERIAL_ISA

=== OUTPUT BEGIN ===
1/52 Checking commit de15bc290e9c (arm: disable CONFIG_SERIAL_ISA)
2/52 Checking commit 3c1f0c425e86 (ide: split ioport registration to a separate file)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#71: 
new file mode 100644

WARNING: Block comments use a leading /* on a separate line
#132: FILE: hw/ide/ioport.c:57:
+    /* ??? Assume only ISA and PCI configurations, and that the PCI-ISA

WARNING: Block comments use * on subsequent lines
#133: FILE: hw/ide/ioport.c:58:
+    /* ??? Assume only ISA and PCI configurations, and that the PCI-ISA
+       bridge has been setup properly to always register with ISA.  */

WARNING: Block comments use a trailing */ on a separate line
#133: FILE: hw/ide/ioport.c:58:
+       bridge has been setup properly to always register with ISA.  */

total: 0 errors, 4 warnings, 113 lines checked

Patch 2/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
3/52 Checking commit f9385aff8c74 (vfio: move conditional up to hw/Makefile.objs)
4/52 Checking commit 48ca0b0bb040 (hw/pci-host/Makefile.objs: make CONFIGS clear for PCI EXPRESS)
5/52 Checking commit a2f1b8382880 (build: actually use CONFIG_PAM)
6/52 Checking commit 67293f7ac014 (hw/i386/Makefile.objs: Build pc_piix* and pc_q35 boards)
7/52 Checking commit 9321f38d4c1c (hw/arm/Makefile.objs: CONFIG_VIRT created for virt board)
8/52 Checking commit 8a86443748e8 (hw/m68k/Makefile.objs: Conditionally build boards)
9/52 Checking commit d681b512df03 (hw/microblaze/Makefile.objs: Create configs for petalogix and xilinx boards)
10/52 Checking commit 4feddc17c458 (hw/mips/Makefile.objs: Create CONFIG_* for r4k, malta, mipssim boards)
11/52 Checking commit aa9c37673515 (hw/ppc/Makefile.objs: Build all boards conditinally with CONFIG_*)
12/52 Checking commit d90d4f8bb07b (hw/sh4/Makefile.objs: New CONFIG_* varibales created for sh4 boards and device)
13/52 Checking commit c02d4cdf59cc (hw/s390/Makefile.objs: Create new CONFIG_* variables for s390x boards and devices)
14/52 Checking commit e341e43ea749 (hw/sparc/Makefile.objs: CONFIG_* for sun4m and leon3 created)
15/52 Checking commit 6a9dfa037fad (hw/lm32/Makefile.objs: Conditionally build lm32 and milkmyst)
16/52 Checking commit 60bf62c31c54 (hw/xtensa/Makefile.objs: Build xtensa_sim and xtensa_fpga conditionally)
17/52 Checking commit c2ce7cf4611e (hw/nios2/Makefile.objs: Conditionally build nios2)
18/52 Checking commit 3d4876ad59dc (hw/riscv/Makefile.objs: Create CONFIG_* for riscv boards)
19/52 Checking commit aa55c758c409 (hw/sparc64/Makefile.objs: Create CONFIG_* for sparc64)
20/52 Checking commit 1098821e3116 (hw/alpha/Makefile.objs: Create CONFIG_* for alpha)
21/52 Checking commit 13aa0274be57 (hw/cris/Makefile.objs: Create CONFIG_* for cris)
22/52 Checking commit baf0d866cbf9 (hw/hppa/Makefile.objs: Create CONFIG_* for hppa)
23/52 Checking commit b1fe09618bfe (hw/moxie/Makefile.objs: Conditionally build moxie)
24/52 Checking commit 150eb6021400 (hw/openrisc/Makefile.objs: Create CONFIG_* for openrisc)
25/52 Checking commit 8254b1b5e1aa (hw/tricore/Makefile.objs: Create CONFIG_* for tricore)
26/52 Checking commit 5e30d1f03e84 (hw/i2c/Makefile.objs: Create new CONFIG_* variables for EEPROM and ACPI controller)
27/52 Checking commit 18ac9b68146f (hw/vfio/Makefile.objs: Create new CONFIG_* variables for VFIO core and PCI)
28/52 Checking commit 2f64711b7cbc (minikconfig: add parser skeleton)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#35: 
new file mode 100644

WARNING: line over 80 characters
#251: FILE: scripts/minikconf.py:212:
+                           'Expected identifier starting with "CONFIG_"', TOK_NONE)

WARNING: line over 80 characters
#344: FILE: scripts/minikconf.py:305:
+            raise KconfigParserError(self, 'expected "source", "config", identifier, '

WARNING: line over 80 characters
#370: FILE: scripts/minikconf.py:331:
+            raise KconfigParserError(self, 'expected "source", "config" or identifier')

ERROR: line over 90 characters
#395: FILE: scripts/minikconf.py:356:
+        if self.src[self.cursor + length].isalnum() or self.src[self.cursor + length] == '|':

WARNING: line over 80 characters
#448: FILE: scripts/minikconf.py:409:
+            while self.src[self.cursor].isalnum() or self.src[self.cursor] == '_':

total: 1 errors, 5 warnings, 425 lines checked

Patch 28/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

29/52 Checking commit afcf405ac260 (minikconfig: add AST)
WARNING: line over 80 characters
#89: FILE: scripts/minikconf.py:86:
+                return "config %s default %s if %s" % (self.dest, value, self.cond)

total: 0 errors, 1 warnings, 170 lines checked

Patch 29/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
30/52 Checking commit 9a6e43617ce7 (minikconfig: add semantic analysis)
WARNING: line over 80 characters
#112: FILE: scripts/minikconf.py:102:
+                raise Exception('contradiction between clauses when setting %s' % self)

WARNING: line over 80 characters
#215: FILE: scripts/minikconf.py:214:
+            debug_print(i, "->", [str(x) for x in self.referenced_vars[i].outgoing])

total: 0 errors, 2 warnings, 223 lines checked

Patch 30/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
31/52 Checking commit c4119d6e81ce (hw/display: make edid configurable)
32/52 Checking commit 26b1ac2c0b73 (kconfig: introduce kconfig files)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#44: 
new file mode 100644

WARNING: line over 80 characters
#1762: FILE: scripts/minikconf.py:636:
+        print ("%s: at least one argument is required" % argv[0], file=sys.stderr)

total: 0 errors, 2 warnings, 1363 lines checked

Patch 32/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
33/52 Checking commit 8aa73695da7a (build: switch to Kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#481: 
deleted file mode 100644

total: 0 errors, 1 warnings, 325 lines checked

Patch 33/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
34/52 Checking commit 5a452a1fc119 (minikconf: implement allnoconfig and defconfig)
35/52 Checking commit f4642a7c62b2 (ide: express dependencies with Kconfig)
36/52 Checking commit f08f56a670ae (hw/pci/Makefile.objs: make pcie configurable)
37/52 Checking commit 5d186272f909 (build: convert pci.mak to Kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#120: 
deleted file mode 100644

total: 0 errors, 1 warnings, 472 lines checked

Patch 37/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
38/52 Checking commit 069934d3cb35 (build: convert sound.mak to Kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#70: 
deleted file mode 100644

total: 0 errors, 1 warnings, 51 lines checked

Patch 38/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
39/52 Checking commit 74950a85f9f2 (build: convert usb.mak to Kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#158: 
deleted file mode 100644

total: 0 errors, 1 warnings, 157 lines checked

Patch 39/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
40/52 Checking commit 7a26eaae9594 (scsi: express dependencies with Kconfig)
41/52 Checking commit 583608364d1c (isa: express dependencies with kconfig)
42/52 Checking commit 9b937662f4e1 (i386: express dependencies with Kconfig)
43/52 Checking commit fdf78be1f429 (i2c: express dependencies with Kconfig)
44/52 Checking commit fdd2c128b788 (ptimer: express dependencies with Kconfig)
45/52 Checking commit 1ef5cc5fb73b (display: express dependencies with kconfig)
46/52 Checking commit a59763338008 (hyperv: express dependencies with kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#17: 
deleted file mode 100644

total: 0 errors, 1 warnings, 15 lines checked

Patch 46/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
47/52 Checking commit 5a72a0c385fc (vfio: express vfio dependencies with Kconfig)
48/52 Checking commit 7ffb3fa21b40 (virtio: express virtio dependencies with Kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#37: 
deleted file mode 100644

total: 0 errors, 1 warnings, 109 lines checked

Patch 48/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
49/52 Checking commit 8e3174384e2b (tpm: express dependencies with Kconfig)
50/52 Checking commit 8c1fb84ff49b (isa: express SuperIO dependencies with Kconfig)
51/52 Checking commit 2fadac69d98b (i386-softmmu.mak: remove all CONFIG_* except boards definitions)
52/52 Checking commit 12539e489992 (kconfig: introduce CONFIG_TEST_DEVICES)
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/1548410831-19553-1-git-send-email-pbonzini@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@redhat.com

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (54 preceding siblings ...)
  2019-01-31 21:57 ` no-reply
@ 2019-01-31 21:58 ` no-reply
  2019-01-31 22:01 ` no-reply
                   ` (5 subsequent siblings)
  61 siblings, 0 replies; 119+ messages in thread
From: no-reply @ 2019-01-31 21:58 UTC (permalink / raw)
  To: pbonzini; +Cc: fam, qemu-devel, yang.zhong, thuth

Patchew URL: https://patchew.org/QEMU/1548410831-19553-1-git-send-email-pbonzini@redhat.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 1548410831-19553-1-git-send-email-pbonzini@redhat.com
Subject: [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 - [tag update]      patchew/1548410831-19553-1-git-send-email-pbonzini@redhat.com -> patchew/1548410831-19553-1-git-send-email-pbonzini@redhat.com
Switched to a new branch 'test'
12539e4 kconfig: introduce CONFIG_TEST_DEVICES
2fadac6 i386-softmmu.mak: remove all CONFIG_* except boards definitions
8c1fb84 isa: express SuperIO dependencies with Kconfig
8e31743 tpm: express dependencies with Kconfig
7ffb3fa virtio: express virtio dependencies with Kconfig
5a72a0c vfio: express vfio dependencies with Kconfig
a597633 hyperv: express dependencies with kconfig
1ef5cc5 display: express dependencies with kconfig
fdd2c12 ptimer: express dependencies with Kconfig
fdf78be i2c: express dependencies with Kconfig
9b93766 i386: express dependencies with Kconfig
5836083 isa: express dependencies with kconfig
7a26eaa scsi: express dependencies with Kconfig
74950a8 build: convert usb.mak to Kconfig
069934d build: convert sound.mak to Kconfig
5d18627 build: convert pci.mak to Kconfig
f08f56a hw/pci/Makefile.objs: make pcie configurable
f4642a7 ide: express dependencies with Kconfig
5a452a1 minikconf: implement allnoconfig and defconfig
8aa7369 build: switch to Kconfig
26b1ac2 kconfig: introduce kconfig files
c4119d6 hw/display: make edid configurable
9a6e436 minikconfig: add semantic analysis
afcf405 minikconfig: add AST
2f64711 minikconfig: add parser skeleton
18ac9b6 hw/vfio/Makefile.objs: Create new CONFIG_* variables for VFIO core and PCI
5e30d1f hw/i2c/Makefile.objs: Create new CONFIG_* variables for EEPROM and ACPI controller
8254b1b hw/tricore/Makefile.objs: Create CONFIG_* for tricore
150eb60 hw/openrisc/Makefile.objs: Create CONFIG_* for openrisc
b1fe096 hw/moxie/Makefile.objs: Conditionally build moxie
baf0d86 hw/hppa/Makefile.objs: Create CONFIG_* for hppa
13aa027 hw/cris/Makefile.objs: Create CONFIG_* for cris
1098821 hw/alpha/Makefile.objs: Create CONFIG_* for alpha
aa55c75 hw/sparc64/Makefile.objs: Create CONFIG_* for sparc64
3d4876a hw/riscv/Makefile.objs: Create CONFIG_* for riscv boards
c2ce7cf hw/nios2/Makefile.objs: Conditionally build nios2
60bf62c hw/xtensa/Makefile.objs: Build xtensa_sim and xtensa_fpga conditionally
6a9dfa0 hw/lm32/Makefile.objs: Conditionally build lm32 and milkmyst
e341e43 hw/sparc/Makefile.objs: CONFIG_* for sun4m and leon3 created
c02d4cd hw/s390/Makefile.objs: Create new CONFIG_* variables for s390x boards and devices
d90d4f8 hw/sh4/Makefile.objs: New CONFIG_* varibales created for sh4 boards and device
aa9c376 hw/ppc/Makefile.objs: Build all boards conditinally with CONFIG_*
4feddc1 hw/mips/Makefile.objs: Create CONFIG_* for r4k, malta, mipssim boards
d681b51 hw/microblaze/Makefile.objs: Create configs for petalogix and xilinx boards
8a86443 hw/m68k/Makefile.objs: Conditionally build boards
9321f38 hw/arm/Makefile.objs: CONFIG_VIRT created for virt board
67293f7 hw/i386/Makefile.objs: Build pc_piix* and pc_q35 boards
a2f1b83 build: actually use CONFIG_PAM
48ca0b0 hw/pci-host/Makefile.objs: make CONFIGS clear for PCI EXPRESS
f9385af vfio: move conditional up to hw/Makefile.objs
3c1f0c4 ide: split ioport registration to a separate file
de15bc2 arm: disable CONFIG_SERIAL_ISA

=== OUTPUT BEGIN ===
1/52 Checking commit de15bc290e9c (arm: disable CONFIG_SERIAL_ISA)
2/52 Checking commit 3c1f0c425e86 (ide: split ioport registration to a separate file)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#71: 
new file mode 100644

WARNING: Block comments use a leading /* on a separate line
#132: FILE: hw/ide/ioport.c:57:
+    /* ??? Assume only ISA and PCI configurations, and that the PCI-ISA

WARNING: Block comments use * on subsequent lines
#133: FILE: hw/ide/ioport.c:58:
+    /* ??? Assume only ISA and PCI configurations, and that the PCI-ISA
+       bridge has been setup properly to always register with ISA.  */

WARNING: Block comments use a trailing */ on a separate line
#133: FILE: hw/ide/ioport.c:58:
+       bridge has been setup properly to always register with ISA.  */

total: 0 errors, 4 warnings, 113 lines checked

Patch 2/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
3/52 Checking commit f9385aff8c74 (vfio: move conditional up to hw/Makefile.objs)
4/52 Checking commit 48ca0b0bb040 (hw/pci-host/Makefile.objs: make CONFIGS clear for PCI EXPRESS)
5/52 Checking commit a2f1b8382880 (build: actually use CONFIG_PAM)
6/52 Checking commit 67293f7ac014 (hw/i386/Makefile.objs: Build pc_piix* and pc_q35 boards)
7/52 Checking commit 9321f38d4c1c (hw/arm/Makefile.objs: CONFIG_VIRT created for virt board)
8/52 Checking commit 8a86443748e8 (hw/m68k/Makefile.objs: Conditionally build boards)
9/52 Checking commit d681b512df03 (hw/microblaze/Makefile.objs: Create configs for petalogix and xilinx boards)
10/52 Checking commit 4feddc17c458 (hw/mips/Makefile.objs: Create CONFIG_* for r4k, malta, mipssim boards)
11/52 Checking commit aa9c37673515 (hw/ppc/Makefile.objs: Build all boards conditinally with CONFIG_*)
12/52 Checking commit d90d4f8bb07b (hw/sh4/Makefile.objs: New CONFIG_* varibales created for sh4 boards and device)
13/52 Checking commit c02d4cdf59cc (hw/s390/Makefile.objs: Create new CONFIG_* variables for s390x boards and devices)
14/52 Checking commit e341e43ea749 (hw/sparc/Makefile.objs: CONFIG_* for sun4m and leon3 created)
15/52 Checking commit 6a9dfa037fad (hw/lm32/Makefile.objs: Conditionally build lm32 and milkmyst)
16/52 Checking commit 60bf62c31c54 (hw/xtensa/Makefile.objs: Build xtensa_sim and xtensa_fpga conditionally)
17/52 Checking commit c2ce7cf4611e (hw/nios2/Makefile.objs: Conditionally build nios2)
18/52 Checking commit 3d4876ad59dc (hw/riscv/Makefile.objs: Create CONFIG_* for riscv boards)
19/52 Checking commit aa55c758c409 (hw/sparc64/Makefile.objs: Create CONFIG_* for sparc64)
20/52 Checking commit 1098821e3116 (hw/alpha/Makefile.objs: Create CONFIG_* for alpha)
21/52 Checking commit 13aa0274be57 (hw/cris/Makefile.objs: Create CONFIG_* for cris)
22/52 Checking commit baf0d866cbf9 (hw/hppa/Makefile.objs: Create CONFIG_* for hppa)
23/52 Checking commit b1fe09618bfe (hw/moxie/Makefile.objs: Conditionally build moxie)
24/52 Checking commit 150eb6021400 (hw/openrisc/Makefile.objs: Create CONFIG_* for openrisc)
25/52 Checking commit 8254b1b5e1aa (hw/tricore/Makefile.objs: Create CONFIG_* for tricore)
26/52 Checking commit 5e30d1f03e84 (hw/i2c/Makefile.objs: Create new CONFIG_* variables for EEPROM and ACPI controller)
27/52 Checking commit 18ac9b68146f (hw/vfio/Makefile.objs: Create new CONFIG_* variables for VFIO core and PCI)
28/52 Checking commit 2f64711b7cbc (minikconfig: add parser skeleton)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#35: 
new file mode 100644

WARNING: line over 80 characters
#251: FILE: scripts/minikconf.py:212:
+                           'Expected identifier starting with "CONFIG_"', TOK_NONE)

WARNING: line over 80 characters
#344: FILE: scripts/minikconf.py:305:
+            raise KconfigParserError(self, 'expected "source", "config", identifier, '

WARNING: line over 80 characters
#370: FILE: scripts/minikconf.py:331:
+            raise KconfigParserError(self, 'expected "source", "config" or identifier')

ERROR: line over 90 characters
#395: FILE: scripts/minikconf.py:356:
+        if self.src[self.cursor + length].isalnum() or self.src[self.cursor + length] == '|':

WARNING: line over 80 characters
#448: FILE: scripts/minikconf.py:409:
+            while self.src[self.cursor].isalnum() or self.src[self.cursor] == '_':

total: 1 errors, 5 warnings, 425 lines checked

Patch 28/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

29/52 Checking commit afcf405ac260 (minikconfig: add AST)
WARNING: line over 80 characters
#89: FILE: scripts/minikconf.py:86:
+                return "config %s default %s if %s" % (self.dest, value, self.cond)

total: 0 errors, 1 warnings, 170 lines checked

Patch 29/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
30/52 Checking commit 9a6e43617ce7 (minikconfig: add semantic analysis)
WARNING: line over 80 characters
#112: FILE: scripts/minikconf.py:102:
+                raise Exception('contradiction between clauses when setting %s' % self)

WARNING: line over 80 characters
#215: FILE: scripts/minikconf.py:214:
+            debug_print(i, "->", [str(x) for x in self.referenced_vars[i].outgoing])

total: 0 errors, 2 warnings, 223 lines checked

Patch 30/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
31/52 Checking commit c4119d6e81ce (hw/display: make edid configurable)
32/52 Checking commit 26b1ac2c0b73 (kconfig: introduce kconfig files)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#44: 
new file mode 100644

WARNING: line over 80 characters
#1762: FILE: scripts/minikconf.py:636:
+        print ("%s: at least one argument is required" % argv[0], file=sys.stderr)

total: 0 errors, 2 warnings, 1363 lines checked

Patch 32/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
33/52 Checking commit 8aa73695da7a (build: switch to Kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#481: 
deleted file mode 100644

total: 0 errors, 1 warnings, 325 lines checked

Patch 33/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
34/52 Checking commit 5a452a1fc119 (minikconf: implement allnoconfig and defconfig)
35/52 Checking commit f4642a7c62b2 (ide: express dependencies with Kconfig)
36/52 Checking commit f08f56a670ae (hw/pci/Makefile.objs: make pcie configurable)
37/52 Checking commit 5d186272f909 (build: convert pci.mak to Kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#120: 
deleted file mode 100644

total: 0 errors, 1 warnings, 472 lines checked

Patch 37/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
38/52 Checking commit 069934d3cb35 (build: convert sound.mak to Kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#70: 
deleted file mode 100644

total: 0 errors, 1 warnings, 51 lines checked

Patch 38/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
39/52 Checking commit 74950a85f9f2 (build: convert usb.mak to Kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#158: 
deleted file mode 100644

total: 0 errors, 1 warnings, 157 lines checked

Patch 39/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
40/52 Checking commit 7a26eaae9594 (scsi: express dependencies with Kconfig)
41/52 Checking commit 583608364d1c (isa: express dependencies with kconfig)
42/52 Checking commit 9b937662f4e1 (i386: express dependencies with Kconfig)
43/52 Checking commit fdf78be1f429 (i2c: express dependencies with Kconfig)
44/52 Checking commit fdd2c128b788 (ptimer: express dependencies with Kconfig)
45/52 Checking commit 1ef5cc5fb73b (display: express dependencies with kconfig)
46/52 Checking commit a59763338008 (hyperv: express dependencies with kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#17: 
deleted file mode 100644

total: 0 errors, 1 warnings, 15 lines checked

Patch 46/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
47/52 Checking commit 5a72a0c385fc (vfio: express vfio dependencies with Kconfig)
48/52 Checking commit 7ffb3fa21b40 (virtio: express virtio dependencies with Kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#37: 
deleted file mode 100644

total: 0 errors, 1 warnings, 109 lines checked

Patch 48/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
49/52 Checking commit 8e3174384e2b (tpm: express dependencies with Kconfig)
50/52 Checking commit 8c1fb84ff49b (isa: express SuperIO dependencies with Kconfig)
51/52 Checking commit 2fadac69d98b (i386-softmmu.mak: remove all CONFIG_* except boards definitions)
52/52 Checking commit 12539e489992 (kconfig: introduce CONFIG_TEST_DEVICES)
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/1548410831-19553-1-git-send-email-pbonzini@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@redhat.com

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (55 preceding siblings ...)
  2019-01-31 21:58 ` no-reply
@ 2019-01-31 22:01 ` no-reply
  2019-01-31 22:22 ` no-reply
                   ` (4 subsequent siblings)
  61 siblings, 0 replies; 119+ messages in thread
From: no-reply @ 2019-01-31 22:01 UTC (permalink / raw)
  To: pbonzini; +Cc: fam, qemu-devel, yang.zhong, thuth

Patchew URL: https://patchew.org/QEMU/1548410831-19553-1-git-send-email-pbonzini@redhat.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Subject: [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU
Message-id: 1548410831-19553-1-git-send-email-pbonzini@redhat.com
Type: series

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 - [tag update]      patchew/1548410831-19553-1-git-send-email-pbonzini@redhat.com -> patchew/1548410831-19553-1-git-send-email-pbonzini@redhat.com
Submodule 'capstone' (https://git.qemu.org/git/capstone.git) registered for path 'capstone'
Submodule 'dtc' (https://git.qemu.org/git/dtc.git) registered for path 'dtc'
Submodule 'roms/QemuMacDrivers' (https://git.qemu.org/git/QemuMacDrivers.git) registered for path 'roms/QemuMacDrivers'
Submodule 'roms/SLOF' (https://git.qemu.org/git/SLOF.git) registered for path 'roms/SLOF'
Submodule 'roms/ipxe' (https://git.qemu.org/git/ipxe.git) registered for path 'roms/ipxe'
Submodule 'roms/openbios' (https://git.qemu.org/git/openbios.git) registered for path 'roms/openbios'
Submodule 'roms/openhackware' (https://git.qemu.org/git/openhackware.git) registered for path 'roms/openhackware'
Submodule 'roms/qemu-palcode' (https://git.qemu.org/git/qemu-palcode.git) registered for path 'roms/qemu-palcode'
Submodule 'roms/seabios' (https://git.qemu.org/git/seabios.git/) registered for path 'roms/seabios'
Submodule 'roms/seabios-hppa' (https://github.com/hdeller/seabios-hppa.git) registered for path 'roms/seabios-hppa'
Submodule 'roms/sgabios' (https://git.qemu.org/git/sgabios.git) registered for path 'roms/sgabios'
Submodule 'roms/skiboot' (https://git.qemu.org/git/skiboot.git) registered for path 'roms/skiboot'
Submodule 'roms/u-boot' (https://git.qemu.org/git/u-boot.git) registered for path 'roms/u-boot'
Submodule 'roms/u-boot-sam460ex' (https://git.qemu.org/git/u-boot-sam460ex.git) registered for path 'roms/u-boot-sam460ex'
Submodule 'tests/fp/berkeley-softfloat-3' (https://github.com/cota/berkeley-softfloat-3) registered for path 'tests/fp/berkeley-softfloat-3'
Submodule 'tests/fp/berkeley-testfloat-3' (https://github.com/cota/berkeley-testfloat-3) registered for path 'tests/fp/berkeley-testfloat-3'
Submodule 'ui/keycodemapdb' (https://git.qemu.org/git/keycodemapdb.git) registered for path 'ui/keycodemapdb'
Cloning into 'capstone'...
Submodule path 'capstone': checked out '22ead3e0bfdb87516656453336160e0a37b066bf'
Cloning into 'dtc'...
Submodule path 'dtc': checked out '88f18909db731a627456f26d779445f84e449536'
Cloning into 'roms/QemuMacDrivers'...
Submodule path 'roms/QemuMacDrivers': checked out 'd4e7d7ac663fcb55f1b93575445fcbca372f17a7'
Cloning into 'roms/SLOF'...
Submodule path 'roms/SLOF': checked out '9b7ab2fa020341dee8bf9df6c9cf40003e0136df'
Cloning into 'roms/ipxe'...
Submodule path 'roms/ipxe': checked out 'de4565cbe76ea9f7913a01f331be3ee901bb6e17'
Cloning into 'roms/openbios'...
Submodule path 'roms/openbios': checked out '441a84d3a642a10b948369c63f32367e8ff6395b'
Cloning into 'roms/openhackware'...
Submodule path 'roms/openhackware': checked out 'c559da7c8eec5e45ef1f67978827af6f0b9546f5'
Cloning into 'roms/qemu-palcode'...
Submodule path 'roms/qemu-palcode': checked out '51c237d7e20d05100eacadee2f61abc17e6bc097'
Cloning into 'roms/seabios'...
Submodule path 'roms/seabios': checked out 'a698c8995ffb2838296ec284fe3c4ad33dfca307'
Cloning into 'roms/seabios-hppa'...
Submodule path 'roms/seabios-hppa': checked out '1ef99a01572c2581c30e16e6fe69e9ea2ef92ce0'
Cloning into 'roms/sgabios'...
Submodule path 'roms/sgabios': checked out 'cbaee52287e5f32373181cff50a00b6c4ac9015a'
Cloning into 'roms/skiboot'...
Submodule path 'roms/skiboot': checked out 'e0ee24c27a172bcf482f6f2bc905e6211c134bcc'
Cloning into 'roms/u-boot'...
Submodule path 'roms/u-boot': checked out 'd85ca029f257b53a96da6c2fb421e78a003a9943'
Cloning into 'roms/u-boot-sam460ex'...
Submodule path 'roms/u-boot-sam460ex': checked out '60b3916f33e617a815973c5a6df77055b2e3a588'
Cloning into 'tests/fp/berkeley-softfloat-3'...
Submodule path 'tests/fp/berkeley-softfloat-3': checked out 'b64af41c3276f97f0e181920400ee056b9c88037'
Cloning into 'tests/fp/berkeley-testfloat-3'...
Submodule path 'tests/fp/berkeley-testfloat-3': checked out '5a59dcec19327396a011a17fd924aed4fec416b3'
Cloning into 'ui/keycodemapdb'...
Submodule path 'ui/keycodemapdb': checked out '6b3d716e2b6472eb7189d3220552280ef3d832ce'
Switched to a new branch 'test'
12539e4 kconfig: introduce CONFIG_TEST_DEVICES
2fadac6 i386-softmmu.mak: remove all CONFIG_* except boards definitions
8c1fb84 isa: express SuperIO dependencies with Kconfig
8e31743 tpm: express dependencies with Kconfig
7ffb3fa virtio: express virtio dependencies with Kconfig
5a72a0c vfio: express vfio dependencies with Kconfig
a597633 hyperv: express dependencies with kconfig
1ef5cc5 display: express dependencies with kconfig
fdd2c12 ptimer: express dependencies with Kconfig
fdf78be i2c: express dependencies with Kconfig
9b93766 i386: express dependencies with Kconfig
5836083 isa: express dependencies with kconfig
7a26eaa scsi: express dependencies with Kconfig
74950a8 build: convert usb.mak to Kconfig
069934d build: convert sound.mak to Kconfig
5d18627 build: convert pci.mak to Kconfig
f08f56a hw/pci/Makefile.objs: make pcie configurable
f4642a7 ide: express dependencies with Kconfig
5a452a1 minikconf: implement allnoconfig and defconfig
8aa7369 build: switch to Kconfig
26b1ac2 kconfig: introduce kconfig files
c4119d6 hw/display: make edid configurable
9a6e436 minikconfig: add semantic analysis
afcf405 minikconfig: add AST
2f64711 minikconfig: add parser skeleton
18ac9b6 hw/vfio/Makefile.objs: Create new CONFIG_* variables for VFIO core and PCI
5e30d1f hw/i2c/Makefile.objs: Create new CONFIG_* variables for EEPROM and ACPI controller
8254b1b hw/tricore/Makefile.objs: Create CONFIG_* for tricore
150eb60 hw/openrisc/Makefile.objs: Create CONFIG_* for openrisc
b1fe096 hw/moxie/Makefile.objs: Conditionally build moxie
baf0d86 hw/hppa/Makefile.objs: Create CONFIG_* for hppa
13aa027 hw/cris/Makefile.objs: Create CONFIG_* for cris
1098821 hw/alpha/Makefile.objs: Create CONFIG_* for alpha
aa55c75 hw/sparc64/Makefile.objs: Create CONFIG_* for sparc64
3d4876a hw/riscv/Makefile.objs: Create CONFIG_* for riscv boards
c2ce7cf hw/nios2/Makefile.objs: Conditionally build nios2
60bf62c hw/xtensa/Makefile.objs: Build xtensa_sim and xtensa_fpga conditionally
6a9dfa0 hw/lm32/Makefile.objs: Conditionally build lm32 and milkmyst
e341e43 hw/sparc/Makefile.objs: CONFIG_* for sun4m and leon3 created
c02d4cd hw/s390/Makefile.objs: Create new CONFIG_* variables for s390x boards and devices
d90d4f8 hw/sh4/Makefile.objs: New CONFIG_* varibales created for sh4 boards and device
aa9c376 hw/ppc/Makefile.objs: Build all boards conditinally with CONFIG_*
4feddc1 hw/mips/Makefile.objs: Create CONFIG_* for r4k, malta, mipssim boards
d681b51 hw/microblaze/Makefile.objs: Create configs for petalogix and xilinx boards
8a86443 hw/m68k/Makefile.objs: Conditionally build boards
9321f38 hw/arm/Makefile.objs: CONFIG_VIRT created for virt board
67293f7 hw/i386/Makefile.objs: Build pc_piix* and pc_q35 boards
a2f1b83 build: actually use CONFIG_PAM
48ca0b0 hw/pci-host/Makefile.objs: make CONFIGS clear for PCI EXPRESS
f9385af vfio: move conditional up to hw/Makefile.objs
3c1f0c4 ide: split ioport registration to a separate file
de15bc2 arm: disable CONFIG_SERIAL_ISA

=== OUTPUT BEGIN ===
1/52 Checking commit de15bc290e9c (arm: disable CONFIG_SERIAL_ISA)
2/52 Checking commit 3c1f0c425e86 (ide: split ioport registration to a separate file)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#71: 
new file mode 100644

WARNING: Block comments use a leading /* on a separate line
#132: FILE: hw/ide/ioport.c:57:
+    /* ??? Assume only ISA and PCI configurations, and that the PCI-ISA

WARNING: Block comments use * on subsequent lines
#133: FILE: hw/ide/ioport.c:58:
+    /* ??? Assume only ISA and PCI configurations, and that the PCI-ISA
+       bridge has been setup properly to always register with ISA.  */

WARNING: Block comments use a trailing */ on a separate line
#133: FILE: hw/ide/ioport.c:58:
+       bridge has been setup properly to always register with ISA.  */

total: 0 errors, 4 warnings, 113 lines checked

Patch 2/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
3/52 Checking commit f9385aff8c74 (vfio: move conditional up to hw/Makefile.objs)
4/52 Checking commit 48ca0b0bb040 (hw/pci-host/Makefile.objs: make CONFIGS clear for PCI EXPRESS)
5/52 Checking commit a2f1b8382880 (build: actually use CONFIG_PAM)
6/52 Checking commit 67293f7ac014 (hw/i386/Makefile.objs: Build pc_piix* and pc_q35 boards)
7/52 Checking commit 9321f38d4c1c (hw/arm/Makefile.objs: CONFIG_VIRT created for virt board)
8/52 Checking commit 8a86443748e8 (hw/m68k/Makefile.objs: Conditionally build boards)
9/52 Checking commit d681b512df03 (hw/microblaze/Makefile.objs: Create configs for petalogix and xilinx boards)
10/52 Checking commit 4feddc17c458 (hw/mips/Makefile.objs: Create CONFIG_* for r4k, malta, mipssim boards)
11/52 Checking commit aa9c37673515 (hw/ppc/Makefile.objs: Build all boards conditinally with CONFIG_*)
12/52 Checking commit d90d4f8bb07b (hw/sh4/Makefile.objs: New CONFIG_* varibales created for sh4 boards and device)
13/52 Checking commit c02d4cdf59cc (hw/s390/Makefile.objs: Create new CONFIG_* variables for s390x boards and devices)
14/52 Checking commit e341e43ea749 (hw/sparc/Makefile.objs: CONFIG_* for sun4m and leon3 created)
15/52 Checking commit 6a9dfa037fad (hw/lm32/Makefile.objs: Conditionally build lm32 and milkmyst)
16/52 Checking commit 60bf62c31c54 (hw/xtensa/Makefile.objs: Build xtensa_sim and xtensa_fpga conditionally)
17/52 Checking commit c2ce7cf4611e (hw/nios2/Makefile.objs: Conditionally build nios2)
18/52 Checking commit 3d4876ad59dc (hw/riscv/Makefile.objs: Create CONFIG_* for riscv boards)
19/52 Checking commit aa55c758c409 (hw/sparc64/Makefile.objs: Create CONFIG_* for sparc64)
20/52 Checking commit 1098821e3116 (hw/alpha/Makefile.objs: Create CONFIG_* for alpha)
21/52 Checking commit 13aa0274be57 (hw/cris/Makefile.objs: Create CONFIG_* for cris)
22/52 Checking commit baf0d866cbf9 (hw/hppa/Makefile.objs: Create CONFIG_* for hppa)
23/52 Checking commit b1fe09618bfe (hw/moxie/Makefile.objs: Conditionally build moxie)
24/52 Checking commit 150eb6021400 (hw/openrisc/Makefile.objs: Create CONFIG_* for openrisc)
25/52 Checking commit 8254b1b5e1aa (hw/tricore/Makefile.objs: Create CONFIG_* for tricore)
26/52 Checking commit 5e30d1f03e84 (hw/i2c/Makefile.objs: Create new CONFIG_* variables for EEPROM and ACPI controller)
27/52 Checking commit 18ac9b68146f (hw/vfio/Makefile.objs: Create new CONFIG_* variables for VFIO core and PCI)
28/52 Checking commit 2f64711b7cbc (minikconfig: add parser skeleton)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#35: 
new file mode 100644

WARNING: line over 80 characters
#251: FILE: scripts/minikconf.py:212:
+                           'Expected identifier starting with "CONFIG_"', TOK_NONE)

WARNING: line over 80 characters
#344: FILE: scripts/minikconf.py:305:
+            raise KconfigParserError(self, 'expected "source", "config", identifier, '

WARNING: line over 80 characters
#370: FILE: scripts/minikconf.py:331:
+            raise KconfigParserError(self, 'expected "source", "config" or identifier')

ERROR: line over 90 characters
#395: FILE: scripts/minikconf.py:356:
+        if self.src[self.cursor + length].isalnum() or self.src[self.cursor + length] == '|':

WARNING: line over 80 characters
#448: FILE: scripts/minikconf.py:409:
+            while self.src[self.cursor].isalnum() or self.src[self.cursor] == '_':

total: 1 errors, 5 warnings, 425 lines checked

Patch 28/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

29/52 Checking commit afcf405ac260 (minikconfig: add AST)
WARNING: line over 80 characters
#89: FILE: scripts/minikconf.py:86:
+                return "config %s default %s if %s" % (self.dest, value, self.cond)

total: 0 errors, 1 warnings, 170 lines checked

Patch 29/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
30/52 Checking commit 9a6e43617ce7 (minikconfig: add semantic analysis)
WARNING: line over 80 characters
#112: FILE: scripts/minikconf.py:102:
+                raise Exception('contradiction between clauses when setting %s' % self)

WARNING: line over 80 characters
#215: FILE: scripts/minikconf.py:214:
+            debug_print(i, "->", [str(x) for x in self.referenced_vars[i].outgoing])

total: 0 errors, 2 warnings, 223 lines checked

Patch 30/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
31/52 Checking commit c4119d6e81ce (hw/display: make edid configurable)
32/52 Checking commit 26b1ac2c0b73 (kconfig: introduce kconfig files)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#44: 
new file mode 100644

WARNING: line over 80 characters
#1762: FILE: scripts/minikconf.py:636:
+        print ("%s: at least one argument is required" % argv[0], file=sys.stderr)

total: 0 errors, 2 warnings, 1363 lines checked

Patch 32/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
33/52 Checking commit 8aa73695da7a (build: switch to Kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#481: 
deleted file mode 100644

total: 0 errors, 1 warnings, 325 lines checked

Patch 33/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
34/52 Checking commit 5a452a1fc119 (minikconf: implement allnoconfig and defconfig)
35/52 Checking commit f4642a7c62b2 (ide: express dependencies with Kconfig)
36/52 Checking commit f08f56a670ae (hw/pci/Makefile.objs: make pcie configurable)
37/52 Checking commit 5d186272f909 (build: convert pci.mak to Kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#120: 
deleted file mode 100644

total: 0 errors, 1 warnings, 472 lines checked

Patch 37/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
38/52 Checking commit 069934d3cb35 (build: convert sound.mak to Kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#70: 
deleted file mode 100644

total: 0 errors, 1 warnings, 51 lines checked

Patch 38/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
39/52 Checking commit 74950a85f9f2 (build: convert usb.mak to Kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#158: 
deleted file mode 100644

total: 0 errors, 1 warnings, 157 lines checked

Patch 39/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
40/52 Checking commit 7a26eaae9594 (scsi: express dependencies with Kconfig)
41/52 Checking commit 583608364d1c (isa: express dependencies with kconfig)
42/52 Checking commit 9b937662f4e1 (i386: express dependencies with Kconfig)
43/52 Checking commit fdf78be1f429 (i2c: express dependencies with Kconfig)
44/52 Checking commit fdd2c128b788 (ptimer: express dependencies with Kconfig)
45/52 Checking commit 1ef5cc5fb73b (display: express dependencies with kconfig)
46/52 Checking commit a59763338008 (hyperv: express dependencies with kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#17: 
deleted file mode 100644

total: 0 errors, 1 warnings, 15 lines checked

Patch 46/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
47/52 Checking commit 5a72a0c385fc (vfio: express vfio dependencies with Kconfig)
48/52 Checking commit 7ffb3fa21b40 (virtio: express virtio dependencies with Kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#37: 
deleted file mode 100644

total: 0 errors, 1 warnings, 109 lines checked

Patch 48/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
49/52 Checking commit 8e3174384e2b (tpm: express dependencies with Kconfig)
50/52 Checking commit 8c1fb84ff49b (isa: express SuperIO dependencies with Kconfig)
51/52 Checking commit 2fadac69d98b (i386-softmmu.mak: remove all CONFIG_* except boards definitions)
52/52 Checking commit 12539e489992 (kconfig: introduce CONFIG_TEST_DEVICES)
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/1548410831-19553-1-git-send-email-pbonzini@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@redhat.com

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 43/52] i2c: express dependencies with Kconfig
  2019-01-25 10:07 ` [Qemu-devel] [PATCH 43/52] i2c: " Paolo Bonzini
@ 2019-01-31 22:10   ` Philippe Mathieu-Daudé
  2019-01-31 22:21     ` Paolo Bonzini
  0 siblings, 1 reply; 119+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-01-31 22:10 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: yang.zhong, thuth

Hi Paolo,

On 1/25/19 11:07 AM, Paolo Bonzini wrote:
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Yang Zhong <yang.zhong@intel.com>
> Acked-by: Thomas Huth <thuth@redhat.com>
> Message-Id: <20190123065618.3520-38-yang.zhong@intel.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  default-configs/i386-softmmu.mak | 2 --
>  hw/Makefile.objs                 | 2 +-
>  hw/audio/Kconfig                 | 1 +
>  hw/display/Kconfig               | 3 +++
>  hw/gpio/Kconfig                  | 1 +
>  hw/i2c/Kconfig                   | 6 ++++++
>  hw/i386/Kconfig                  | 1 +
>  hw/input/Kconfig                 | 1 +
>  hw/isa/Kconfig                   | 1 +
>  hw/misc/Kconfig                  | 4 ++++
>  hw/timer/Kconfig                 | 3 +++
>  11 files changed, 22 insertions(+), 3 deletions(-)
> 
> diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmmu.mak
> index 9eb9a5e..4aa04e4 100644
> --- a/default-configs/i386-softmmu.mak
> +++ b/default-configs/i386-softmmu.mak
> @@ -22,8 +22,6 @@ CONFIG_NVDIMM=y
>  CONFIG_ACPI_NVDIMM=y
>  CONFIG_PXB=y
>  CONFIG_ACPI_VMGENID=y
> -CONFIG_SMBUS_EEPROM=y
> -CONFIG_I2C=y
>  CONFIG_PCI_DEVICES=y
>  
>  # Boards:
> diff --git a/hw/Makefile.objs b/hw/Makefile.objs
> index e2fcd6a..225f6cc 100644
> --- a/hw/Makefile.objs
> +++ b/hw/Makefile.objs
> @@ -10,7 +10,7 @@ devices-dirs-$(CONFIG_SOFTMMU) += display/
>  devices-dirs-$(CONFIG_SOFTMMU) += dma/
>  devices-dirs-$(CONFIG_SOFTMMU) += gpio/
>  devices-dirs-$(CONFIG_HYPERV) += hyperv/
> -devices-dirs-$(CONFIG_SOFTMMU) += i2c/
> +devices-dirs-$(CONFIG_I2C) += i2c/
>  devices-dirs-$(CONFIG_SOFTMMU) += ide/
>  devices-dirs-$(CONFIG_SOFTMMU) += input/
>  devices-dirs-$(CONFIG_SOFTMMU) += intc/
> diff --git a/hw/audio/Kconfig b/hw/audio/Kconfig
> index 01aea55..e9c6fed 100644
> --- a/hw/audio/Kconfig
> +++ b/hw/audio/Kconfig
> @@ -40,6 +40,7 @@ config PCSPK
>  
>  config WM8750
>      bool
> +    depends on I2C
>  
>  config PL041
>      bool
> diff --git a/hw/display/Kconfig b/hw/display/Kconfig
> index 64a5764..66044ca 100644
> --- a/hw/display/Kconfig
> +++ b/hw/display/Kconfig
> @@ -24,9 +24,11 @@ config PL110
>  
>  config SII9022
>      bool
> +    depends on I2C
>  
>  config SSD0303
>      bool
> +    depends on I2C
>  
>  config SSD0323
>      bool
> @@ -71,6 +73,7 @@ config MILKYMIST_TMU2
>  
>  config SM501
>      bool
> +    depends on I2C
>  
>  config TCX
>      bool
> diff --git a/hw/gpio/Kconfig b/hw/gpio/Kconfig
> index d0a4abf..9227cb5 100644
> --- a/hw/gpio/Kconfig
> +++ b/hw/gpio/Kconfig
> @@ -1,5 +1,6 @@
>  config MAX7310
>      bool
> +    depends on I2C
>  
>  config PL061
>      bool
> diff --git a/hw/i2c/Kconfig b/hw/i2c/Kconfig
> index d6d4402..74c9328 100644
> --- a/hw/i2c/Kconfig
> +++ b/hw/i2c/Kconfig
> @@ -3,18 +3,24 @@ config I2C
>  
>  config SMBUS_EEPROM
>      bool
> +    depends on I2C


Can we have:

  config SMBUS
      bool
      select I2C

  config SMBUS_EEPROM
      bool
      select SMBUS

(or 'depends on')

>  
>  config DDC
>      bool
> +    depends on I2C
>  
>  config VERSATILE_I2C
>      bool
> +    select I2C
>  
>  config ACPI_SMBUS
>      bool
> +    select I2C

       select SMBUS

>  
>  config BITBANG_I2C
>      bool
> +    select I2C
>  
>  config IMX_I2C
>      bool
> +    select I2C
> diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
> index 8814b7c..966c97c 100644
> --- a/hw/i386/Kconfig
> +++ b/hw/i386/Kconfig
> @@ -27,6 +27,7 @@ config PC_ACPI
>      select ACPI_X86
>      select ACPI_CPU_HOTPLUG
>      select ACPI_MEMORY_HOTPLUG
> +    select SMBUS_EEPROM
>      depends on ACPI_SMBUS
>  
>  config I440FX
> diff --git a/hw/input/Kconfig b/hw/input/Kconfig
> index bdb4237..ec014a9 100644
> --- a/hw/input/Kconfig
> +++ b/hw/input/Kconfig
> @@ -3,6 +3,7 @@ config ADB
>  
>  config LM832X
>      bool
> +    depends on I2C
>  
>  config PCKBD
>      bool
> diff --git a/hw/isa/Kconfig b/hw/isa/Kconfig
> index 6f0812d..fcd87b4 100644
> --- a/hw/isa/Kconfig
> +++ b/hw/isa/Kconfig
> @@ -19,6 +19,7 @@ config PIIX4
>  config VT82C686
>      bool
>      select ISA_BUS
> +    select ACPI_SMBUS
>  
>  config SMC37C669
>      bool
> diff --git a/hw/misc/Kconfig b/hw/misc/Kconfig
> index ca051fb..0680d1e 100644
> --- a/hw/misc/Kconfig
> +++ b/hw/misc/Kconfig
> @@ -7,9 +7,11 @@ config MAX111X
>  
>  config TMP105
>      bool
> +    depends on I2C
>  
>  config TMP421
>      bool
> +    depends on I2C
>  
>  config ISA_DEBUG
>      bool
> @@ -34,6 +36,7 @@ config EDU
>  
>  config PCA9552
>      bool
> +    depends on I2C
>  
>  config PL310
>      bool
> @@ -100,3 +103,4 @@ config PVPANIC
>  
>  config AUX
>      bool
> +    select I2C
> diff --git a/hw/timer/Kconfig b/hw/timer/Kconfig
> index 7dbc121..e1a6e74 100644
> --- a/hw/timer/Kconfig
> +++ b/hw/timer/Kconfig
> @@ -9,6 +9,7 @@ config A9_GTIMER
>  
>  config DS1338
>      bool
> +    depends on I2C
>  
>  config HPET
>      bool
> @@ -18,6 +19,7 @@ config I8254
>  
>  config M41T80
>      bool
> +    depends on I2C
>  
>  config M48T59
>      bool
> @@ -27,6 +29,7 @@ config PL031
>  
>  config TWL92230
>      bool
> +    depends on I2C
>  
>  config XLNX_ZYNQMP
>      bool
> 

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 40/52] scsi: express dependencies with Kconfig
  2019-01-31 21:23   ` Philippe Mathieu-Daudé
@ 2019-01-31 22:11     ` Paolo Bonzini
  0 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-31 22:11 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel; +Cc: yang.zhong, thuth

On 31/01/19 22:23, Philippe Mathieu-Daudé wrote:
> You missed:
> 
> -common-obj-y += scsi-disk.o emulation.o
> -common-obj-y += scsi-generic.o scsi-bus.o
> +common-obj-$(CONFIG_SCSI) += scsi-disk.o emulation.o
> +common-obj-$(CONFIG_SCSI) += scsi-generic.o scsi-bus.o
> 

I didn't: :)

devices-dirs-$(CONFIG_SCSI) += scsi/

Paolo

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 41/52] isa: express dependencies with kconfig
  2019-01-31 21:22   ` Philippe Mathieu-Daudé
@ 2019-01-31 22:14     ` Paolo Bonzini
  2019-01-31 22:24       ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-31 22:14 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel; +Cc: yang.zhong, thuth

On 31/01/19 22:22, Philippe Mathieu-Daudé wrote:
> I kinda disagree with the SuperIO generated configs here, but partly my
> fault because the previous Makefile.objs missed the CONFIG_ISA_SUPERIO
> (I missed to review eae2e2e96bf from Thomas where is introduced
> CONFIG_SMC37C669).
> So introducing ISA_SUPERIO simplifies this files and SouthBridge
> devices. I'm not sure how to provide this patch:

The problem is different SuperIO chips can have or lack
floppy/serial/parallel, and so they end up having different dependencies.

Config symbols are a tool to generate working QEMUs (where working =
build and pass device-introspect-test more or less), they needn't
reflect precisely the topology of the machine.

Paolo

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 33/52] build: switch to Kconfig
  2019-01-31 21:48   ` Philippe Mathieu-Daudé
@ 2019-01-31 22:15     ` Paolo Bonzini
  2019-02-01 14:56       ` Philippe Mathieu-Daudé
  2019-02-04 15:45     ` Anthony PERARD
  1 sibling, 1 reply; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-31 22:15 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé,
	qemu-devel, Stefano Stabellini, Anthony Perard, Paul Durrant
  Cc: yang.zhong, thuth

On 31/01/19 22:48, Philippe Mathieu-Daudé wrote:
> There is something I don't understand here: Does CONFIG_XEN in
> Kconfig.host take precedence over the target configs? I'm looking at
> these configs:
> 
>  if supported_xen_target $target; then
>      echo "CONFIG_XEN=n" >> $config_target_mak
>      if test "$xen_pci_passthrough" = yes; then
>          echo "CONFIG_XEN_PCI_PASSTHROUGH=y" >> "$config_target_mak"
>      fi
>  fi

You're right, Kconfig.host should contain CONFIG_XEN_BACKEND and not
CONFIG_XEN.

Paolo

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 43/52] i2c: express dependencies with Kconfig
  2019-01-31 22:10   ` Philippe Mathieu-Daudé
@ 2019-01-31 22:21     ` Paolo Bonzini
  0 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-01-31 22:21 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel; +Cc: yang.zhong, thuth

On 31/01/19 23:10, Philippe Mathieu-Daudé wrote:
>   config SMBUS
>       bool
>       select I2C
> 
>   config SMBUS_EEPROM
>       bool
>       select SMBUS
> 
> (or 'depends on')

Sure.

Paolo

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (56 preceding siblings ...)
  2019-01-31 22:01 ` no-reply
@ 2019-01-31 22:22 ` no-reply
  2019-01-31 22:22 ` no-reply
                   ` (3 subsequent siblings)
  61 siblings, 0 replies; 119+ messages in thread
From: no-reply @ 2019-01-31 22:22 UTC (permalink / raw)
  To: pbonzini; +Cc: fam, qemu-devel, yang.zhong, thuth

Patchew URL: https://patchew.org/QEMU/1548410831-19553-1-git-send-email-pbonzini@redhat.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Subject: [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU
Type: series
Message-id: 1548410831-19553-1-git-send-email-pbonzini@redhat.com

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 t [tag update]            patchew/1548410831-19553-1-git-send-email-pbonzini@redhat.com -> patchew/1548410831-19553-1-git-send-email-pbonzini@redhat.com
Switched to a new branch 'test'
a79752a802 kconfig: introduce CONFIG_TEST_DEVICES
c9d0fe6e67 i386-softmmu.mak: remove all CONFIG_* except boards definitions
6f1e6af4d9 isa: express SuperIO dependencies with Kconfig
dc95811473 tpm: express dependencies with Kconfig
af23f11ab9 virtio: express virtio dependencies with Kconfig
fc253a0747 vfio: express vfio dependencies with Kconfig
04964cac83 hyperv: express dependencies with kconfig
0e23a1e99a display: express dependencies with kconfig
8d0e47d5b0 ptimer: express dependencies with Kconfig
70ffc63c86 i2c: express dependencies with Kconfig
1b10271dfb i386: express dependencies with Kconfig
4d30a49e26 isa: express dependencies with kconfig
f4d520f1f7 scsi: express dependencies with Kconfig
36465626a3 build: convert usb.mak to Kconfig
47589bdbf2 build: convert sound.mak to Kconfig
b96574e955 build: convert pci.mak to Kconfig
8cc438ca12 hw/pci/Makefile.objs: make pcie configurable
fcc8bb50ce ide: express dependencies with Kconfig
860ef3a709 minikconf: implement allnoconfig and defconfig
934e48569c build: switch to Kconfig
d253933815 kconfig: introduce kconfig files
47c5e5d250 hw/display: make edid configurable
3c7f935afa minikconfig: add semantic analysis
36b08f2e7a minikconfig: add AST
1ad0a25337 minikconfig: add parser skeleton
1733dbf5ab hw/vfio/Makefile.objs: Create new CONFIG_* variables for VFIO core and PCI
b863897de3 hw/i2c/Makefile.objs: Create new CONFIG_* variables for EEPROM and ACPI controller
c91ddd4eaa hw/tricore/Makefile.objs: Create CONFIG_* for tricore
a9bf8be75a hw/openrisc/Makefile.objs: Create CONFIG_* for openrisc
d2cdd2af82 hw/moxie/Makefile.objs: Conditionally build moxie
892410c5e9 hw/hppa/Makefile.objs: Create CONFIG_* for hppa
ae6333d373 hw/cris/Makefile.objs: Create CONFIG_* for cris
b9d2911c9d hw/alpha/Makefile.objs: Create CONFIG_* for alpha
3c3acae8cd hw/sparc64/Makefile.objs: Create CONFIG_* for sparc64
0a96788079 hw/riscv/Makefile.objs: Create CONFIG_* for riscv boards
530165e2ef hw/nios2/Makefile.objs: Conditionally build nios2
fbaef04334 hw/xtensa/Makefile.objs: Build xtensa_sim and xtensa_fpga conditionally
9043ba2da9 hw/lm32/Makefile.objs: Conditionally build lm32 and milkmyst
811303a984 hw/sparc/Makefile.objs: CONFIG_* for sun4m and leon3 created
2f7135f01e hw/s390/Makefile.objs: Create new CONFIG_* variables for s390x boards and devices
af8b56692c hw/sh4/Makefile.objs: New CONFIG_* varibales created for sh4 boards and device
cecc461ab2 hw/ppc/Makefile.objs: Build all boards conditinally with CONFIG_*
4bf7173a1c hw/mips/Makefile.objs: Create CONFIG_* for r4k, malta, mipssim boards
6aed799dc5 hw/microblaze/Makefile.objs: Create configs for petalogix and xilinx boards
3997152f27 hw/m68k/Makefile.objs: Conditionally build boards
530a866837 hw/arm/Makefile.objs: CONFIG_VIRT created for virt board
fa54373219 hw/i386/Makefile.objs: Build pc_piix* and pc_q35 boards
1b6abb71d5 build: actually use CONFIG_PAM
f6b12fb162 hw/pci-host/Makefile.objs: make CONFIGS clear for PCI EXPRESS
14d967c0bd vfio: move conditional up to hw/Makefile.objs
bfa4428a4f ide: split ioport registration to a separate file
305912d25e arm: disable CONFIG_SERIAL_ISA

=== OUTPUT BEGIN ===
1/52 Checking commit 305912d25e1c (arm: disable CONFIG_SERIAL_ISA)
2/52 Checking commit bfa4428a4fa5 (ide: split ioport registration to a separate file)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#71: 
new file mode 100644

WARNING: Block comments use a leading /* on a separate line
#132: FILE: hw/ide/ioport.c:57:
+    /* ??? Assume only ISA and PCI configurations, and that the PCI-ISA

WARNING: Block comments use * on subsequent lines
#133: FILE: hw/ide/ioport.c:58:
+    /* ??? Assume only ISA and PCI configurations, and that the PCI-ISA
+       bridge has been setup properly to always register with ISA.  */

WARNING: Block comments use a trailing */ on a separate line
#133: FILE: hw/ide/ioport.c:58:
+       bridge has been setup properly to always register with ISA.  */

total: 0 errors, 4 warnings, 113 lines checked

Patch 2/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
3/52 Checking commit 14d967c0bd06 (vfio: move conditional up to hw/Makefile.objs)
4/52 Checking commit f6b12fb162a0 (hw/pci-host/Makefile.objs: make CONFIGS clear for PCI EXPRESS)
5/52 Checking commit 1b6abb71d515 (build: actually use CONFIG_PAM)
6/52 Checking commit fa5437321983 (hw/i386/Makefile.objs: Build pc_piix* and pc_q35 boards)
7/52 Checking commit 530a8668373d (hw/arm/Makefile.objs: CONFIG_VIRT created for virt board)
8/52 Checking commit 3997152f27e5 (hw/m68k/Makefile.objs: Conditionally build boards)
9/52 Checking commit 6aed799dc5f7 (hw/microblaze/Makefile.objs: Create configs for petalogix and xilinx boards)
10/52 Checking commit 4bf7173a1c3b (hw/mips/Makefile.objs: Create CONFIG_* for r4k, malta, mipssim boards)
11/52 Checking commit cecc461ab2ff (hw/ppc/Makefile.objs: Build all boards conditinally with CONFIG_*)
12/52 Checking commit af8b56692c82 (hw/sh4/Makefile.objs: New CONFIG_* varibales created for sh4 boards and device)
13/52 Checking commit 2f7135f01ea8 (hw/s390/Makefile.objs: Create new CONFIG_* variables for s390x boards and devices)
14/52 Checking commit 811303a984b6 (hw/sparc/Makefile.objs: CONFIG_* for sun4m and leon3 created)
15/52 Checking commit 9043ba2da95a (hw/lm32/Makefile.objs: Conditionally build lm32 and milkmyst)
16/52 Checking commit fbaef04334c1 (hw/xtensa/Makefile.objs: Build xtensa_sim and xtensa_fpga conditionally)
17/52 Checking commit 530165e2ef75 (hw/nios2/Makefile.objs: Conditionally build nios2)
18/52 Checking commit 0a967880791e (hw/riscv/Makefile.objs: Create CONFIG_* for riscv boards)
19/52 Checking commit 3c3acae8cd40 (hw/sparc64/Makefile.objs: Create CONFIG_* for sparc64)
20/52 Checking commit b9d2911c9dd6 (hw/alpha/Makefile.objs: Create CONFIG_* for alpha)
21/52 Checking commit ae6333d37354 (hw/cris/Makefile.objs: Create CONFIG_* for cris)
22/52 Checking commit 892410c5e9bd (hw/hppa/Makefile.objs: Create CONFIG_* for hppa)
23/52 Checking commit d2cdd2af82d2 (hw/moxie/Makefile.objs: Conditionally build moxie)
24/52 Checking commit a9bf8be75a10 (hw/openrisc/Makefile.objs: Create CONFIG_* for openrisc)
25/52 Checking commit c91ddd4eaaef (hw/tricore/Makefile.objs: Create CONFIG_* for tricore)
26/52 Checking commit b863897de362 (hw/i2c/Makefile.objs: Create new CONFIG_* variables for EEPROM and ACPI controller)
27/52 Checking commit 1733dbf5ab13 (hw/vfio/Makefile.objs: Create new CONFIG_* variables for VFIO core and PCI)
28/52 Checking commit 1ad0a25337cc (minikconfig: add parser skeleton)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#35: 
new file mode 100644

WARNING: line over 80 characters
#251: FILE: scripts/minikconf.py:212:
+                           'Expected identifier starting with "CONFIG_"', TOK_NONE)

WARNING: line over 80 characters
#344: FILE: scripts/minikconf.py:305:
+            raise KconfigParserError(self, 'expected "source", "config", identifier, '

WARNING: line over 80 characters
#370: FILE: scripts/minikconf.py:331:
+            raise KconfigParserError(self, 'expected "source", "config" or identifier')

ERROR: line over 90 characters
#395: FILE: scripts/minikconf.py:356:
+        if self.src[self.cursor + length].isalnum() or self.src[self.cursor + length] == '|':

WARNING: line over 80 characters
#448: FILE: scripts/minikconf.py:409:
+            while self.src[self.cursor].isalnum() or self.src[self.cursor] == '_':

total: 1 errors, 5 warnings, 425 lines checked

Patch 28/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

29/52 Checking commit 36b08f2e7a79 (minikconfig: add AST)
WARNING: line over 80 characters
#89: FILE: scripts/minikconf.py:86:
+                return "config %s default %s if %s" % (self.dest, value, self.cond)

total: 0 errors, 1 warnings, 170 lines checked

Patch 29/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
30/52 Checking commit 3c7f935afa91 (minikconfig: add semantic analysis)
WARNING: line over 80 characters
#112: FILE: scripts/minikconf.py:102:
+                raise Exception('contradiction between clauses when setting %s' % self)

WARNING: line over 80 characters
#215: FILE: scripts/minikconf.py:214:
+            debug_print(i, "->", [str(x) for x in self.referenced_vars[i].outgoing])

total: 0 errors, 2 warnings, 223 lines checked

Patch 30/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
31/52 Checking commit 47c5e5d25040 (hw/display: make edid configurable)
32/52 Checking commit d2539338157c (kconfig: introduce kconfig files)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#44: 
new file mode 100644

WARNING: line over 80 characters
#1762: FILE: scripts/minikconf.py:636:
+        print ("%s: at least one argument is required" % argv[0], file=sys.stderr)

total: 0 errors, 2 warnings, 1363 lines checked

Patch 32/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
33/52 Checking commit 934e48569c11 (build: switch to Kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#481: 
deleted file mode 100644

total: 0 errors, 1 warnings, 325 lines checked

Patch 33/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
34/52 Checking commit 860ef3a709c8 (minikconf: implement allnoconfig and defconfig)
35/52 Checking commit fcc8bb50ce40 (ide: express dependencies with Kconfig)
36/52 Checking commit 8cc438ca1208 (hw/pci/Makefile.objs: make pcie configurable)
37/52 Checking commit b96574e95500 (build: convert pci.mak to Kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#120: 
deleted file mode 100644

total: 0 errors, 1 warnings, 472 lines checked

Patch 37/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
38/52 Checking commit 47589bdbf26b (build: convert sound.mak to Kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#70: 
deleted file mode 100644

total: 0 errors, 1 warnings, 51 lines checked

Patch 38/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
39/52 Checking commit 36465626a31a (build: convert usb.mak to Kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#158: 
deleted file mode 100644

total: 0 errors, 1 warnings, 157 lines checked

Patch 39/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
40/52 Checking commit f4d520f1f7fc (scsi: express dependencies with Kconfig)
41/52 Checking commit 4d30a49e2660 (isa: express dependencies with kconfig)
42/52 Checking commit 1b10271dfb10 (i386: express dependencies with Kconfig)
43/52 Checking commit 70ffc63c8623 (i2c: express dependencies with Kconfig)
44/52 Checking commit 8d0e47d5b043 (ptimer: express dependencies with Kconfig)
45/52 Checking commit 0e23a1e99a67 (display: express dependencies with kconfig)
46/52 Checking commit 04964cac8397 (hyperv: express dependencies with kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#17: 
deleted file mode 100644

total: 0 errors, 1 warnings, 15 lines checked

Patch 46/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
47/52 Checking commit fc253a074755 (vfio: express vfio dependencies with Kconfig)
48/52 Checking commit af23f11ab99b (virtio: express virtio dependencies with Kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#37: 
deleted file mode 100644

total: 0 errors, 1 warnings, 109 lines checked

Patch 48/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
49/52 Checking commit dc95811473a1 (tpm: express dependencies with Kconfig)
50/52 Checking commit 6f1e6af4d997 (isa: express SuperIO dependencies with Kconfig)
51/52 Checking commit c9d0fe6e67ab (i386-softmmu.mak: remove all CONFIG_* except boards definitions)
52/52 Checking commit a79752a80249 (kconfig: introduce CONFIG_TEST_DEVICES)
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/1548410831-19553-1-git-send-email-pbonzini@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@redhat.com

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (57 preceding siblings ...)
  2019-01-31 22:22 ` no-reply
@ 2019-01-31 22:22 ` no-reply
  2019-01-31 22:26 ` no-reply
                   ` (2 subsequent siblings)
  61 siblings, 0 replies; 119+ messages in thread
From: no-reply @ 2019-01-31 22:22 UTC (permalink / raw)
  To: pbonzini; +Cc: fam, qemu-devel, yang.zhong, thuth

Patchew URL: https://patchew.org/QEMU/1548410831-19553-1-git-send-email-pbonzini@redhat.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 1548410831-19553-1-git-send-email-pbonzini@redhat.com
Subject: [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 - [tag update]      patchew/1548410831-19553-1-git-send-email-pbonzini@redhat.com -> patchew/1548410831-19553-1-git-send-email-pbonzini@redhat.com
Switched to a new branch 'test'
a79752a kconfig: introduce CONFIG_TEST_DEVICES
c9d0fe6 i386-softmmu.mak: remove all CONFIG_* except boards definitions
6f1e6af isa: express SuperIO dependencies with Kconfig
dc95811 tpm: express dependencies with Kconfig
af23f11 virtio: express virtio dependencies with Kconfig
fc253a0 vfio: express vfio dependencies with Kconfig
04964ca hyperv: express dependencies with kconfig
0e23a1e display: express dependencies with kconfig
8d0e47d ptimer: express dependencies with Kconfig
70ffc63 i2c: express dependencies with Kconfig
1b10271 i386: express dependencies with Kconfig
4d30a49 isa: express dependencies with kconfig
f4d520f scsi: express dependencies with Kconfig
3646562 build: convert usb.mak to Kconfig
47589bd build: convert sound.mak to Kconfig
b96574e build: convert pci.mak to Kconfig
8cc438c hw/pci/Makefile.objs: make pcie configurable
fcc8bb5 ide: express dependencies with Kconfig
860ef3a minikconf: implement allnoconfig and defconfig
934e485 build: switch to Kconfig
d253933 kconfig: introduce kconfig files
47c5e5d hw/display: make edid configurable
3c7f935 minikconfig: add semantic analysis
36b08f2 minikconfig: add AST
1ad0a25 minikconfig: add parser skeleton
1733dbf hw/vfio/Makefile.objs: Create new CONFIG_* variables for VFIO core and PCI
b863897 hw/i2c/Makefile.objs: Create new CONFIG_* variables for EEPROM and ACPI controller
c91ddd4 hw/tricore/Makefile.objs: Create CONFIG_* for tricore
a9bf8be hw/openrisc/Makefile.objs: Create CONFIG_* for openrisc
d2cdd2a hw/moxie/Makefile.objs: Conditionally build moxie
892410c hw/hppa/Makefile.objs: Create CONFIG_* for hppa
ae6333d hw/cris/Makefile.objs: Create CONFIG_* for cris
b9d2911 hw/alpha/Makefile.objs: Create CONFIG_* for alpha
3c3acae hw/sparc64/Makefile.objs: Create CONFIG_* for sparc64
0a96788 hw/riscv/Makefile.objs: Create CONFIG_* for riscv boards
530165e hw/nios2/Makefile.objs: Conditionally build nios2
fbaef04 hw/xtensa/Makefile.objs: Build xtensa_sim and xtensa_fpga conditionally
9043ba2 hw/lm32/Makefile.objs: Conditionally build lm32 and milkmyst
811303a hw/sparc/Makefile.objs: CONFIG_* for sun4m and leon3 created
2f7135f hw/s390/Makefile.objs: Create new CONFIG_* variables for s390x boards and devices
af8b566 hw/sh4/Makefile.objs: New CONFIG_* varibales created for sh4 boards and device
cecc461 hw/ppc/Makefile.objs: Build all boards conditinally with CONFIG_*
4bf7173 hw/mips/Makefile.objs: Create CONFIG_* for r4k, malta, mipssim boards
6aed799 hw/microblaze/Makefile.objs: Create configs for petalogix and xilinx boards
3997152 hw/m68k/Makefile.objs: Conditionally build boards
530a866 hw/arm/Makefile.objs: CONFIG_VIRT created for virt board
fa54373 hw/i386/Makefile.objs: Build pc_piix* and pc_q35 boards
1b6abb7 build: actually use CONFIG_PAM
f6b12fb hw/pci-host/Makefile.objs: make CONFIGS clear for PCI EXPRESS
14d967c vfio: move conditional up to hw/Makefile.objs
bfa4428 ide: split ioport registration to a separate file
305912d arm: disable CONFIG_SERIAL_ISA

=== OUTPUT BEGIN ===
1/52 Checking commit 305912d25e1c (arm: disable CONFIG_SERIAL_ISA)
2/52 Checking commit bfa4428a4fa5 (ide: split ioport registration to a separate file)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#71: 
new file mode 100644

WARNING: Block comments use a leading /* on a separate line
#132: FILE: hw/ide/ioport.c:57:
+    /* ??? Assume only ISA and PCI configurations, and that the PCI-ISA

WARNING: Block comments use * on subsequent lines
#133: FILE: hw/ide/ioport.c:58:
+    /* ??? Assume only ISA and PCI configurations, and that the PCI-ISA
+       bridge has been setup properly to always register with ISA.  */

WARNING: Block comments use a trailing */ on a separate line
#133: FILE: hw/ide/ioport.c:58:
+       bridge has been setup properly to always register with ISA.  */

total: 0 errors, 4 warnings, 113 lines checked

Patch 2/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
3/52 Checking commit 14d967c0bd06 (vfio: move conditional up to hw/Makefile.objs)
4/52 Checking commit f6b12fb162a0 (hw/pci-host/Makefile.objs: make CONFIGS clear for PCI EXPRESS)
5/52 Checking commit 1b6abb71d515 (build: actually use CONFIG_PAM)
6/52 Checking commit fa5437321983 (hw/i386/Makefile.objs: Build pc_piix* and pc_q35 boards)
7/52 Checking commit 530a8668373d (hw/arm/Makefile.objs: CONFIG_VIRT created for virt board)
8/52 Checking commit 3997152f27e5 (hw/m68k/Makefile.objs: Conditionally build boards)
9/52 Checking commit 6aed799dc5f7 (hw/microblaze/Makefile.objs: Create configs for petalogix and xilinx boards)
10/52 Checking commit 4bf7173a1c3b (hw/mips/Makefile.objs: Create CONFIG_* for r4k, malta, mipssim boards)
11/52 Checking commit cecc461ab2ff (hw/ppc/Makefile.objs: Build all boards conditinally with CONFIG_*)
12/52 Checking commit af8b56692c82 (hw/sh4/Makefile.objs: New CONFIG_* varibales created for sh4 boards and device)
13/52 Checking commit 2f7135f01ea8 (hw/s390/Makefile.objs: Create new CONFIG_* variables for s390x boards and devices)
14/52 Checking commit 811303a984b6 (hw/sparc/Makefile.objs: CONFIG_* for sun4m and leon3 created)
15/52 Checking commit 9043ba2da95a (hw/lm32/Makefile.objs: Conditionally build lm32 and milkmyst)
16/52 Checking commit fbaef04334c1 (hw/xtensa/Makefile.objs: Build xtensa_sim and xtensa_fpga conditionally)
17/52 Checking commit 530165e2ef75 (hw/nios2/Makefile.objs: Conditionally build nios2)
18/52 Checking commit 0a967880791e (hw/riscv/Makefile.objs: Create CONFIG_* for riscv boards)
19/52 Checking commit 3c3acae8cd40 (hw/sparc64/Makefile.objs: Create CONFIG_* for sparc64)
20/52 Checking commit b9d2911c9dd6 (hw/alpha/Makefile.objs: Create CONFIG_* for alpha)
21/52 Checking commit ae6333d37354 (hw/cris/Makefile.objs: Create CONFIG_* for cris)
22/52 Checking commit 892410c5e9bd (hw/hppa/Makefile.objs: Create CONFIG_* for hppa)
23/52 Checking commit d2cdd2af82d2 (hw/moxie/Makefile.objs: Conditionally build moxie)
24/52 Checking commit a9bf8be75a10 (hw/openrisc/Makefile.objs: Create CONFIG_* for openrisc)
25/52 Checking commit c91ddd4eaaef (hw/tricore/Makefile.objs: Create CONFIG_* for tricore)
26/52 Checking commit b863897de362 (hw/i2c/Makefile.objs: Create new CONFIG_* variables for EEPROM and ACPI controller)
27/52 Checking commit 1733dbf5ab13 (hw/vfio/Makefile.objs: Create new CONFIG_* variables for VFIO core and PCI)
28/52 Checking commit 1ad0a25337cc (minikconfig: add parser skeleton)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#35: 
new file mode 100644

WARNING: line over 80 characters
#251: FILE: scripts/minikconf.py:212:
+                           'Expected identifier starting with "CONFIG_"', TOK_NONE)

WARNING: line over 80 characters
#344: FILE: scripts/minikconf.py:305:
+            raise KconfigParserError(self, 'expected "source", "config", identifier, '

WARNING: line over 80 characters
#370: FILE: scripts/minikconf.py:331:
+            raise KconfigParserError(self, 'expected "source", "config" or identifier')

ERROR: line over 90 characters
#395: FILE: scripts/minikconf.py:356:
+        if self.src[self.cursor + length].isalnum() or self.src[self.cursor + length] == '|':

WARNING: line over 80 characters
#448: FILE: scripts/minikconf.py:409:
+            while self.src[self.cursor].isalnum() or self.src[self.cursor] == '_':

total: 1 errors, 5 warnings, 425 lines checked

Patch 28/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

29/52 Checking commit 36b08f2e7a79 (minikconfig: add AST)
WARNING: line over 80 characters
#89: FILE: scripts/minikconf.py:86:
+                return "config %s default %s if %s" % (self.dest, value, self.cond)

total: 0 errors, 1 warnings, 170 lines checked

Patch 29/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
30/52 Checking commit 3c7f935afa91 (minikconfig: add semantic analysis)
WARNING: line over 80 characters
#112: FILE: scripts/minikconf.py:102:
+                raise Exception('contradiction between clauses when setting %s' % self)

WARNING: line over 80 characters
#215: FILE: scripts/minikconf.py:214:
+            debug_print(i, "->", [str(x) for x in self.referenced_vars[i].outgoing])

total: 0 errors, 2 warnings, 223 lines checked

Patch 30/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
31/52 Checking commit 47c5e5d25040 (hw/display: make edid configurable)
32/52 Checking commit d2539338157c (kconfig: introduce kconfig files)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#44: 
new file mode 100644

WARNING: line over 80 characters
#1762: FILE: scripts/minikconf.py:636:
+        print ("%s: at least one argument is required" % argv[0], file=sys.stderr)

total: 0 errors, 2 warnings, 1363 lines checked

Patch 32/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
33/52 Checking commit 934e48569c11 (build: switch to Kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#481: 
deleted file mode 100644

total: 0 errors, 1 warnings, 325 lines checked

Patch 33/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
34/52 Checking commit 860ef3a709c8 (minikconf: implement allnoconfig and defconfig)
35/52 Checking commit fcc8bb50ce40 (ide: express dependencies with Kconfig)
36/52 Checking commit 8cc438ca1208 (hw/pci/Makefile.objs: make pcie configurable)
37/52 Checking commit b96574e95500 (build: convert pci.mak to Kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#120: 
deleted file mode 100644

total: 0 errors, 1 warnings, 472 lines checked

Patch 37/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
38/52 Checking commit 47589bdbf26b (build: convert sound.mak to Kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#70: 
deleted file mode 100644

total: 0 errors, 1 warnings, 51 lines checked

Patch 38/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
39/52 Checking commit 36465626a31a (build: convert usb.mak to Kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#158: 
deleted file mode 100644

total: 0 errors, 1 warnings, 157 lines checked

Patch 39/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
40/52 Checking commit f4d520f1f7fc (scsi: express dependencies with Kconfig)
41/52 Checking commit 4d30a49e2660 (isa: express dependencies with kconfig)
42/52 Checking commit 1b10271dfb10 (i386: express dependencies with Kconfig)
43/52 Checking commit 70ffc63c8623 (i2c: express dependencies with Kconfig)
44/52 Checking commit 8d0e47d5b043 (ptimer: express dependencies with Kconfig)
45/52 Checking commit 0e23a1e99a67 (display: express dependencies with kconfig)
46/52 Checking commit 04964cac8397 (hyperv: express dependencies with kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#17: 
deleted file mode 100644

total: 0 errors, 1 warnings, 15 lines checked

Patch 46/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
47/52 Checking commit fc253a074755 (vfio: express vfio dependencies with Kconfig)
48/52 Checking commit af23f11ab99b (virtio: express virtio dependencies with Kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#37: 
deleted file mode 100644

total: 0 errors, 1 warnings, 109 lines checked

Patch 48/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
49/52 Checking commit dc95811473a1 (tpm: express dependencies with Kconfig)
50/52 Checking commit 6f1e6af4d997 (isa: express SuperIO dependencies with Kconfig)
51/52 Checking commit c9d0fe6e67ab (i386-softmmu.mak: remove all CONFIG_* except boards definitions)
52/52 Checking commit a79752a80249 (kconfig: introduce CONFIG_TEST_DEVICES)
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/1548410831-19553-1-git-send-email-pbonzini@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@redhat.com

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 41/52] isa: express dependencies with kconfig
  2019-01-31 22:14     ` Paolo Bonzini
@ 2019-01-31 22:24       ` Philippe Mathieu-Daudé
  2019-02-14 16:46         ` Paolo Bonzini
  0 siblings, 1 reply; 119+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-01-31 22:24 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: yang.zhong, thuth

On 1/31/19 11:14 PM, Paolo Bonzini wrote:
> On 31/01/19 22:22, Philippe Mathieu-Daudé wrote:
>> I kinda disagree with the SuperIO generated configs here, but partly my
>> fault because the previous Makefile.objs missed the CONFIG_ISA_SUPERIO
>> (I missed to review eae2e2e96bf from Thomas where is introduced
>> CONFIG_SMC37C669).
>> So introducing ISA_SUPERIO simplifies this files and SouthBridge
>> devices. I'm not sure how to provide this patch:
> 
> The problem is different SuperIO chips can have or lack
> floppy/serial/parallel, and so they end up having different dependencies.
> 
> Config symbols are a tool to generate working QEMUs (where working =
> build and pass device-introspect-test more or less), they needn't
> reflect precisely the topology of the machine.

The model implementation is:
- abstract SuperIO parent which can instantiate all configs,
- child implementation.

Childs require their parent, and even if the parent will instantiate
them without all properties, the parent needs to link with them.

In short, if a SuperIO child requires ISA_SUPERIO, it also requires to
link to serial/parallel/floppy/ide.

That's why I prefer the explicit dependencies.

Oh, actually if we correctly use the TYPE_XXX names, it might link.
The only problem would be trying to instantiate a device via QMP then?

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (58 preceding siblings ...)
  2019-01-31 22:22 ` no-reply
@ 2019-01-31 22:26 ` no-reply
  2019-02-01 10:41 ` Philippe Mathieu-Daudé
  2019-02-03 12:01 ` no-reply
  61 siblings, 0 replies; 119+ messages in thread
From: no-reply @ 2019-01-31 22:26 UTC (permalink / raw)
  To: pbonzini; +Cc: fam, qemu-devel, yang.zhong, thuth

Patchew URL: https://patchew.org/QEMU/1548410831-19553-1-git-send-email-pbonzini@redhat.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Subject: [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU
Message-id: 1548410831-19553-1-git-send-email-pbonzini@redhat.com
Type: series

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 - [tag update]      patchew/1548410831-19553-1-git-send-email-pbonzini@redhat.com -> patchew/1548410831-19553-1-git-send-email-pbonzini@redhat.com
Submodule 'capstone' (https://git.qemu.org/git/capstone.git) registered for path 'capstone'
Submodule 'dtc' (https://git.qemu.org/git/dtc.git) registered for path 'dtc'
Submodule 'roms/QemuMacDrivers' (https://git.qemu.org/git/QemuMacDrivers.git) registered for path 'roms/QemuMacDrivers'
Submodule 'roms/SLOF' (https://git.qemu.org/git/SLOF.git) registered for path 'roms/SLOF'
Submodule 'roms/ipxe' (https://git.qemu.org/git/ipxe.git) registered for path 'roms/ipxe'
Submodule 'roms/openbios' (https://git.qemu.org/git/openbios.git) registered for path 'roms/openbios'
Submodule 'roms/openhackware' (https://git.qemu.org/git/openhackware.git) registered for path 'roms/openhackware'
Submodule 'roms/qemu-palcode' (https://git.qemu.org/git/qemu-palcode.git) registered for path 'roms/qemu-palcode'
Submodule 'roms/seabios' (https://git.qemu.org/git/seabios.git/) registered for path 'roms/seabios'
Submodule 'roms/seabios-hppa' (https://github.com/hdeller/seabios-hppa.git) registered for path 'roms/seabios-hppa'
Submodule 'roms/sgabios' (https://git.qemu.org/git/sgabios.git) registered for path 'roms/sgabios'
Submodule 'roms/skiboot' (https://git.qemu.org/git/skiboot.git) registered for path 'roms/skiboot'
Submodule 'roms/u-boot' (https://git.qemu.org/git/u-boot.git) registered for path 'roms/u-boot'
Submodule 'roms/u-boot-sam460ex' (https://git.qemu.org/git/u-boot-sam460ex.git) registered for path 'roms/u-boot-sam460ex'
Submodule 'tests/fp/berkeley-softfloat-3' (https://github.com/cota/berkeley-softfloat-3) registered for path 'tests/fp/berkeley-softfloat-3'
Submodule 'tests/fp/berkeley-testfloat-3' (https://github.com/cota/berkeley-testfloat-3) registered for path 'tests/fp/berkeley-testfloat-3'
Submodule 'ui/keycodemapdb' (https://git.qemu.org/git/keycodemapdb.git) registered for path 'ui/keycodemapdb'
Cloning into 'capstone'...
Submodule path 'capstone': checked out '22ead3e0bfdb87516656453336160e0a37b066bf'
Cloning into 'dtc'...
Submodule path 'dtc': checked out '88f18909db731a627456f26d779445f84e449536'
Cloning into 'roms/QemuMacDrivers'...
Submodule path 'roms/QemuMacDrivers': checked out 'd4e7d7ac663fcb55f1b93575445fcbca372f17a7'
Cloning into 'roms/SLOF'...
Submodule path 'roms/SLOF': checked out '9b7ab2fa020341dee8bf9df6c9cf40003e0136df'
Cloning into 'roms/ipxe'...
Submodule path 'roms/ipxe': checked out 'de4565cbe76ea9f7913a01f331be3ee901bb6e17'
Cloning into 'roms/openbios'...
Submodule path 'roms/openbios': checked out '441a84d3a642a10b948369c63f32367e8ff6395b'
Cloning into 'roms/openhackware'...
Submodule path 'roms/openhackware': checked out 'c559da7c8eec5e45ef1f67978827af6f0b9546f5'
Cloning into 'roms/qemu-palcode'...
Submodule path 'roms/qemu-palcode': checked out '51c237d7e20d05100eacadee2f61abc17e6bc097'
Cloning into 'roms/seabios'...
Submodule path 'roms/seabios': checked out 'a698c8995ffb2838296ec284fe3c4ad33dfca307'
Cloning into 'roms/seabios-hppa'...
Submodule path 'roms/seabios-hppa': checked out '1ef99a01572c2581c30e16e6fe69e9ea2ef92ce0'
Cloning into 'roms/sgabios'...
Submodule path 'roms/sgabios': checked out 'cbaee52287e5f32373181cff50a00b6c4ac9015a'
Cloning into 'roms/skiboot'...
Submodule path 'roms/skiboot': checked out 'e0ee24c27a172bcf482f6f2bc905e6211c134bcc'
Cloning into 'roms/u-boot'...
Submodule path 'roms/u-boot': checked out 'd85ca029f257b53a96da6c2fb421e78a003a9943'
Cloning into 'roms/u-boot-sam460ex'...
Submodule path 'roms/u-boot-sam460ex': checked out '60b3916f33e617a815973c5a6df77055b2e3a588'
Cloning into 'tests/fp/berkeley-softfloat-3'...
Submodule path 'tests/fp/berkeley-softfloat-3': checked out 'b64af41c3276f97f0e181920400ee056b9c88037'
Cloning into 'tests/fp/berkeley-testfloat-3'...
Submodule path 'tests/fp/berkeley-testfloat-3': checked out '5a59dcec19327396a011a17fd924aed4fec416b3'
Cloning into 'ui/keycodemapdb'...
Submodule path 'ui/keycodemapdb': checked out '6b3d716e2b6472eb7189d3220552280ef3d832ce'
Switched to a new branch 'test'
a79752a kconfig: introduce CONFIG_TEST_DEVICES
c9d0fe6 i386-softmmu.mak: remove all CONFIG_* except boards definitions
6f1e6af isa: express SuperIO dependencies with Kconfig
dc95811 tpm: express dependencies with Kconfig
af23f11 virtio: express virtio dependencies with Kconfig
fc253a0 vfio: express vfio dependencies with Kconfig
04964ca hyperv: express dependencies with kconfig
0e23a1e display: express dependencies with kconfig
8d0e47d ptimer: express dependencies with Kconfig
70ffc63 i2c: express dependencies with Kconfig
1b10271 i386: express dependencies with Kconfig
4d30a49 isa: express dependencies with kconfig
f4d520f scsi: express dependencies with Kconfig
3646562 build: convert usb.mak to Kconfig
47589bd build: convert sound.mak to Kconfig
b96574e build: convert pci.mak to Kconfig
8cc438c hw/pci/Makefile.objs: make pcie configurable
fcc8bb5 ide: express dependencies with Kconfig
860ef3a minikconf: implement allnoconfig and defconfig
934e485 build: switch to Kconfig
d253933 kconfig: introduce kconfig files
47c5e5d hw/display: make edid configurable
3c7f935 minikconfig: add semantic analysis
36b08f2 minikconfig: add AST
1ad0a25 minikconfig: add parser skeleton
1733dbf hw/vfio/Makefile.objs: Create new CONFIG_* variables for VFIO core and PCI
b863897 hw/i2c/Makefile.objs: Create new CONFIG_* variables for EEPROM and ACPI controller
c91ddd4 hw/tricore/Makefile.objs: Create CONFIG_* for tricore
a9bf8be hw/openrisc/Makefile.objs: Create CONFIG_* for openrisc
d2cdd2a hw/moxie/Makefile.objs: Conditionally build moxie
892410c hw/hppa/Makefile.objs: Create CONFIG_* for hppa
ae6333d hw/cris/Makefile.objs: Create CONFIG_* for cris
b9d2911 hw/alpha/Makefile.objs: Create CONFIG_* for alpha
3c3acae hw/sparc64/Makefile.objs: Create CONFIG_* for sparc64
0a96788 hw/riscv/Makefile.objs: Create CONFIG_* for riscv boards
530165e hw/nios2/Makefile.objs: Conditionally build nios2
fbaef04 hw/xtensa/Makefile.objs: Build xtensa_sim and xtensa_fpga conditionally
9043ba2 hw/lm32/Makefile.objs: Conditionally build lm32 and milkmyst
811303a hw/sparc/Makefile.objs: CONFIG_* for sun4m and leon3 created
2f7135f hw/s390/Makefile.objs: Create new CONFIG_* variables for s390x boards and devices
af8b566 hw/sh4/Makefile.objs: New CONFIG_* varibales created for sh4 boards and device
cecc461 hw/ppc/Makefile.objs: Build all boards conditinally with CONFIG_*
4bf7173 hw/mips/Makefile.objs: Create CONFIG_* for r4k, malta, mipssim boards
6aed799 hw/microblaze/Makefile.objs: Create configs for petalogix and xilinx boards
3997152 hw/m68k/Makefile.objs: Conditionally build boards
530a866 hw/arm/Makefile.objs: CONFIG_VIRT created for virt board
fa54373 hw/i386/Makefile.objs: Build pc_piix* and pc_q35 boards
1b6abb7 build: actually use CONFIG_PAM
f6b12fb hw/pci-host/Makefile.objs: make CONFIGS clear for PCI EXPRESS
14d967c vfio: move conditional up to hw/Makefile.objs
bfa4428 ide: split ioport registration to a separate file
305912d arm: disable CONFIG_SERIAL_ISA

=== OUTPUT BEGIN ===
1/52 Checking commit 305912d25e1c (arm: disable CONFIG_SERIAL_ISA)
2/52 Checking commit bfa4428a4fa5 (ide: split ioport registration to a separate file)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#71: 
new file mode 100644

WARNING: Block comments use a leading /* on a separate line
#132: FILE: hw/ide/ioport.c:57:
+    /* ??? Assume only ISA and PCI configurations, and that the PCI-ISA

WARNING: Block comments use * on subsequent lines
#133: FILE: hw/ide/ioport.c:58:
+    /* ??? Assume only ISA and PCI configurations, and that the PCI-ISA
+       bridge has been setup properly to always register with ISA.  */

WARNING: Block comments use a trailing */ on a separate line
#133: FILE: hw/ide/ioport.c:58:
+       bridge has been setup properly to always register with ISA.  */

total: 0 errors, 4 warnings, 113 lines checked

Patch 2/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
3/52 Checking commit 14d967c0bd06 (vfio: move conditional up to hw/Makefile.objs)
4/52 Checking commit f6b12fb162a0 (hw/pci-host/Makefile.objs: make CONFIGS clear for PCI EXPRESS)
5/52 Checking commit 1b6abb71d515 (build: actually use CONFIG_PAM)
6/52 Checking commit fa5437321983 (hw/i386/Makefile.objs: Build pc_piix* and pc_q35 boards)
7/52 Checking commit 530a8668373d (hw/arm/Makefile.objs: CONFIG_VIRT created for virt board)
8/52 Checking commit 3997152f27e5 (hw/m68k/Makefile.objs: Conditionally build boards)
9/52 Checking commit 6aed799dc5f7 (hw/microblaze/Makefile.objs: Create configs for petalogix and xilinx boards)
10/52 Checking commit 4bf7173a1c3b (hw/mips/Makefile.objs: Create CONFIG_* for r4k, malta, mipssim boards)
11/52 Checking commit cecc461ab2ff (hw/ppc/Makefile.objs: Build all boards conditinally with CONFIG_*)
12/52 Checking commit af8b56692c82 (hw/sh4/Makefile.objs: New CONFIG_* varibales created for sh4 boards and device)
13/52 Checking commit 2f7135f01ea8 (hw/s390/Makefile.objs: Create new CONFIG_* variables for s390x boards and devices)
14/52 Checking commit 811303a984b6 (hw/sparc/Makefile.objs: CONFIG_* for sun4m and leon3 created)
15/52 Checking commit 9043ba2da95a (hw/lm32/Makefile.objs: Conditionally build lm32 and milkmyst)
16/52 Checking commit fbaef04334c1 (hw/xtensa/Makefile.objs: Build xtensa_sim and xtensa_fpga conditionally)
17/52 Checking commit 530165e2ef75 (hw/nios2/Makefile.objs: Conditionally build nios2)
18/52 Checking commit 0a967880791e (hw/riscv/Makefile.objs: Create CONFIG_* for riscv boards)
19/52 Checking commit 3c3acae8cd40 (hw/sparc64/Makefile.objs: Create CONFIG_* for sparc64)
20/52 Checking commit b9d2911c9dd6 (hw/alpha/Makefile.objs: Create CONFIG_* for alpha)
21/52 Checking commit ae6333d37354 (hw/cris/Makefile.objs: Create CONFIG_* for cris)
22/52 Checking commit 892410c5e9bd (hw/hppa/Makefile.objs: Create CONFIG_* for hppa)
23/52 Checking commit d2cdd2af82d2 (hw/moxie/Makefile.objs: Conditionally build moxie)
24/52 Checking commit a9bf8be75a10 (hw/openrisc/Makefile.objs: Create CONFIG_* for openrisc)
25/52 Checking commit c91ddd4eaaef (hw/tricore/Makefile.objs: Create CONFIG_* for tricore)
26/52 Checking commit b863897de362 (hw/i2c/Makefile.objs: Create new CONFIG_* variables for EEPROM and ACPI controller)
27/52 Checking commit 1733dbf5ab13 (hw/vfio/Makefile.objs: Create new CONFIG_* variables for VFIO core and PCI)
28/52 Checking commit 1ad0a25337cc (minikconfig: add parser skeleton)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#35: 
new file mode 100644

WARNING: line over 80 characters
#251: FILE: scripts/minikconf.py:212:
+                           'Expected identifier starting with "CONFIG_"', TOK_NONE)

WARNING: line over 80 characters
#344: FILE: scripts/minikconf.py:305:
+            raise KconfigParserError(self, 'expected "source", "config", identifier, '

WARNING: line over 80 characters
#370: FILE: scripts/minikconf.py:331:
+            raise KconfigParserError(self, 'expected "source", "config" or identifier')

ERROR: line over 90 characters
#395: FILE: scripts/minikconf.py:356:
+        if self.src[self.cursor + length].isalnum() or self.src[self.cursor + length] == '|':

WARNING: line over 80 characters
#448: FILE: scripts/minikconf.py:409:
+            while self.src[self.cursor].isalnum() or self.src[self.cursor] == '_':

total: 1 errors, 5 warnings, 425 lines checked

Patch 28/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

29/52 Checking commit 36b08f2e7a79 (minikconfig: add AST)
WARNING: line over 80 characters
#89: FILE: scripts/minikconf.py:86:
+                return "config %s default %s if %s" % (self.dest, value, self.cond)

total: 0 errors, 1 warnings, 170 lines checked

Patch 29/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
30/52 Checking commit 3c7f935afa91 (minikconfig: add semantic analysis)
WARNING: line over 80 characters
#112: FILE: scripts/minikconf.py:102:
+                raise Exception('contradiction between clauses when setting %s' % self)

WARNING: line over 80 characters
#215: FILE: scripts/minikconf.py:214:
+            debug_print(i, "->", [str(x) for x in self.referenced_vars[i].outgoing])

total: 0 errors, 2 warnings, 223 lines checked

Patch 30/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
31/52 Checking commit 47c5e5d25040 (hw/display: make edid configurable)
32/52 Checking commit d2539338157c (kconfig: introduce kconfig files)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#44: 
new file mode 100644

WARNING: line over 80 characters
#1762: FILE: scripts/minikconf.py:636:
+        print ("%s: at least one argument is required" % argv[0], file=sys.stderr)

total: 0 errors, 2 warnings, 1363 lines checked

Patch 32/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
33/52 Checking commit 934e48569c11 (build: switch to Kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#481: 
deleted file mode 100644

total: 0 errors, 1 warnings, 325 lines checked

Patch 33/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
34/52 Checking commit 860ef3a709c8 (minikconf: implement allnoconfig and defconfig)
35/52 Checking commit fcc8bb50ce40 (ide: express dependencies with Kconfig)
36/52 Checking commit 8cc438ca1208 (hw/pci/Makefile.objs: make pcie configurable)
37/52 Checking commit b96574e95500 (build: convert pci.mak to Kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#120: 
deleted file mode 100644

total: 0 errors, 1 warnings, 472 lines checked

Patch 37/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
38/52 Checking commit 47589bdbf26b (build: convert sound.mak to Kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#70: 
deleted file mode 100644

total: 0 errors, 1 warnings, 51 lines checked

Patch 38/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
39/52 Checking commit 36465626a31a (build: convert usb.mak to Kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#158: 
deleted file mode 100644

total: 0 errors, 1 warnings, 157 lines checked

Patch 39/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
40/52 Checking commit f4d520f1f7fc (scsi: express dependencies with Kconfig)
41/52 Checking commit 4d30a49e2660 (isa: express dependencies with kconfig)
42/52 Checking commit 1b10271dfb10 (i386: express dependencies with Kconfig)
43/52 Checking commit 70ffc63c8623 (i2c: express dependencies with Kconfig)
44/52 Checking commit 8d0e47d5b043 (ptimer: express dependencies with Kconfig)
45/52 Checking commit 0e23a1e99a67 (display: express dependencies with kconfig)
46/52 Checking commit 04964cac8397 (hyperv: express dependencies with kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#17: 
deleted file mode 100644

total: 0 errors, 1 warnings, 15 lines checked

Patch 46/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
47/52 Checking commit fc253a074755 (vfio: express vfio dependencies with Kconfig)
48/52 Checking commit af23f11ab99b (virtio: express virtio dependencies with Kconfig)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#37: 
deleted file mode 100644

total: 0 errors, 1 warnings, 109 lines checked

Patch 48/52 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
49/52 Checking commit dc95811473a1 (tpm: express dependencies with Kconfig)
50/52 Checking commit 6f1e6af4d997 (isa: express SuperIO dependencies with Kconfig)
51/52 Checking commit c9d0fe6e67ab (i386-softmmu.mak: remove all CONFIG_* except boards definitions)
52/52 Checking commit a79752a80249 (kconfig: introduce CONFIG_TEST_DEVICES)
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/1548410831-19553-1-git-send-email-pbonzini@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@redhat.com

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (59 preceding siblings ...)
  2019-01-31 22:26 ` no-reply
@ 2019-02-01 10:41 ` Philippe Mathieu-Daudé
  2019-02-03 12:01 ` no-reply
  61 siblings, 0 replies; 119+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-02-01 10:41 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: yang.zhong, thuth

Hi,

On 1/25/19 11:06 AM, Paolo Bonzini wrote:
> (I'm only momentarily at the helm and will give control back to Yang after
> this iteration.)
> 
> This is still RFC mostly because of the lack of documentation, and because
> only x86 is fully converted, but it's converging.  Other targets still
> enable embedded devices in default-configs/ instead of using "select"
> directives.  For many targets, the conversion will be trivial because
> they only support one board.  The complex ones are ARM, MIPS and PPC
> of course.  s390 as usual is just different in some respects, but all
> of its issues are sorted out already in this series and so it's just
> yet another single-board target.
> 
> It supports defconfig (default-configs file chooses boards only)
> and allnoconfig (default-configs file chooses devices too) and builds
> all targets.  I haven't yet checked that the configuration is the same
> before and after the conversion, but at least device-introspection-test
> and other qtests all pass, which did catch some errors.
> 
> As mentioned in the previous versions, this is only a replacement
> for default-configs, in order to simplify configuration and remove
> the need to track dependencies between configuration symbols.  In
> fact, even with the current incomplete conversion the diffstat
> for default-configs is already
> 
>  31 files changed, 108 insertions(+), 241 deletions(-)
> 
> Devices can be disabled by adding for example
> 
>    CONFIG_HPET=n
> 
> to default-configs/i386-softmmu.mak.  If you prefer they can be
> listed manually and "make allnoconfig" can be executed before
> building.  This probably should become a configure option
> "--without-default-devices" instead.
> 
> For the previous discussions on the Kconfig design, see
> http://lists.nongnu.org/archive/html/qemu-devel/2018-09/msg02827.html
> 
> Patches 1-27 should probably be committed now, so please review!  Yang,
> once they are reviewed you can extract them and post them to the
> mailing list as non-RFC!
> 
> As to the rest, you're welcome to try them, post conversions for the
> simple targets, suggest usability improvements, and whatever.  Thanks to
> everyone for the work on the previous iterations.  It's great to see
> the work on this GSoC project come back to life after five years!

How to express "depends of (TARGET_LONG_BITS > 32)"?

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 33/52] build: switch to Kconfig
  2019-01-31 22:15     ` Paolo Bonzini
@ 2019-02-01 14:56       ` Philippe Mathieu-Daudé
  2019-02-01 21:24         ` Paolo Bonzini
  2019-02-04 12:58         ` Paolo Bonzini
  0 siblings, 2 replies; 119+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-02-01 14:56 UTC (permalink / raw)
  To: Paolo Bonzini, Stefano Stabellini, Anthony Perard, Paul Durrant, thuth
  Cc: qemu-devel, yang.zhong

On 1/31/19 11:15 PM, Paolo Bonzini wrote:
> On 31/01/19 22:48, Philippe Mathieu-Daudé wrote:
>> There is something I don't understand here: Does CONFIG_XEN in
>> Kconfig.host take precedence over the target configs? I'm looking at
>> these configs:
>>
>>  if supported_xen_target $target; then
>>      echo "CONFIG_XEN=n" >> $config_target_mak
>>      if test "$xen_pci_passthrough" = yes; then
>>          echo "CONFIG_XEN_PCI_PASSTHROUGH=y" >> "$config_target_mak"
>>      fi
>>  fi
> 
> You're right, Kconfig.host should contain CONFIG_XEN_BACKEND and not
> CONFIG_XEN.

Now when I disable Xen, exec.o isn't rebuilt, so I get link errors:

/usr/bin/ld: exec.o: in function `reclaim_ramblock':
qemu/exec.c:2392: undefined reference to `xen_invalidate_map_cache_entry'
/usr/bin/ld: exec.o: in function `qemu_ram_ptr_length':
qemu/exec.c:2531: undefined reference to `xen_map_cache'
/usr/bin/ld: exec.o: in function `qemu_map_ram_ptr':
qemu/exec.c:2498: undefined reference to `xen_map_cache'
/usr/bin/ld: exec.o: in function `qemu_ram_block_from_host':
qemu/exec.c:2573: undefined reference to `xen_ram_addr_from_mapcache'
/usr/bin/ld: exec.o: in function `address_space_unmap':
qemu/exec.c:3699: undefined reference to `xen_invalidate_map_cache_entry'
/usr/bin/ld: exec.o: in function `address_space_cache_destroy':
qemu/exec.c:3791: undefined reference to `xen_invalidate_map_cache_entry'
/usr/bin/ld: exec.o: in function `qemu_ram_ptr_length':
qemu/exec.c:2528: undefined reference to `xen_map_cache'
/usr/bin/ld: exec.o: in function `qemu_map_ram_ptr':
qemu/exec.c:2495: undefined reference to `xen_map_cache'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:204: qemu-system-i386] Error 1

Moving those function stubs into a real xen-stub.c file would be simpler
from the buildsys PoV IMHO, but I also remember we prefer to avoid
stubs, so not sure what's better here, neither what's wrong with make rules.

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 42/52] i386: express dependencies with Kconfig
  2019-01-25 10:07 ` [Qemu-devel] [PATCH 42/52] i386: express dependencies with Kconfig Paolo Bonzini
  2019-01-28 14:21   ` Thomas Huth
@ 2019-02-01 15:05   ` Philippe Mathieu-Daudé
  2019-02-01 20:58     ` Paolo Bonzini
  2019-02-14 16:47     ` Paolo Bonzini
  1 sibling, 2 replies; 119+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-02-01 15:05 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel, Gerd Hoffmann, Michael S. Tsirkin
  Cc: yang.zhong, thuth

Hi Paolo,

On 1/25/19 11:07 AM, Paolo Bonzini wrote:
> This way, the default-configs file only need to specify the boards
> and any optional devices.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Yang Zhong <yang.zhong@intel.com>
> Message-Id: <20190123065618.3520-37-yang.zhong@intel.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  default-configs/i386-softmmu.mak | 44 ++++++--------------------------
>  hw/acpi/Kconfig                  |  3 +++
>  hw/i2c/Makefile.objs             |  2 +-
>  hw/i386/Kconfig                  | 54 ++++++++++++++++++++++++++++++++++++++++
>  hw/isa/Kconfig                   |  1 +
>  hw/pci-host/Kconfig              |  4 +++
>  hw/tpm/Kconfig                   |  2 ++
>  7 files changed, 73 insertions(+), 37 deletions(-)
> 
> diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmmu.mak
> index 8e6a810..9eb9a5e 100644
> --- a/default-configs/i386-softmmu.mak
> +++ b/default-configs/i386-softmmu.mak
> @@ -1,11 +1,6 @@
>  # Default configuration for i386-softmmu
>  
> -CONFIG_PCI=y
> -CONFIG_PCI_DEVICES=y
> -CONFIG_ISA_BUS=y
>  include hyperv.mak
> -CONFIG_VGA_ISA=y
> -CONFIG_VMWARE_VGA=y
>  CONFIG_VMXNET3_PCI=y
>  CONFIG_VIRTIO_VGA=y
>  CONFIG_IPMI=y
> @@ -13,49 +8,26 @@ CONFIG_IPMI_LOCAL=y
>  CONFIG_IPMI_EXTERN=y
>  CONFIG_ISA_IPMI_KCS=y
>  CONFIG_ISA_IPMI_BT=y
> -CONFIG_I8254=y
> -CONFIG_ACPI=y
> -CONFIG_ACPI_X86=y
> -CONFIG_ACPI_X86_ICH=y
> -CONFIG_ACPI_MEMORY_HOTPLUG=y
> -CONFIG_ACPI_CPU_HOTPLUG=y
> -CONFIG_APM=y
> -CONFIG_I8257=y
> -CONFIG_IDE_ISA=y
> -CONFIG_IDE_PIIX=y
> +
> +# Optional devices:
> +#
>  CONFIG_HPET=y
>  CONFIG_APPLESMC=y
> -CONFIG_I8259=y
>  CONFIG_PFLASH_CFI01=y
> -CONFIG_MC146818RTC=y
> -CONFIG_PCI_PIIX=y
> -CONFIG_ISA_DEBUG=y
>  CONFIG_ISA_TESTDEV=y
> -CONFIG_VMPORT=y
>  CONFIG_SGA=y
> -CONFIG_LPC_ICH9=y
> -CONFIG_PCI_EXPRESS=y
> -CONFIG_PCI_EXPRESS_Q35=y
> -CONFIG_APIC=y
> -CONFIG_IOAPIC=y
>  CONFIG_PVPANIC=y
>  CONFIG_MEM_DEVICE=y
> -CONFIG_DIMM=y
>  CONFIG_NVDIMM=y
>  CONFIG_ACPI_NVDIMM=y
> -CONFIG_XIO3130=y
> -CONFIG_IOH3420=y
> -CONFIG_I82801B11=y
> -CONFIG_SMBIOS=y
>  CONFIG_PXB=y
>  CONFIG_ACPI_VMGENID=y
> -CONFIG_ACPI_SMBUS=y
>  CONFIG_SMBUS_EEPROM=y
> -CONFIG_FW_CFG_DMA=y
>  CONFIG_I2C=y
> -CONFIG_VTD=y
> -CONFIG_AMD_IOMMU=y
> -CONFIG_PAM=y
> -CONFIG_PC=y
> +CONFIG_PCI_DEVICES=y
> +
> +# Boards:
> +#
> +CONFIG_ISAPC=y
>  CONFIG_I440FX=y
>  CONFIG_Q35=y
> diff --git a/hw/acpi/Kconfig b/hw/acpi/Kconfig
> index c485a34..035a28f 100644
> --- a/hw/acpi/Kconfig
> +++ b/hw/acpi/Kconfig
> @@ -3,15 +3,18 @@ config ACPI
>  
>  config ACPI_X86
>      bool
> +    select ACPI
>  
>  config ACPI_X86_ICH
>      bool
> +    select ACPI_X86
>  
>  config ACPI_CPU_HOTPLUG
>      bool
>  
>  config ACPI_MEMORY_HOTPLUG
>      bool
> +    select MEM_DEVICE
>  
>  config ACPI_NVDIMM
>      bool
> diff --git a/hw/i2c/Makefile.objs b/hw/i2c/Makefile.objs
> index 61ac50a..ff22aa6 100644
> --- a/hw/i2c/Makefile.objs
> +++ b/hw/i2c/Makefile.objs
> @@ -2,7 +2,7 @@ common-obj-$(CONFIG_I2C) += core.o smbus.o
>  common-obj-$(CONFIG_SMBUS_EEPROM) += smbus_eeprom.o
>  common-obj-$(CONFIG_DDC) += i2c-ddc.o
>  common-obj-$(CONFIG_VERSATILE_I2C) += versatile_i2c.o
> -common-obj-$(CONFIG_ACPI_X86) += smbus_ich9.o
> +common-obj-$(CONFIG_ACPI_X86_ICH) += smbus_ich9.o
>  common-obj-$(CONFIG_ACPI_SMBUS) += pm_smbus.o
>  common-obj-$(CONFIG_BITBANG_I2C) += bitbang_i2c.o
>  common-obj-$(CONFIG_EXYNOS4) += exynos4210_i2c.o
> diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
> index ff41be3..8814b7c 100644
> --- a/hw/i386/Kconfig
> +++ b/hw/i386/Kconfig
> @@ -5,20 +5,73 @@ config SEV
>  config PC
>      bool
>  
> +config PC
> +    bool
> +    select ISA_DEBUG
> +    select I8259
> +    select I8254
> +    select PCSPK
> +    select I82374
> +    select I8257
> +    select MC146818RTC
> +
> +config PC_PCI
> +    bool
> +    select APIC
> +    select IOAPIC
> +    select APM
> +    select PC
> +
> +config PC_ACPI
> +    bool
> +    select ACPI_X86
> +    select ACPI_CPU_HOTPLUG
> +    select ACPI_MEMORY_HOTPLUG
> +    depends on ACPI_SMBUS
> +
>  config I440FX
>      bool
> +    select PC_PCI
> +    select PC_ACPI
> +    select ACPI_SMBUS
> +    select PCI_PIIX
> +    select FDC
> +    select IDE_PIIX
> +    select DIMM
> +    select SMBIOS
> +    select VMPORT
> +    select VMMOUSE
> +    select FW_CFG_DMA
>  
>  config ISAPC
>      bool
>      select ISA_BUS
> +    select PC
> +    select IDE_ISA
> +    select VGA_ISA
> +    # FIXME: it is in the same file as i440fx, and does not compile
> +    # if separated
> +    depends on I440FX
>  
>  config Q35
>      bool
> +    select PC_PCI
> +    select PC_ACPI
> +    select PCI_EXPRESS_Q35
> +    select LPC_ICH9
> +    select AHCI
> +    select DIMM
> +    select SMBIOS
> +    select VMPORT
> +    select VMMOUSE
> +    select FW_CFG_DMA

This lacks a DISPLAY dependency?

$ i386-softmmu/qemu-system-i386 -M q35
qemu-system-i386: Unknown device 'VGA' for bus 'PCIE'
Aborted (core dumped)

PCIDevice *pci_vga_init(PCIBus *bus)
{
    switch (vga_interface_type) {
    case VGA_CIRRUS:
        return pci_create_simple(bus, -1, "cirrus-vga");
    case VGA_QXL:
        return pci_create_simple(bus, -1, "qxl-vga");
    case VGA_STD:
        return pci_create_simple(bus, -1, "VGA");
    case VGA_VMWARE:
        return pci_create_simple(bus, -1, "vmware-svga");
    case VGA_VIRTIO:
        return pci_create_simple(bus, -1, "virtio-vga");
    case VGA_NONE:
    default: /* Other non-PCI types. Checking for unsupported types is
already
                done in vl.c. */
        return NULL;
    }
}

If so, how to express "at least one of *TYPE"?

>  
>  config VTD
> +    default y if Q35
>      bool
>  
>  config AMD_IOMMU
> +    default y if Q35
>      bool
>  
>  config VMPORT
> @@ -26,3 +79,4 @@ config VMPORT
>  
>  config VMMOUSE
>      bool
> +    depends on VMPORT
> diff --git a/hw/isa/Kconfig b/hw/isa/Kconfig
> index af68af9..6f0812d 100644
> --- a/hw/isa/Kconfig
> +++ b/hw/isa/Kconfig
> @@ -27,4 +27,5 @@ config SMC37C669
>  config LPC_ICH9
>      bool
>      select ISA_BUS
> +    select ACPI_SMBUS
>      select ACPI_X86_ICH
> diff --git a/hw/pci-host/Kconfig b/hw/pci-host/Kconfig
> index c01812a..ff4080c 100644
> --- a/hw/pci-host/Kconfig
> +++ b/hw/pci-host/Kconfig
> @@ -27,10 +27,14 @@ config PCI_SABRE
>  
>  config PCI_PIIX
>      bool
> +    select PCI
> +    select PAM
> +    select ISA_BUS
>  
>  config PCI_EXPRESS_Q35
>      bool
>      select PCI_EXPRESS
> +    select PAM
>  
>  config PCI_EXPRESS_GENERIC_BRIDGE
>      bool
> diff --git a/hw/tpm/Kconfig b/hw/tpm/Kconfig
> index db57388..8a63597 100644
> --- a/hw/tpm/Kconfig
> +++ b/hw/tpm/Kconfig
> @@ -8,6 +8,8 @@ config TPM_TIS
>  
>  config TPM_CRB
>      bool
> +    default y
> +    depends on TPM && PC
>  
>  config TPM_PASSTHROUGH
>      bool
> 

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 42/52] i386: express dependencies with Kconfig
  2019-02-01 15:05   ` Philippe Mathieu-Daudé
@ 2019-02-01 20:58     ` Paolo Bonzini
  2019-02-14 16:47     ` Paolo Bonzini
  1 sibling, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-02-01 20:58 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé,
	qemu-devel, Gerd Hoffmann, Michael S. Tsirkin
  Cc: yang.zhong, thuth

On 01/02/19 16:05, Philippe Mathieu-Daudé wrote:
> This lacks a DISPLAY dependency?
> 
> $ i386-softmmu/qemu-system-i386 -M q35
> qemu-system-i386: Unknown device 'VGA' for bus 'PCIE'
> Aborted (core dumped)

If you build --without-default-devices, you pretty much have to do one
of two things: 1) enable some devices yourself; 2) always run QEMU with
-nodefaults.

Paolo

> PCIDevice *pci_vga_init(PCIBus *bus)
> {
>     switch (vga_interface_type) {
>     case VGA_CIRRUS:
>         return pci_create_simple(bus, -1, "cirrus-vga");
>     case VGA_QXL:
>         return pci_create_simple(bus, -1, "qxl-vga");
>     case VGA_STD:
>         return pci_create_simple(bus, -1, "VGA");
>     case VGA_VMWARE:
>         return pci_create_simple(bus, -1, "vmware-svga");
>     case VGA_VIRTIO:
>         return pci_create_simple(bus, -1, "virtio-vga");
>     case VGA_NONE:
>     default: /* Other non-PCI types. Checking for unsupported types is
> already
>                 done in vl.c. */
>         return NULL;
>     }
> }
> 
> If so, how to express "at least one of *TYPE"?
> 

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 33/52] build: switch to Kconfig
  2019-02-01 14:56       ` Philippe Mathieu-Daudé
@ 2019-02-01 21:24         ` Paolo Bonzini
  2019-02-04 12:58         ` Paolo Bonzini
  1 sibling, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-02-01 21:24 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé,
	Stefano Stabellini, Anthony Perard, Paul Durrant, thuth
  Cc: yang.zhong, qemu-devel

On 01/02/19 15:56, Philippe Mathieu-Daudé wrote:
> Now when I disable Xen, exec.o isn't rebuilt, so I get link errors:
> 
> /usr/bin/ld: exec.o: in function `reclaim_ramblock':
> qemu/exec.c:2392: undefined reference to `xen_invalidate_map_cache_entry'
> /usr/bin/ld: exec.o: in function `qemu_ram_ptr_length':
> qemu/exec.c:2531: undefined reference to `xen_map_cache'
> /usr/bin/ld: exec.o: in function `qemu_map_ram_ptr':
> qemu/exec.c:2498: undefined reference to `xen_map_cache'
> /usr/bin/ld: exec.o: in function `qemu_ram_block_from_host':
> qemu/exec.c:2573: undefined reference to `xen_ram_addr_from_mapcache'
> /usr/bin/ld: exec.o: in function `address_space_unmap':
> qemu/exec.c:3699: undefined reference to `xen_invalidate_map_cache_entry'
> /usr/bin/ld: exec.o: in function `address_space_cache_destroy':
> qemu/exec.c:3791: undefined reference to `xen_invalidate_map_cache_entry'
> /usr/bin/ld: exec.o: in function `qemu_ram_ptr_length':
> qemu/exec.c:2528: undefined reference to `xen_map_cache'
> /usr/bin/ld: exec.o: in function `qemu_map_ram_ptr':
> qemu/exec.c:2495: undefined reference to `xen_map_cache'
> collect2: error: ld returned 1 exit status
> make[1]: *** [Makefile:204: qemu-system-i386] Error 1

It should be rebuilt because config-target.h changed?

Paolo

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU
  2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
                   ` (60 preceding siblings ...)
  2019-02-01 10:41 ` Philippe Mathieu-Daudé
@ 2019-02-03 12:01 ` no-reply
  61 siblings, 0 replies; 119+ messages in thread
From: no-reply @ 2019-02-03 12:01 UTC (permalink / raw)
  To: pbonzini; +Cc: fam, qemu-devel, yang.zhong, thuth

Patchew URL: https://patchew.org/QEMU/1548410831-19553-1-git-send-email-pbonzini@redhat.com/



Hi,

This series failed the docker-mingw@fedora build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.

=== TEST SCRIPT BEGIN ===
#!/bin/bash
time make docker-test-mingw@fedora SHOW_ENV=1 J=14
=== TEST SCRIPT END ===




The full log is available at
http://patchew.org/logs/1548410831-19553-1-git-send-email-pbonzini@redhat.com/testing.docker-mingw@fedora/?type=message.
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@redhat.com

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 33/52] build: switch to Kconfig
  2019-02-01 14:56       ` Philippe Mathieu-Daudé
  2019-02-01 21:24         ` Paolo Bonzini
@ 2019-02-04 12:58         ` Paolo Bonzini
  1 sibling, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-02-04 12:58 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé,
	Stefano Stabellini, Anthony Perard, Paul Durrant, thuth
  Cc: qemu-devel, yang.zhong

On 01/02/19 15:56, Philippe Mathieu-Daudé wrote:
> On 1/31/19 11:15 PM, Paolo Bonzini wrote:
>> On 31/01/19 22:48, Philippe Mathieu-Daudé wrote:
>>> There is something I don't understand here: Does CONFIG_XEN in
>>> Kconfig.host take precedence over the target configs? I'm looking at
>>> these configs:
>>>
>>>  if supported_xen_target $target; then
>>>      echo "CONFIG_XEN=n" >> $config_target_mak
>>>      if test "$xen_pci_passthrough" = yes; then
>>>          echo "CONFIG_XEN_PCI_PASSTHROUGH=y" >> "$config_target_mak"
>>>      fi
>>>  fi
>>
>> You're right, Kconfig.host should contain CONFIG_XEN_BACKEND and not
>> CONFIG_XEN.
> 
> Now when I disable Xen, exec.o isn't rebuilt, so I get link errors:
> 
> /usr/bin/ld: exec.o: in function `reclaim_ramblock':
> qemu/exec.c:2392: undefined reference to `xen_invalidate_map_cache_entry'
> /usr/bin/ld: exec.o: in function `qemu_ram_ptr_length':
> qemu/exec.c:2531: undefined reference to `xen_map_cache'
> /usr/bin/ld: exec.o: in function `qemu_map_ram_ptr':
> qemu/exec.c:2498: undefined reference to `xen_map_cache'
> /usr/bin/ld: exec.o: in function `qemu_ram_block_from_host':
> qemu/exec.c:2573: undefined reference to `xen_ram_addr_from_mapcache'
> /usr/bin/ld: exec.o: in function `address_space_unmap':
> qemu/exec.c:3699: undefined reference to `xen_invalidate_map_cache_entry'
> /usr/bin/ld: exec.o: in function `address_space_cache_destroy':
> qemu/exec.c:3791: undefined reference to `xen_invalidate_map_cache_entry'
> /usr/bin/ld: exec.o: in function `qemu_ram_ptr_length':
> qemu/exec.c:2528: undefined reference to `xen_map_cache'
> /usr/bin/ld: exec.o: in function `qemu_map_ram_ptr':
> qemu/exec.c:2495: undefined reference to `xen_map_cache'
> collect2: error: ld returned 1 exit status
> make[1]: *** [Makefile:204: qemu-system-i386] Error 1
> 
> Moving those function stubs into a real xen-stub.c file would be simpler
> from the buildsys PoV IMHO, but I also remember we prefer to avoid
> stubs, so not sure what's better here, neither what's wrong with make rules.

Sorry, I don't understand.  Can you provide reproduction instructions?

Paolo

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 33/52] build: switch to Kconfig
  2019-01-31 21:48   ` Philippe Mathieu-Daudé
  2019-01-31 22:15     ` Paolo Bonzini
@ 2019-02-04 15:45     ` Anthony PERARD
  2019-02-04 19:04       ` Paolo Bonzini
  1 sibling, 1 reply; 119+ messages in thread
From: Anthony PERARD @ 2019-02-04 15:45 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Paolo Bonzini, qemu-devel, Stefano Stabellini, Paul Durrant,
	yang.zhong, thuth

On Thu, Jan 31, 2019 at 10:48:50PM +0100, Philippe Mathieu-Daudé wrote:
> I cc'ed the Xen team, it would be nice if one of them also tests this.

I've tested the series, and here is the first issue:
  CC      hw/9pfs/xen-9p-backend.o
  LINK    i386-softmmu/qemu-system-i386
/usr/bin/ld: ../hw/xen/xen-legacy-backend.o: in function `xen_be_register_common':
xen-legacy-backend.c:(.text+0x1cb6): undefined reference to `xen_9pfs_ops'

The `struct xen_9pfs_ops` is in "xen-9p-backend", so it's built, but
link time still fails.

Building QEMU with --disable-virtfs works. (Same as commenting out the
line that uses xen_9pfs_ops in xen-legacy-backend.) Part of the other
options I have for configure: --enable-xen --target-list=i386-softmmu
--disable-user --cpu=x86_64


I did also other build tests and one without --target-list, and that
fails, but not because of xen:
$ ./configure --enable-xen
...
$ make
...
  GEN     aarch64-softmmu/config-devices.mak.tmp
  GEN     alpha-softmmu/config-devices.mak.tmp
  GEN     arm-softmmu/config-devices.mak.tmp
  GEN     cris-softmmu/config-devices.mak.tmp
  GEN     hppa-softmmu/config-devices.mak.tmp
  GEN     i386-softmmu/config-devices.mak.tmp
  GEN     lm32-softmmu/config-devices.mak.tmp
  GEN     m68k-softmmu/config-devices.mak.tmp
  GEN     microblaze-softmmu/config-devices.mak.tmp
undefined symbol ARMSSE_CPUID
undefined symbol ARMSSE
Traceback (most recent call last):
  File "/var/tmp/qemu.rjWNchMAI4/qemu/scripts/minikconf.py", line 680, in <module>
    config = data.compute_config()
  File "/var/tmp/qemu.rjWNchMAI4/qemu/scripts/minikconf.py", line 214, in compute_config
    raise Exception(parser, "there were undefined symbols")
Exception: (<__main__.KconfigParser instance at 0x7f635c24e200>, 'there were undefined symbols')
undefined symbol ARMSSE_CPUID
undefined symbol ARMSSE
Traceback (most recent call last):
  File "/var/tmp/qemu.rjWNchMAI4/qemu/scripts/minikconf.py", line 680, in <module>
    config = data.compute_config()
  File "/var/tmp/qemu.rjWNchMAI4/qemu/scripts/minikconf.py", line 214, in compute_config
    raise Exception(parser, "there were undefined symbols")
Exception: (<__main__.KconfigParser instance at 0x7fd4d2374248>, 'there were undefined symbols')

...

make: *** No rule to make target 'aarch64-softmmu/config-devices.mak', needed by 'config-all-devices.mak'.  Stop.
make: *** Waiting for unfinished jobs....

Cheers,

-- 
Anthony PERARD

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 33/52] build: switch to Kconfig
  2019-02-04 15:45     ` Anthony PERARD
@ 2019-02-04 19:04       ` Paolo Bonzini
  0 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-02-04 19:04 UTC (permalink / raw)
  To: Anthony PERARD, Philippe Mathieu-Daudé
  Cc: qemu-devel, Stefano Stabellini, Paul Durrant, yang.zhong, thuth

On 04/02/19 16:45, Anthony PERARD wrote:
> I've tested the series, and here is the first issue:
>   CC      hw/9pfs/xen-9p-backend.o
>   LINK    i386-softmmu/qemu-system-i386
> /usr/bin/ld: ../hw/xen/xen-legacy-backend.o: in function `xen_be_register_common':
> xen-legacy-backend.c:(.text+0x1cb6): undefined reference to `xen_9pfs_ops'
> 
> The `struct xen_9pfs_ops` is in "xen-9p-backend", so it's built, but
> link time still fails.

Ok, I'll take a look.  My Xen builds were broken until recently.

> Building QEMU with --disable-virtfs works. (Same as commenting out the
> line that uses xen_9pfs_ops in xen-legacy-backend.) Part of the other
> options I have for configure: --enable-xen --target-list=i386-softmmu
> --disable-user --cpu=x86_64
> 
> 
> I did also other build tests and one without --target-list, and that
> fails, but not because of xen:
> $ ./configure --enable-xen
> ...
> $ make
> ...
>   GEN     aarch64-softmmu/config-devices.mak.tmp
>   GEN     alpha-softmmu/config-devices.mak.tmp
>   GEN     arm-softmmu/config-devices.mak.tmp
>   GEN     cris-softmmu/config-devices.mak.tmp
>   GEN     hppa-softmmu/config-devices.mak.tmp
>   GEN     i386-softmmu/config-devices.mak.tmp
>   GEN     lm32-softmmu/config-devices.mak.tmp
>   GEN     m68k-softmmu/config-devices.mak.tmp
>   GEN     microblaze-softmmu/config-devices.mak.tmp
> undefined symbol ARMSSE_CPUID
> undefined symbol ARMSSE

This is just a rebasing issue, the patches are based on an older master
that didn't have the symbols.

Paiolo

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 41/52] isa: express dependencies with kconfig
  2019-01-31 22:24       ` Philippe Mathieu-Daudé
@ 2019-02-14 16:46         ` Paolo Bonzini
  0 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-02-14 16:46 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel; +Cc: yang.zhong, thuth

On 31/01/19 23:24, Philippe Mathieu-Daudé wrote:
> The model implementation is:
> - abstract SuperIO parent which can instantiate all configs,
> - child implementation.
> 
> Childs require their parent, and even if the parent will instantiate
> them without all properties, the parent needs to link with them.
> 
> In short, if a SuperIO child requires ISA_SUPERIO, it also requires to
> link to serial/parallel/floppy/ide.

It depends... Some SuperIO chips (children) do not have full
functionality, and will never have one or more of
serial/parallel/floppy/ide.  This is why I left the choice of
"select"ing the components in the children.  The code already has to set
up ISASuperIOClass, so there is knowledge of what to select.

Paolo

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 42/52] i386: express dependencies with Kconfig
  2019-02-01 15:05   ` Philippe Mathieu-Daudé
  2019-02-01 20:58     ` Paolo Bonzini
@ 2019-02-14 16:47     ` Paolo Bonzini
  2019-02-14 16:54       ` Michael S. Tsirkin
  1 sibling, 1 reply; 119+ messages in thread
From: Paolo Bonzini @ 2019-02-14 16:47 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé,
	qemu-devel, Gerd Hoffmann, Michael S. Tsirkin
  Cc: yang.zhong, thuth

On 01/02/19 16:05, Philippe Mathieu-Daudé wrote:
> This lacks a DISPLAY dependency?
> 
> $ i386-softmmu/qemu-system-i386 -M q35
> qemu-system-i386: Unknown device 'VGA' for bus 'PCIE'
> Aborted (core dumped)

If you got this with --without-default-devices, then it's intended behavior.

VGA_PCI is selected via CONFIG_PCI_DEVICES.

Paolo

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 42/52] i386: express dependencies with Kconfig
  2019-02-14 16:47     ` Paolo Bonzini
@ 2019-02-14 16:54       ` Michael S. Tsirkin
  2019-02-14 17:02         ` Paolo Bonzini
  0 siblings, 1 reply; 119+ messages in thread
From: Michael S. Tsirkin @ 2019-02-14 16:54 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: Philippe Mathieu-Daudé,
	qemu-devel, Gerd Hoffmann, yang.zhong, thuth

On Thu, Feb 14, 2019 at 05:47:08PM +0100, Paolo Bonzini wrote:
> On 01/02/19 16:05, Philippe Mathieu-Daudé wrote:
> > This lacks a DISPLAY dependency?
> > 
> > $ i386-softmmu/qemu-system-i386 -M q35
> > qemu-system-i386: Unknown device 'VGA' for bus 'PCIE'
> > Aborted (core dumped)
> 
> If you got this with --without-default-devices, then it's intended behavior.
> 
> VGA_PCI is selected via CONFIG_PCI_DEVICES.
> 
> Paolo

OK but I guess as a follow-up patch we can hide things that don't work,
or select things that are required?

-- 
MST

^ permalink raw reply	[flat|nested] 119+ messages in thread

* Re: [Qemu-devel] [PATCH 42/52] i386: express dependencies with Kconfig
  2019-02-14 16:54       ` Michael S. Tsirkin
@ 2019-02-14 17:02         ` Paolo Bonzini
  0 siblings, 0 replies; 119+ messages in thread
From: Paolo Bonzini @ 2019-02-14 17:02 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Philippe Mathieu-Daudé,
	qemu-devel, Gerd Hoffmann, yang.zhong, thuth

On 14/02/19 17:54, Michael S. Tsirkin wrote:
> On Thu, Feb 14, 2019 at 05:47:08PM +0100, Paolo Bonzini wrote:
>> On 01/02/19 16:05, Philippe Mathieu-Daudé wrote:
>>> This lacks a DISPLAY dependency?
>>>
>>> $ i386-softmmu/qemu-system-i386 -M q35
>>> qemu-system-i386: Unknown device 'VGA' for bus 'PCIE'
>>> Aborted (core dumped)
>>
>> If you got this with --without-default-devices, then it's intended behavior.
>>
>> VGA_PCI is selected via CONFIG_PCI_DEVICES.
> 
> OK but I guess as a follow-up patch we can hide things that don't work,
> or select things that are required?

It is not required; if you use "-nodefaults" you can build without
CONFIG_VGA_PCI (the failure mode is horrible, granted; it's the same
today if you modify pci.mak).  The documentation explains this for
--without-default-devices:

  When QEMU is built with this option, the user will probably
  want to change some lines in the first group, for example like this::

    CONFIG_PCI_DEVICES=y
    #CONFIG_TEST_DEVICES=n

  and/or pick a subset of the devices in those device groups.

Paolo

^ permalink raw reply	[flat|nested] 119+ messages in thread

end of thread, other threads:[~2019-02-14 17:18 UTC | newest]

Thread overview: 119+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-25 10:06 [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Paolo Bonzini
2019-01-25 10:06 ` [Qemu-devel] [PATCH 01/52] arm: disable CONFIG_SERIAL_ISA Paolo Bonzini
2019-01-25 14:49   ` Thomas Huth
2019-01-25 15:21     ` Paolo Bonzini
2019-01-25 10:06 ` [Qemu-devel] [PATCH 02/52] ide: split ioport registration to a separate file Paolo Bonzini
2019-01-25 14:53   ` Thomas Huth
2019-01-25 15:22     ` Paolo Bonzini
2019-01-30 12:07   ` Thomas Huth
2019-01-30 12:20     ` Paolo Bonzini
2019-01-30 12:55       ` Yang Zhong
2019-01-30 15:55         ` BALATON Zoltan
2019-01-25 10:06 ` [Qemu-devel] [PATCH 03/52] vfio: move conditional up to hw/Makefile.objs Paolo Bonzini
2019-01-25 15:04   ` Thomas Huth
2019-01-25 10:06 ` [Qemu-devel] [PATCH 04/52] hw/pci-host/Makefile.objs: make CONFIGS clear for PCI EXPRESS Paolo Bonzini
2019-01-25 10:06 ` [Qemu-devel] [PATCH 05/52] build: actually use CONFIG_PAM Paolo Bonzini
2019-01-31 21:50   ` Philippe Mathieu-Daudé
2019-01-25 10:06 ` [Qemu-devel] [PATCH 06/52] hw/i386/Makefile.objs: Build pc_piix* and pc_q35 boards Paolo Bonzini
2019-01-25 10:06 ` [Qemu-devel] [PATCH 07/52] hw/arm/Makefile.objs: CONFIG_VIRT created for virt board Paolo Bonzini
2019-01-25 15:06   ` Thomas Huth
2019-01-25 15:23     ` Paolo Bonzini
2019-01-25 10:06 ` [Qemu-devel] [PATCH 08/52] hw/m68k/Makefile.objs: Conditionally build boards Paolo Bonzini
2019-01-25 15:08   ` Thomas Huth
2019-01-25 10:06 ` [Qemu-devel] [PATCH 09/52] hw/microblaze/Makefile.objs: Create configs for petalogix and xilinx boards Paolo Bonzini
2019-01-25 10:06 ` [Qemu-devel] [PATCH 10/52] hw/mips/Makefile.objs: Create CONFIG_* for r4k, malta, mipssim boards Paolo Bonzini
2019-01-31 21:50   ` Philippe Mathieu-Daudé
2019-01-25 10:06 ` [Qemu-devel] [PATCH 11/52] hw/ppc/Makefile.objs: Build all boards conditinally with CONFIG_* Paolo Bonzini
2019-01-25 10:06 ` [Qemu-devel] [PATCH 12/52] hw/sh4/Makefile.objs: New CONFIG_* varibales created for sh4 boards and device Paolo Bonzini
2019-01-25 10:06 ` [Qemu-devel] [PATCH 13/52] hw/s390/Makefile.objs: Create new CONFIG_* variables for s390x boards and devices Paolo Bonzini
2019-01-25 15:17   ` Thomas Huth
2019-01-25 15:23     ` Paolo Bonzini
2019-01-25 10:06 ` [Qemu-devel] [PATCH 14/52] hw/sparc/Makefile.objs: CONFIG_* for sun4m and leon3 created Paolo Bonzini
2019-01-25 10:06 ` [Qemu-devel] [PATCH 15/52] hw/lm32/Makefile.objs: Conditionally build lm32 and milkmyst Paolo Bonzini
2019-01-25 10:06 ` [Qemu-devel] [PATCH 16/52] hw/xtensa/Makefile.objs: Build xtensa_sim and xtensa_fpga conditionally Paolo Bonzini
2019-01-25 10:06 ` [Qemu-devel] [PATCH 17/52] hw/nios2/Makefile.objs: Conditionally build nios2 Paolo Bonzini
2019-01-25 10:06 ` [Qemu-devel] [PATCH 18/52] hw/riscv/Makefile.objs: Create CONFIG_* for riscv boards Paolo Bonzini
2019-01-25 10:06 ` [Qemu-devel] [PATCH 19/52] hw/sparc64/Makefile.objs: Create CONFIG_* for sparc64 Paolo Bonzini
2019-01-25 10:06 ` [Qemu-devel] [PATCH 20/52] hw/alpha/Makefile.objs: Create CONFIG_* for alpha Paolo Bonzini
2019-01-25 15:29   ` Thomas Huth
2019-01-25 20:04   ` Richard Henderson
2019-01-25 10:06 ` [Qemu-devel] [PATCH 21/52] hw/cris/Makefile.objs: Create CONFIG_* for cris Paolo Bonzini
2019-01-25 10:06 ` [Qemu-devel] [PATCH 22/52] hw/hppa/Makefile.objs: Create CONFIG_* for hppa Paolo Bonzini
2019-01-25 20:05   ` Richard Henderson
2019-01-25 10:06 ` [Qemu-devel] [PATCH 23/52] hw/moxie/Makefile.objs: Conditionally build moxie Paolo Bonzini
2019-01-25 15:33   ` Thomas Huth
2019-01-25 10:06 ` [Qemu-devel] [PATCH 24/52] hw/openrisc/Makefile.objs: Create CONFIG_* for openrisc Paolo Bonzini
2019-01-25 15:35   ` Thomas Huth
2019-01-25 17:33     ` Paolo Bonzini
2019-01-25 10:06 ` [Qemu-devel] [PATCH 25/52] hw/tricore/Makefile.objs: Create CONFIG_* for tricore Paolo Bonzini
2019-01-25 10:06 ` [Qemu-devel] [PATCH 26/52] hw/i2c/Makefile.objs: Create new CONFIG_* variables for EEPROM and ACPI controller Paolo Bonzini
2019-01-25 15:42   ` Thomas Huth
2019-01-25 10:06 ` [Qemu-devel] [PATCH 27/52] hw/vfio/Makefile.objs: Create new CONFIG_* variables for VFIO core and PCI Paolo Bonzini
2019-01-25 10:06 ` [Qemu-devel] [PATCH 28/52] minikconfig: add parser skeleton Paolo Bonzini
2019-01-25 10:06 ` [Qemu-devel] [PATCH 29/52] minikconfig: add AST Paolo Bonzini
2019-01-25 10:06 ` [Qemu-devel] [PATCH 30/52] minikconfig: add semantic analysis Paolo Bonzini
2019-01-25 10:06 ` [Qemu-devel] [PATCH 31/52] hw/display: make edid configurable Paolo Bonzini
2019-01-31 21:53   ` Philippe Mathieu-Daudé
2019-01-25 10:06 ` [Qemu-devel] [PATCH 32/52] kconfig: introduce kconfig files Paolo Bonzini
2019-01-31 13:21   ` Thomas Huth
2019-01-31 13:37     ` Paolo Bonzini
2019-01-25 10:06 ` [Qemu-devel] [PATCH 33/52] build: switch to Kconfig Paolo Bonzini
2019-01-31 21:48   ` Philippe Mathieu-Daudé
2019-01-31 22:15     ` Paolo Bonzini
2019-02-01 14:56       ` Philippe Mathieu-Daudé
2019-02-01 21:24         ` Paolo Bonzini
2019-02-04 12:58         ` Paolo Bonzini
2019-02-04 15:45     ` Anthony PERARD
2019-02-04 19:04       ` Paolo Bonzini
2019-01-25 10:06 ` [Qemu-devel] [PATCH 34/52] minikconf: implement allnoconfig and defconfig Paolo Bonzini
2019-01-25 10:06 ` [Qemu-devel] [PATCH 35/52] ide: express dependencies with Kconfig Paolo Bonzini
2019-01-25 10:06 ` [Qemu-devel] [PATCH 36/52] hw/pci/Makefile.objs: make pcie configurable Paolo Bonzini
2019-01-25 10:06 ` [Qemu-devel] [PATCH 37/52] build: convert pci.mak to Kconfig Paolo Bonzini
2019-01-25 10:06 ` [Qemu-devel] [PATCH 38/52] build: convert sound.mak " Paolo Bonzini
2019-01-25 10:06 ` [Qemu-devel] [PATCH 39/52] build: convert usb.mak " Paolo Bonzini
2019-01-25 10:06 ` [Qemu-devel] [PATCH 40/52] scsi: express dependencies with Kconfig Paolo Bonzini
2019-01-31 21:23   ` Philippe Mathieu-Daudé
2019-01-31 22:11     ` Paolo Bonzini
2019-01-25 10:07 ` [Qemu-devel] [PATCH 41/52] isa: express dependencies with kconfig Paolo Bonzini
2019-01-30 10:53   ` Thomas Huth
2019-01-30 11:13     ` Paolo Bonzini
2019-01-30 11:32       ` Thomas Huth
2019-01-30 11:43         ` Paolo Bonzini
2019-01-30 11:58   ` Thomas Huth
2019-01-30 12:00     ` Yang Zhong
2019-01-31 21:22   ` Philippe Mathieu-Daudé
2019-01-31 22:14     ` Paolo Bonzini
2019-01-31 22:24       ` Philippe Mathieu-Daudé
2019-02-14 16:46         ` Paolo Bonzini
2019-01-25 10:07 ` [Qemu-devel] [PATCH 42/52] i386: express dependencies with Kconfig Paolo Bonzini
2019-01-28 14:21   ` Thomas Huth
2019-02-01 15:05   ` Philippe Mathieu-Daudé
2019-02-01 20:58     ` Paolo Bonzini
2019-02-14 16:47     ` Paolo Bonzini
2019-02-14 16:54       ` Michael S. Tsirkin
2019-02-14 17:02         ` Paolo Bonzini
2019-01-25 10:07 ` [Qemu-devel] [PATCH 43/52] i2c: " Paolo Bonzini
2019-01-31 22:10   ` Philippe Mathieu-Daudé
2019-01-31 22:21     ` Paolo Bonzini
2019-01-25 10:07 ` [Qemu-devel] [PATCH 44/52] ptimer: " Paolo Bonzini
2019-01-25 10:07 ` [Qemu-devel] [PATCH 45/52] display: express dependencies with kconfig Paolo Bonzini
2019-01-25 10:07 ` [Qemu-devel] [PATCH 46/52] hyperv: " Paolo Bonzini
2019-01-25 10:07 ` [Qemu-devel] [PATCH 47/52] vfio: express vfio dependencies with Kconfig Paolo Bonzini
2019-01-25 20:00   ` Alex Williamson
2019-01-28 10:54     ` Paolo Bonzini
2019-01-25 10:07 ` [Qemu-devel] [PATCH 48/52] virtio: express virtio " Paolo Bonzini
2019-01-25 10:07 ` [Qemu-devel] [PATCH 49/52] tpm: express " Paolo Bonzini
2019-01-25 10:07 ` [Qemu-devel] [PATCH 50/52] isa: express SuperIO " Paolo Bonzini
2019-01-31 21:26   ` Philippe Mathieu-Daudé
2019-01-25 10:07 ` [Qemu-devel] [PATCH 51/52] i386-softmmu.mak: remove all CONFIG_* except boards definitions Paolo Bonzini
2019-01-25 10:07 ` [Qemu-devel] [PATCH 52/52] kconfig: introduce CONFIG_TEST_DEVICES Paolo Bonzini
2019-01-25 11:07 ` [Qemu-devel] [RFC PATCH v5 00/52] Support Kconfig in QEMU Yang Zhong
2019-01-31 17:56 ` no-reply
2019-01-31 21:57 ` no-reply
2019-01-31 21:58 ` no-reply
2019-01-31 22:01 ` no-reply
2019-01-31 22:22 ` no-reply
2019-01-31 22:22 ` no-reply
2019-01-31 22:26 ` no-reply
2019-02-01 10:41 ` Philippe Mathieu-Daudé
2019-02-03 12:01 ` no-reply

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).