Support Kconfig in QEMU
v5 cover Support Kconfig in QEMU
(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
Signature · 1 line
1.8.3.1
PATCH v5 1/52 arm: disable CONFIG_SERIAL_ISA
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.
--- default-configs/arm-softmmu.mak | 1 - 1 file changed, 1 deletion(-)
default-configs/arm-softmmu.mak +0 -1
@@ -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
Signature · 1 line
1.8.3.1
Re: [Qemu-devel] [PATCH 01/52] arm: disable CONFIG_SERIAL_ISA
Quoted 2 lines · Paolo Bonzini
ARM does not have an ISA bus, this device should not be enabled.
Kconfigcatches the contradiction because ARM does not defineCONFIG_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.
Quoted 10 lines
Signed-off-by Paolo Bonzini <[email protected]>--- default-configs/arm-softmmu.mak | 1 - 1 file changed, 1 deletion(-)default-configs/arm-softmmu.mak +0
-0
default-configs/arm-softmmu.mak CONFIG_VGA=y · line 11
Quoted 7 lines
default-configs/arm-softmmu.mak +0
-1@@ -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:
Re: [Qemu-devel] [PATCH 01/52] arm: disable CONFIG_SERIAL_ISA
Quoted 6 lines · Thomas Huth
Quoted 2 lines · Paolo Bonzini
ARM does not have an ISA bus, this device should not be enabled.
Kconfigcatches the contradiction because ARM does not defineCONFIG_ISA_BUS.That description is a little bit wrong, since ARM includes pci.mak, and pci.mak enables
CONFIG_ISA_BUS=yfor 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
Quoted 24 lines
Quoted 10 lines
Signed-off-by Paolo Bonzini <[email protected]>--- default-configs/arm-softmmu.mak | 1 - 1 file changed, 1 deletion(-)default-configs/arm-softmmu.mak +0
-0default-configs/arm-softmmu.mak CONFIG_VGA=y · line 11
Quoted 7 lines
default-configs/arm-softmmu.mak +0
-1@@ -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=yAnyway, looking through the code and the description of commit
1401c322c8d431fa750cff8276I think you're right thatCONFIG_SERIAL_ISAis not required for ARM, so if you change the commit message a little bit:Reviewed-by Thomas Huth <[email protected]>
PATCH v5 2/52 ide: split ioport registration to a separate file
In reply to Paolo BonziniThis is not needed on ARM, and brings in ISA bus code which is otherwise not necessary.
--- 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
hw/ide/Makefile.objs +3 -3
@@ -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
hw/ide/core.c +0 -25
@@ -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;
hw/ide/ioport.c new file +67 -0
67 lines not on this page · raw message
Signature · 1 line
1.8.3.1
Re: [Qemu-devel] [PATCH 02/52] ide: split ioport registration to a separate file
Quoted 21 lines · Paolo Bonzini
This is not needed on ARM, and brings in ISA bus code which is otherwise not necessary.
Signed-off-by Paolo Bonzini <[email protected]>--- 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.chw/ide/Makefile.objs +1
-2@@ -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
hw/ide/Makefile.objs line 12
Quoted 10 lines
hw/ide/Makefile.objs +2
-1+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.
Quoted 73 lines
hw/ide/core.c +0
-25@@ -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;hw/ide/ioport.c new file +31
-0@@ -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"
hw/ide/ioport.c line 41
Quoted 10 lines
hw/ide/ioport.c new file +10
-0+#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?
Quoted 14 lines
hw/ide/ioport.c new file +14
-0+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) +{
hw/ide/ioport.c line 66
Quoted 10 lines
hw/ide/ioport.c new file +10
-0+/* ??? 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:
Re: [Qemu-devel] [PATCH 02/52] ide: split ioport registration to a separate file
Quoted 6 lines · Thomas Huth
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.
Quoted 2 lines
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.
Re: [Qemu-devel] [PATCH 02/52] ide: split ioport registration to a separate file
In reply to Paolo BonziniQuoted 21 lines · Paolo Bonzini
This is not needed on ARM, and brings in ISA bus code which is otherwise not necessary.
Signed-off-by Paolo Bonzini <[email protected]>--- 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.chw/ide/Makefile.objs +1
-2@@ -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
hw/ide/Makefile.objs line 12
Quoted 10 lines
hw/ide/Makefile.objs +2
-1+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
Re: [Qemu-devel] [PATCH 02/52] ide: split ioport registration to a separate file
Quoted 3 lines · Thomas Huth
I think adding ioport.o to
IDE_PCIandIDE_VIAis wrong. Theide_init_ioport()function is only used byisa.candpiix.c, so it should only be added forIDE_ISAandIDE_PIIXhere.
Good idea, another one for Yang. :)
Paolo
Re: [Qemu-devel] [PATCH 02/52] ide: split ioport registration to a separate file
Quoted 7 lines · Paolo Bonzini
Quoted 3 lines · Thomas Huth
I think adding ioport.o to
IDE_PCIandIDE_VIAis wrong. Theide_init_ioport()function is only used byisa.candpiix.c, so it should only be added forIDE_ISAandIDE_PIIXhere.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
Quoted 1 line
Paolo
Re: [Qemu-devel] [PATCH 02/52] ide: split ioport registration to a separate file
Quoted 6 lines · Yang Zhong
Quoted 5 lines · Paolo Bonzini
Quoted 3 lines · Thomas Huth
I think adding ioport.o to
IDE_PCIandIDE_VIAis wrong. Theide_init_ioport()function is only used byisa.candpiix.c, so it should only be added forIDE_ISAandIDE_PIIXhere.
Quoted 8 lines
Quoted 2 lines
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.chas removedide_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
PATCH v5 3/52 vfio: move conditional up to hw/Makefile.objs
In reply to Paolo BonziniInstead of wrapping the entire Makefile.objs with an ifeq/endif, just include the directory only for Linux.
--- hw/Makefile.objs | 2 +- hw/vfio/Makefile.objs | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-)
hw/Makefile.objs +1 -1
@@ -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/
hw/vfio/Makefile.objs +0 -2
@@ -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
Signature · 1 line
1.8.3.1
Re: [Qemu-devel] [PATCH 03/52] vfio: move conditional up to hw/Makefile.objs
Quoted 33 lines · Paolo Bonzini
Instead of wrapping the entire Makefile.objs with an ifeq/endif, just include the directory only for Linux.
Signed-off-by Paolo Bonzini <[email protected]>--- hw/Makefile.objs | 2 +- hw/vfio/Makefile.objs | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-)hw/Makefile.objs +1
-1@@ -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/hw/vfio/Makefile.objs +0
-1@@ -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
hw/vfio/Makefile.objs obj-$(CONFIG_VFIO_XGMAC) += calxeda-xgmac.o · line 10
Quoted 4 lines
hw/vfio/Makefile.objs +0
-1@@ -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
PATCH v5 4/52 hw/pci-host/Makefile.objs: make CONFIGS clear for PCI EXPRESS
In reply to Paolo BonziniFrom: Yang Zhong <[email protected]>
Change the CONFIGs for PCI EXPRESS and make module name more clear for code files.
Message-Id: <[email protected]>
--- 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(-)
default-configs/arm-softmmu.mak +2 -2
@@ -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
default-configs/i386-softmmu.mak +1 -1
@@ -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
default-configs/mips64el-softmmu.mak +1 -1
@@ -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
default-configs/pci.mak +1 -1
@@ -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
default-configs/riscv32-softmmu.mak +1 -1
@@ -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
default-configs/riscv64-softmmu.mak +1 -1
@@ -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
hw/net/Makefile.objs +2 -2
@@ -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
hw/pci-host/Makefile.objs +4 -4
@@ -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
Signature · 1 line
1.8.3.1
PATCH v5 5/52 build: actually use CONFIG_PAM
In reply to Paolo BonziniDo not link it unconditionally into all binaries.
Message-Id: <[email protected]>
--- default-configs/i386-softmmu.mak | 1 + hw/pci-host/Makefile.objs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
default-configs/i386-softmmu.mak +1 -0
@@ -67,3 +67,4 @@ CONFIG_I2C=y CONFIG_SEV=$(CONFIG_KVM) CONFIG_VTD=y CONFIG_AMD_IOMMU=y +CONFIG_PAM=y
hw/pci-host/Makefile.objs +1 -1
@@ -1,4 +1,4 @@ -common-obj-y += pam.o +common-obj-$(CONFIG_PAM) += pam.o # PPC devices common-obj-$(CONFIG_PREP_PCI) += prep.o
Signature · 1 line
1.8.3.1
Re: [Qemu-devel] [PATCH 05/52] build: actually use CONFIG_PAM
Quoted 1 line · Paolo Bonzini
Do not link it unconditionally into all binaries.
Nice :)
Quoted 5 lines
Signed-off-by Paolo Bonzini <[email protected]>Signed-off-by Yang Zhong <[email protected]>Reviewed-by Thomas Huth <[email protected]>Message-Id: <[email protected]>
Signed-off-by Paolo Bonzini <[email protected]>
Quoted 25 lines
--- default-configs/i386-softmmu.mak | 1 + hw/pci-host/Makefile.objs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)default-configs/i386-softmmu.mak +1
-0@@ -67,3 +67,4 @@ CONFIG_I2C=y CONFIG_SEV=$(CONFIG_KVM) CONFIG_VTD=y CONFIG_AMD_IOMMU=y +CONFIG_PAM=yhw/pci-host/Makefile.objs +1
-1@@ -1,4 +1,4 @@ -common-obj-y += pam.o +common-obj-$(CONFIG_PAM) += pam.o # PPC devices common-obj-$(CONFIG_PREP_PCI) += prep.o
PATCH v5 6/52 hw/i386/Makefile.objs: Build pc_piix* and pc_q35 boards
In reply to Paolo BonziniCONFIG_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
Message-Id: <[email protected]>
--- default-configs/i386-softmmu.mak | 2 ++ hw/i386/Makefile.objs | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-)
default-configs/i386-softmmu.mak +2 -0
@@ -68,3 +68,5 @@ CONFIG_SEV=$(CONFIG_KVM) CONFIG_VTD=y CONFIG_AMD_IOMMU=y CONFIG_PAM=y +CONFIG_I440FX=y +CONFIG_Q35=y
hw/i386/Makefile.objs +3 -1
@@ -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
Signature · 1 line
1.8.3.1
PATCH v5 7/52 hw/arm/Makefile.objs: CONFIG_VIRT created for virt board
In reply to Paolo BonziniFrom: Yang Zhong <[email protected]>
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.
Message-Id: <[email protected]>
--- default-configs/arm-softmmu.mak | 1 + hw/arm/Makefile.objs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-)
default-configs/arm-softmmu.mak +1 -0
@@ -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
hw/arm/Makefile.objs +2 -1
@@ -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
Signature · 1 line
1.8.3.1
Re: [Qemu-devel] [PATCH 07/52] hw/arm/Makefile.objs: CONFIG_VIRT created for virt board
Quoted 33 lines · Paolo Bonzini
From: Yang Zhong <[email protected]>
make virt code configurable and the new
CONFIG_VIRTdefinitions added to the default-configs/arm-softmmu.mak to replaceCONFIG_ACPIin arm board.Signed-off-by Yang Zhong <[email protected]>Reviewed-by Richard Henderson <[email protected]>Reviewed-by Thomas Huth <[email protected]>Message-Id: <[email protected]>
Signed-off-by Paolo Bonzini <[email protected]>--- default-configs/arm-softmmu.mak | 1 + hw/arm/Makefile.objs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-)default-configs/arm-softmmu.mak +1
-0@@ -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=yhw/arm/Makefile.objs +0
-0
hw/arm/Makefile.objs line 5
Quoted 6 lines
hw/arm/Makefile.objs +2
-1@@ -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
Re: [Qemu-devel] [PATCH 07/52] hw/arm/Makefile.objs: CONFIG_VIRT created for virt board
Quoted 10 lines · Thomas Huth
hw/arm/Makefile.objs line 5
Quoted 6 lines
hw/arm/Makefile.objs +2
-1-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 optionCONFIG_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
PATCH v5 8/52 hw/m68k/Makefile.objs: Conditionally build boards
In reply to Paolo BonziniFrom: Ákos Kovács <[email protected]>
CONFIG_AN5206, CONFIG_MCF5206 and CONFIG_MCF5208 make variables created for m68k boards, and added to default-configs/m86k-softmmu.mak.
Message-Id: <[email protected]>
--- default-configs/m68k-softmmu.mak | 2 ++ hw/m68k/Makefile.objs | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-)
default-configs/m68k-softmmu.mak +2 -0
@@ -2,3 +2,5 @@ CONFIG_COLDFIRE=y CONFIG_PTIMER=y +CONFIG_AN5206=y +CONFIG_MCF5208=y
hw/m68k/Makefile.objs +2 -2
@@ -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
Signature · 1 line
1.8.3.1
Re: [Qemu-devel] [PATCH 08/52] hw/m68k/Makefile.objs: Conditionally build boards
Quoted 30 lines · Paolo Bonzini
From: Ákos Kovács <[email protected]>
CONFIG_AN5206,CONFIG_MCF5206andCONFIG_MCF5208make variables created for m68k boards, and added to default-configs/m86k-softmmu.mak.Signed-off-by Ákos Kovács <[email protected]>Signed-off-by Paolo Bonzini <[email protected]>Message-Id: <[email protected]>
Signed-off-by Paolo Bonzini <[email protected]>--- default-configs/m68k-softmmu.mak | 2 ++ hw/m68k/Makefile.objs | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-)default-configs/m68k-softmmu.mak +2
-0@@ -2,3 +2,5 @@ CONFIG_COLDFIRE=y CONFIG_PTIMER=y +CONFIG_AN5206=y +CONFIG_MCF5208=yhw/m68k/Makefile.objs +0
-0
hw/m68k/Makefile.objs line 2
Quoted 4 lines
hw/m68k/Makefile.objs +2
-2@@ -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:
PATCH v5 9/52 hw/microblaze/Makefile.objs: Create configs for petalogix and xilinx boards
In reply to Paolo BonziniFrom: Ákos Kovács <[email protected]>
CONFIG_PETALOGIX_* and CONFIG_XLNX_* configs added to default-configs/microblaze-softmmu.mak and default-configs/microblazeel-softmmu.mak.
Message-Id: <[email protected]>
--- default-configs/microblaze-softmmu.mak | 3 +++ hw/microblaze/Makefile.objs | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-)
default-configs/microblaze-softmmu.mak +3 -0
@@ -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
hw/microblaze/Makefile.objs +3 -3
@@ -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
Signature · 1 line
1.8.3.1
PATCH v5 10/52 hw/mips/Makefile.objs: Create CONFIG_* for r4k, malta, mipssim boards
In reply to Paolo BonziniFrom: Ákos Kovács <[email protected]>
Add the new configs to default-configs/mips*-sofmmu.mak.
Message-Id: <[email protected]>
--- default-configs/mips-softmmu-common.mak | 3 +++ hw/mips/Makefile.objs | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-)
default-configs/mips-softmmu-common.mak +3 -0
@@ -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
hw/mips/Makefile.objs +3 -2
@@ -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
Signature · 1 line
1.8.3.1
Re: [Qemu-devel] [PATCH 10/52] hw/mips/Makefile.objs: Create CONFIG_* for r4k, malta, mipssim boards
Quoted 10 lines · Paolo Bonzini
From: Ákos Kovács <[email protected]>
Add the new configs to default-configs/mips*-sofmmu.mak.
Signed-off-by Ákos Kovács <[email protected]>Signed-off-by Paolo Bonzini <[email protected]>Signed-off-by Yang Zhong <[email protected]>Message-Id: <[email protected]>
Reviewed-by Thomas Huth <[email protected]>Signed-off-by Paolo Bonzini <[email protected]>
Quoted 32 lines
--- default-configs/mips-softmmu-common.mak | 3 +++ hw/mips/Makefile.objs | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-)default-configs/mips-softmmu-common.mak +3
-0@@ -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=yhw/mips/Makefile.objs +3
-2@@ -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
PATCH v5 11/52 hw/ppc/Makefile.objs: Build all boards conditinally with CONFIG_*
In reply to Paolo BonziniFrom: Ákos Kovács <[email protected]>
CONFIG_PPC405, CONFIG_PPC440, CONFIG_MAC_OLDWORLD, CONFIG_MAX_NEWWORLD and CONFIG_VIRTEX configuration options created for default-configs/ppc*-softmmu.mak.
Message-Id: <[email protected]>
--- default-configs/ppc-softmmu.mak | 7 ++++++- hw/ppc/Makefile.objs | 11 ++++++----- 2 files changed, 12 insertions(+), 6 deletions(-)
default-configs/ppc-softmmu.mak +6 -1
@@ -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
hw/ppc/Makefile.objs +6 -5
@@ -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
Signature · 1 line
1.8.3.1
PATCH v5 12/52 hw/sh4/Makefile.objs: New CONFIG_* varibales created for sh4 boards and device
In reply to Paolo BonziniFrom: Ákos Kovács <[email protected]>
Make hw/sh4 configurable and add new CONFIG_* to the default-configs/sh4*-softmmu.mak.
Message-Id: <[email protected]>
--- default-configs/sh4-softmmu.mak | 2 ++ default-configs/sh4eb-softmmu.mak | 2 ++ hw/sh4/Makefile.objs | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-)
default-configs/sh4-softmmu.mak +2 -0
@@ -19,3 +19,5 @@ CONFIG_PCSPK=y CONFIG_I82374=y CONFIG_I8257=y CONFIG_MC146818RTC=y +CONFIG_R2D=y +CONFIG_SHIX=y
default-configs/sh4eb-softmmu.mak +2 -0
@@ -19,3 +19,5 @@ CONFIG_PCSPK=y CONFIG_I82374=y CONFIG_I8257=y CONFIG_MC146818RTC=y +CONFIG_R2D=y +CONFIG_SHIX=y
hw/sh4/Makefile.objs +2 -2
@@ -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
Signature · 1 line
1.8.3.1
PATCH v5 13/52 hw/s390/Makefile.objs: Create new CONFIG_* variables for s390x boards and devices
In reply to Paolo BonziniMake hw/s390x configurable and add new CONFIG_* to the default-configs/s390x*-softmmu.mak. This will be used to enable/disable vfio-ccw.
Message-Id: <[email protected]>
--- default-configs/s390x-softmmu.mak | 1 + hw/s390x/Makefile.objs | 2 ++ 2 files changed, 3 insertions(+)
default-configs/s390x-softmmu.mak +1 -0
@@ -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
hw/s390x/Makefile.objs +2 -0
@@ -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
Signature · 1 line
1.8.3.1
Re: [Qemu-devel] [PATCH 13/52] hw/s390/Makefile.objs: Create new CONFIG_* variables for s390x boards and devices
Quoted 30 lines · Paolo Bonzini
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 <[email protected]>Message-Id: <[email protected]>
Signed-off-by Paolo Bonzini <[email protected]>--- default-configs/s390x-softmmu.mak | 1 + hw/s390x/Makefile.objs | 2 ++ 2 files changed, 3 insertions(+)default-configs/s390x-softmmu.mak +1
-0@@ -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=yhw/s390x/Makefile.objs +1
-0@@ -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
hw/s390x/Makefile.objs obj-$(CONFIG_KVM) += s390-stattrib-kvm.o · line 37
Quoted 4 lines
hw/s390x/Makefile.objs +1
-0@@ -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
Re: [Qemu-devel] [PATCH 13/52] hw/s390/Makefile.objs: Create new CONFIG_* variables for s390x boards and devices
Quoted 13 lines · Thomas Huth
hw/s390x/Makefile.objs obj-$(CONFIG_KVM) += s390-stattrib-kvm.o · line 37
Quoted 9 lines
hw/s390x/Makefile.objs +2
-0+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 +endifThat 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.:
Quoted 3 lines
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
PATCH v5 14/52 hw/sparc/Makefile.objs: CONFIG_* for sun4m and leon3 created
In reply to Paolo BonziniFrom: Ákos Kovács <[email protected]>
CONFIG_LEON3 added to default-configs/sparc-softmmu.mak.
Message-Id: <[email protected]>
--- default-configs/sparc-softmmu.mak | 2 ++ hw/sparc/Makefile.objs | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-)
default-configs/sparc-softmmu.mak +2 -0
@@ -18,4 +18,6 @@ CONFIG_CS4231=y CONFIG_GRLIB=y CONFIG_STP2000=y CONFIG_ECCMEMCTL=y + CONFIG_SUN4M=y +CONFIG_LEON3=y
hw/sparc/Makefile.objs +3 -1
@@ -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
Signature · 1 line
1.8.3.1
PATCH v5 15/52 hw/lm32/Makefile.objs: Conditionally build lm32 and milkmyst
In reply to Paolo BonziniFrom: Ákos Kovács <[email protected]>
CONFIG_LM32 and CONFIG_MILKYMIST added for lm32 and milkmyst build.
Message-Id: <[email protected]>
--- hw/lm32/Makefile.objs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
hw/lm32/Makefile.objs +2 -2
@@ -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
Signature · 1 line
1.8.3.1
PATCH v5 16/52 hw/xtensa/Makefile.objs: Build xtensa_sim and xtensa_fpga conditionally
In reply to Paolo BonziniFrom: Ákos Kovács <[email protected]>
Add the new CONFIG_* values to default-config/xtensa*-softmmu.mak.
Message-Id: <[email protected]>
--- default-configs/xtensa-softmmu.mak | 3 +++ default-configs/xtensaeb-softmmu.mak | 3 +++ hw/xtensa/Makefile.objs | 4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-)
default-configs/xtensa-softmmu.mak +3 -0
@@ -3,3 +3,6 @@ CONFIG_SERIAL=y CONFIG_OPENCORES_ETH=y CONFIG_PFLASH_CFI01=y + +CONFIG_XTENSA_SIM=y +CONFIG_XTENSA_FPGA=y
default-configs/xtensaeb-softmmu.mak +3 -0
@@ -3,3 +3,6 @@ CONFIG_SERIAL=y CONFIG_OPENCORES_ETH=y CONFIG_PFLASH_CFI01=y + +CONFIG_XTENSA_SIM=y +CONFIG_XTENSA_FPGA=y
hw/xtensa/Makefile.objs +2 -2
@@ -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
Signature · 1 line
1.8.3.1
PATCH v5 17/52 hw/nios2/Makefile.objs: Conditionally build nios2
In reply to Paolo BonziniFrom: Yang Zhong <[email protected]>
CONFIG_NIOS2_10M50 added for 10m50 dev board.
Message-Id: <[email protected]>
--- default-configs/nios2-softmmu.mak | 1 + hw/nios2/Makefile.objs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-)
default-configs/nios2-softmmu.mak +1 -0
@@ -4,3 +4,4 @@ CONFIG_NIOS2=y CONFIG_SERIAL=y CONFIG_PTIMER=y CONFIG_ALTERA_TIMER=y +CONFIG_NIOS2_10M50=y
hw/nios2/Makefile.objs +2 -1
@@ -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
Signature · 1 line
1.8.3.1
PATCH v5 18/52 hw/riscv/Makefile.objs: Create CONFIG_* for riscv boards
In reply to Paolo BonziniFrom: Yang Zhong <[email protected]>
Add the new configs to default-configs/riscv*-sofmmu.mak.
Message-Id: <[email protected]>
--- default-configs/riscv32-softmmu.mak | 7 +++++++ default-configs/riscv64-softmmu.mak | 7 +++++++ hw/riscv/Makefile.objs | 22 +++++++++++----------- 3 files changed, 25 insertions(+), 11 deletions(-)
default-configs/riscv32-softmmu.mak +7 -0
@@ -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
default-configs/riscv64-softmmu.mak +7 -0
@@ -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
hw/riscv/Makefile.objs +11 -11
@@ -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
Signature · 1 line
1.8.3.1
PATCH v5 19/52 hw/sparc64/Makefile.objs: Create CONFIG_* for sparc64
In reply to Paolo BonziniFrom: Yang Zhong <[email protected]>
Add the new configs to default-configs/sparc64-sofmmu.mak.
Message-Id: <[email protected]>
--- default-configs/sparc64-softmmu.mak | 2 ++ hw/sparc64/Makefile.objs | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-)
default-configs/sparc64-softmmu.mak +2 -0
@@ -17,3 +17,5 @@ CONFIG_SUNHME=y CONFIG_MC146818RTC=y CONFIG_ISA_TESTDEV=y CONFIG_SUN4V_RTC=y +CONFIG_SUN4U=y +CONFIG_NIAGARA=y
hw/sparc64/Makefile.objs +3 -3
@@ -1,4 +1,4 @@ obj-y += sparc64.o -obj-y += sun4u_iommu.o -obj-y += sun4u.o -obj-y += niagara.o +obj-$(CONFIG_SUN4U) += sun4u_iommu.o +obj-$(CONFIG_SUN4U) += sun4u.o +obj-$(CONFIG_NIAGARA) += niagara.o
Signature · 1 line
1.8.3.1
PATCH v5 20/52 hw/alpha/Makefile.objs: Create CONFIG_* for alpha
In reply to Paolo BonziniFrom: Yang Zhong <[email protected]>
Add the new configs to default-configs/alpha-sofmmu.mak.
Message-Id: <[email protected]>
--- default-configs/alpha-softmmu.mak | 1 + hw/alpha/Makefile.objs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
default-configs/alpha-softmmu.mak +1 -0
@@ -19,3 +19,4 @@ CONFIG_I8259=y CONFIG_MC146818RTC=y CONFIG_ISA_TESTDEV=y CONFIG_SMC37C669=y +CONFIG_DP264=y
hw/alpha/Makefile.objs +1 -1
@@ -1 +1 @@ -obj-y += dp264.o pci.o typhoon.o +obj-$(CONFIG_DP264) += dp264.o pci.o typhoon.o
Signature · 1 line
1.8.3.1
Re: [Qemu-devel] [PATCH 20/52] hw/alpha/Makefile.objs: Create CONFIG_* for alpha
Quoted 26 lines · Paolo Bonzini
From: Yang Zhong <[email protected]>
Add the new configs to default-configs/alpha-sofmmu.mak.
Signed-off-by Yang Zhong <[email protected]>Message-Id: <[email protected]>
Signed-off-by Paolo Bonzini <[email protected]>--- default-configs/alpha-softmmu.mak | 1 + hw/alpha/Makefile.objs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)default-configs/alpha-softmmu.mak +1
-0@@ -19,3 +19,4 @@ CONFIG_I8259=y CONFIG_MC146818RTC=y CONFIG_ISA_TESTDEV=y CONFIG_SMC37C669=y +CONFIG_DP264=yhw/alpha/Makefile.objs +0
-0
hw/alpha/Makefile.objs line 1
Quoted 2 lines
hw/alpha/Makefile.objs +1
-1@@ -1 +1 @@ -obj-y += dp264.o pci.o typhoon.o +obj-$(CONFIG_DP264) += dp264.o pci.o typhoon.o
Re: [Qemu-devel] [PATCH 20/52] hw/alpha/Makefile.objs: Create CONFIG_* for alpha
In reply to Paolo BonziniQuoted 11 lines · Paolo Bonzini
From: Yang Zhong <[email protected]>
Add the new configs to default-configs/alpha-sofmmu.mak.
Signed-off-by Yang Zhong <[email protected]>Message-Id: <[email protected]>
Signed-off-by Paolo Bonzini <[email protected]>--- default-configs/alpha-softmmu.mak | 1 + hw/alpha/Makefile.objs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
r~
PATCH v5 21/52 hw/cris/Makefile.objs: Create CONFIG_* for cris
In reply to Paolo BonziniFrom: Yang Zhong <[email protected]>
Add the new configs to default-configs/cris-sofmmu.mak.
Message-Id: <[email protected]>
--- default-configs/cris-softmmu.mak | 1 + hw/cris/Makefile.objs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
default-configs/cris-softmmu.mak +1 -0
@@ -4,3 +4,4 @@ CONFIG_ETRAXFS=y CONFIG_NAND=y CONFIG_PTIMER=y CONFIG_PFLASH_CFI02=y +CONFIG_AXIS=y
hw/cris/Makefile.objs +1 -1
@@ -1,2 +1,2 @@ obj-y += boot.o -obj-y += axis_dev88.o +obj-$(CONFIG_AXIS) += axis_dev88.o
Signature · 1 line
1.8.3.1
PATCH v5 22/52 hw/hppa/Makefile.objs: Create CONFIG_* for hppa
In reply to Paolo BonziniFrom: Yang Zhong <[email protected]>
Add the new configs to default-configs/hppa-sofmmu.mak.
Message-Id: <[email protected]>
--- default-configs/hppa-softmmu.mak | 1 + hw/hppa/Makefile.objs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
default-configs/hppa-softmmu.mak +1 -0
@@ -10,3 +10,4 @@ CONFIG_IDE_CMD646=y # CONFIG_IDE_MMIO=y CONFIG_VIRTIO_VGA=y CONFIG_MC146818RTC=y +CONFIG_DINO=y
hw/hppa/Makefile.objs +1 -1
@@ -1 +1 @@ -obj-y += machine.o pci.o dino.o +obj-$(CONFIG_DINO) += pci.o machine.o dino.o
Signature · 1 line
1.8.3.1
Re: [Qemu-devel] [PATCH 22/52] hw/hppa/Makefile.objs: Create CONFIG_* for hppa
Quoted 11 lines · Paolo Bonzini
From: Yang Zhong <[email protected]>
Add the new configs to default-configs/hppa-sofmmu.mak.
Signed-off-by Yang Zhong <[email protected]>Message-Id: <[email protected]>
Signed-off-by Paolo Bonzini <[email protected]>--- default-configs/hppa-softmmu.mak | 1 + hw/hppa/Makefile.objs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
r~
PATCH v5 23/52 hw/moxie/Makefile.objs: Conditionally build moxie
In reply to Paolo BonziniFrom: Yang Zhong <[email protected]>
CONFIG_MOXIE added for moxiesim board.
Message-Id: <[email protected]>
--- default-configs/moxie-softmmu.mak | 1 + hw/moxie/Makefile.objs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
default-configs/moxie-softmmu.mak +1 -0
@@ -5,3 +5,4 @@ CONFIG_MC146818RTC=y CONFIG_SERIAL=y CONFIG_SERIAL_ISA=y CONFIG_VGA=y +CONFIG_MOXIE=y
hw/moxie/Makefile.objs +1 -1
@@ -1,2 +1,2 @@ # moxie boards -obj-y += moxiesim.o +obj-$(CONFIG_MOXIE) += moxiesim.o
Signature · 1 line
1.8.3.1
Re: [Qemu-devel] [PATCH 23/52] hw/moxie/Makefile.objs: Conditionally build moxie
Quoted 26 lines · Paolo Bonzini
From: Yang Zhong <[email protected]>
CONFIG_MOXIEadded for moxiesim board.Signed-off-by Yang Zhong <[email protected]>Message-Id: <[email protected]>
Signed-off-by Paolo Bonzini <[email protected]>--- default-configs/moxie-softmmu.mak | 1 + hw/moxie/Makefile.objs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)default-configs/moxie-softmmu.mak +1
-0@@ -5,3 +5,4 @@ CONFIG_MC146818RTC=y CONFIG_SERIAL=y CONFIG_SERIAL_ISA=y CONFIG_VGA=y +CONFIG_MOXIE=yhw/moxie/Makefile.objs +0
-0
hw/moxie/Makefile.objs line 2
Quoted 3 lines
hw/moxie/Makefile.objs +1
-1@@ -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:
PATCH v5 24/52 hw/openrisc/Makefile.objs: Create CONFIG_* for openrisc
In reply to Paolo BonziniFrom: Yang Zhong <[email protected]>
Add the new configs to default-configs/or1k-sofmmu.mak.
Message-Id: <[email protected]>
--- default-configs/or1k-softmmu.mak | 1 + hw/openrisc/Makefile.objs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
default-configs/or1k-softmmu.mak +1 -0
@@ -3,3 +3,4 @@ CONFIG_SERIAL=y CONFIG_OPENCORES_ETH=y CONFIG_OMPIC=y +CONFIG_OPENRISC=y
hw/openrisc/Makefile.objs +1 -1
@@ -1,2 +1,2 @@ obj-y = pic_cpu.o cputimer.o -obj-y += openrisc_sim.o +obj-$(CONFIG_OPENRISC) += openrisc_sim.o
Signature · 1 line
1.8.3.1
Re: [Qemu-devel] [PATCH 24/52] hw/openrisc/Makefile.objs: Create CONFIG_* for openrisc
Quoted 27 lines · Paolo Bonzini
From: Yang Zhong <[email protected]>
Add the new configs to default-configs/or1k-sofmmu.mak.
Signed-off-by Yang Zhong <[email protected]>Message-Id: <[email protected]>
Signed-off-by Paolo Bonzini <[email protected]>--- default-configs/or1k-softmmu.mak | 1 + hw/openrisc/Makefile.objs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)default-configs/or1k-softmmu.mak +1
-0@@ -3,3 +3,4 @@ CONFIG_SERIAL=y CONFIG_OPENCORES_ETH=y CONFIG_OMPIC=y +CONFIG_OPENRISC=yhw/openrisc/Makefile.objs +0
-0
hw/openrisc/Makefile.objs line 2
Quoted 3 lines
hw/openrisc/Makefile.objs +1
-1@@ -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:
Re: [Qemu-devel] [PATCH 24/52] hw/openrisc/Makefile.objs: Create CONFIG_* for openrisc
Quoted 3 lines · Thomas Huth
<bikeshedding>
CONFIG_OR1K_SIMinstead ofCONFIG_OPENRISC?
</bikeshedding>
Sure, I just missed those two remarks.
Paolo
PATCH v5 25/52 hw/tricore/Makefile.objs: Create CONFIG_* for tricore
In reply to Paolo BonziniFrom: Yang Zhong <[email protected]>
Add the new configs to default-configs/tricore-sofmmu.mak.
Message-Id: <[email protected]>
--- default-configs/tricore-softmmu.mak | 1 + hw/tricore/Makefile.objs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
default-configs/tricore-softmmu.mak +1 -0
@@ -0,0 +1 @@ +CONFIG_TRICORE=y
hw/tricore/Makefile.objs +1 -1
@@ -1 +1 @@ -obj-y += tricore_testboard.o +obj-$(CONFIG_TRICORE) += tricore_testboard.o
Signature · 1 line
1.8.3.1
PATCH v5 26/52 hw/i2c/Makefile.objs: Create new CONFIG_* variables for EEPROM and ACPI controller
In reply to Paolo BonziniCreate 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.
Message-Id: <[email protected]>
--- 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(-)
default-configs/arm-softmmu.mak +1 -0
@@ -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
default-configs/i386-softmmu.mak +2 -0
@@ -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)
default-configs/mips-softmmu-common.mak +2 -0
@@ -39,3 +39,5 @@ CONFIG_I2C=y CONFIG_R4K=y CONFIG_MALTA=y CONFIG_MIPSSIM=y +CONFIG_ACPI_SMBUS=y +CONFIG_SMBUS_EEPROM=y
default-configs/ppc-softmmu.mak +1 -0
@@ -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
hw/i2c/Makefile.objs +3 -2
@@ -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
Signature · 1 line
1.8.3.1
Re: [Qemu-devel] [PATCH 26/52] hw/i2c/Makefile.objs: Create new CONFIG_* variables for EEPROM and ACPI controller
Quoted 68 lines · Paolo Bonzini
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 <[email protected]>Message-Id: <[email protected]>
Signed-off-by Paolo Bonzini <[email protected]>--- 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(-)default-configs/arm-softmmu.mak +1
-0@@ -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=ydefault-configs/i386-softmmu.mak +2
-0@@ -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)default-configs/mips-softmmu-common.mak +2
-0@@ -39,3 +39,5 @@ CONFIG_I2C=y CONFIG_R4K=y CONFIG_MALTA=y CONFIG_MIPSSIM=y +CONFIG_ACPI_SMBUS=y +CONFIG_SMBUS_EEPROM=ydefault-configs/ppc-softmmu.mak +1
-0@@ -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=yhw/i2c/Makefile.objs +0
-1@@ -1,8 +1,9 @@ -common-obj-$(CONFIG_I2C) += core.o smbus.o smbus_eeprom.o
hw/i2c/Makefile.objs line 9
Quoted 10 lines
hw/i2c/Makefile.objs +3
-1+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.
PATCH v5 27/52 hw/vfio/Makefile.objs: Create new CONFIG_* variables for VFIO core and PCI
In reply to Paolo BonziniMake 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.
Message-Id: <[email protected]>
--- 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(-)
default-configs/arm-softmmu.mak +2 -0
@@ -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
default-configs/pci.mak +2 -0
@@ -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
default-configs/ppc64-softmmu.mak +1 -0
@@ -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
default-configs/s390x-softmmu.mak +3 -2
@@ -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
hw/Makefile.objs +1 -1
@@ -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/
hw/vfio/Makefile.objs +3 -4
@@ -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
Signature · 1 line
1.8.3.1
PATCH v5 28/52 minikconfig: add parser skeleton
In reply to Paolo BonziniThis 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.
Message-Id: <[email protected]>
--- scripts/minikconf.py | 425 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 425 insertions(+) create mode 100644 scripts/minikconf.py
scripts/minikconf.py new file +425 -0
@@ -0,0 +1,425 @@ +# +# Mini-Kconfig parser +# +# Copyright (c) 2015 Red Hat Inc. +# +# Authors: +# Paolo Bonzini <[email protected]> +# +# 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'))
Signature · 1 line
1.8.3.1
PATCH v5 29/52 minikconfig: add AST
In reply to Paolo BonziniAdd 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
Message-Id: <[email protected]>
--- scripts/minikconf.py | 116 +++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 98 insertions(+), 18 deletions(-)
scripts/minikconf.py +98 -18
@@ -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
Signature · 1 line
1.8.3.1
PATCH v5 30/52 minikconfig: add semantic analysis
In reply to Paolo BonziniThere 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.
Message-Id: <[email protected]>
--- scripts/minikconf.py | 136 ++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 130 insertions(+), 6 deletions(-)
scripts/minikconf.py +130 -6
@@ -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()
Signature · 1 line
1.8.3.1
PATCH v5 31/52 hw/display: make edid configurable
In reply to Paolo BonziniFrom: Yang Zhong <[email protected]>
Use CONFIG_EDID to make edid-generate.c and edid-region.c configurable.
Message-Id: <[email protected]>
--- default-configs/pci.mak | 1 + hw/display/Makefile.objs | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-)
default-configs/pci.mak +1 -0
@@ -49,3 +49,4 @@ CONFIG_IVSHMEM_DEVICE=$(CONFIG_IVSHMEM) CONFIG_ROCKER=y CONFIG_VFIO=$(CONFIG_LINUX) CONFIG_VFIO_PCI=y +CONFIG_EDID=y
hw/display/Makefile.objs +1 -3
@@ -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
Signature · 1 line
1.8.3.1
Re: [Qemu-devel] [PATCH 31/52] hw/display: make edid configurable
Quoted 9 lines · Paolo Bonzini
From: Yang Zhong <[email protected]>
Use
CONFIG_EDIDto makeedid-generate.candedid-region.cconfigurable.Signed-off-by Yang Zhong <[email protected]>Reviewed-by Thomas Huth <[email protected]>Message-Id: <[email protected]>
Signed-off-by Paolo Bonzini <[email protected]>
Quoted 38 lines
--- default-configs/pci.mak | 1 + hw/display/Makefile.objs | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-)default-configs/pci.mak +1
-0@@ -49,3 +49,4 @@ CONFIG_IVSHMEM_DEVICE=$(CONFIG_IVSHMEM) CONFIG_ROCKER=y CONFIG_VFIO=$(CONFIG_LINUX) CONFIG_VFIO_PCI=y +CONFIG_EDID=yhw/display/Makefile.objs +1
-3@@ -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
PATCH v5 32/52 kconfig: introduce kconfig files
In reply to Paolo BonziniThe 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.
Message-Id: <[email protected]>
--- 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
Kconfig.host new file +23 -0
@@ -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
hw/9pfs/Kconfig new file +4 -0
@@ -0,0 +1,4 @@ +config VIRTFS + +config VIRTIO_9P + bool
hw/Kconfig new file +68 -0
68 lines not on this page · raw message
hw/acpi/Kconfig new file +20 -0
@@ -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
hw/adc/Kconfig new file +2 -0
@@ -0,0 +1,2 @@ +config STM32F2XX_ADC + bool
hw/alpha/Kconfig new file +2 -0
@@ -0,0 +1,2 @@ +config DP264 + bool
hw/arm/Kconfig new file +113 -0
113 lines not on this page · raw message
hw/audio/Kconfig new file +35 -0
@@ -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
hw/block/Kconfig new file +29 -0
@@ -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
hw/bt/Kconfig new file +2 -0
@@ -0,0 +1,2 @@ +config BLUETOOTH + bool
hw/char/Kconfig new file +32 -0
@@ -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
hw/core/Kconfig new file +11 -0
@@ -0,0 +1,11 @@ +config EMPTY_SLOT + bool + +config PTIMER + bool + +config FITLOADER + bool + +config PLATFORM_BUS + bool
hw/cpu/Kconfig new file +8 -0
@@ -0,0 +1,8 @@ +config ARM11MPCORE + bool + +config A9MPCORE + bool + +config A15MPCORE + bool
hw/cris/Kconfig new file +5 -0
@@ -0,0 +1,5 @@ +config AXIS + bool + +config ETRAXFS + bool
hw/display/Kconfig new file +77 -0
77 lines not on this page · raw message
hw/dma/Kconfig new file +20 -0
@@ -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
hw/gpio/Kconfig new file +8 -0
@@ -0,0 +1,8 @@ +config MAX7310 + bool + +config PL061 + bool + +config GPIO_KEY + bool
hw/hppa/Kconfig new file +5 -0
@@ -0,0 +1,5 @@ +config HPPA + bool + +config DINO + bool
hw/hyperv/Kconfig new file +5 -0
@@ -0,0 +1,5 @@ +config HYPERV + bool + +config HYPERV_TESTDEV + bool
hw/i2c/Kconfig new file +20 -0
@@ -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
hw/i386/Kconfig new file +23 -0
@@ -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
hw/ide/Kconfig new file +35 -0
@@ -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
hw/input/Kconfig new file +23 -0
@@ -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
hw/intc/Kconfig new file +47 -0
47 lines not on this page · raw message
hw/ipack/Kconfig new file +2 -0
@@ -0,0 +1,2 @@ +config IPACK + bool
hw/ipmi/Kconfig new file +14 -0
@@ -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
hw/isa/Kconfig new file +23 -0
@@ -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
hw/lm32/Kconfig new file +5 -0
@@ -0,0 +1,5 @@ +config LM32 + bool + +config MILKYMIST + bool
hw/m68k/Kconfig new file +8 -0
@@ -0,0 +1,8 @@ +config AN5206 + bool + +config MCF5206 + bool + +config MCF5208 + bool
hw/mem/Kconfig new file +8 -0
@@ -0,0 +1,8 @@ +config DIMM + bool + +config MEM_DEVICE + bool + +config NVDIMM + bool
hw/microblaze/Kconfig new file +8 -0
@@ -0,0 +1,8 @@ +config PETALOGIX_S3ADSP1800 + bool + +config PETALOGIX_ML605 + bool + +config XLNX_ZYNQMP_PMU + bool
hw/mips/Kconfig new file +20 -0
@@ -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
hw/misc/Kconfig new file +92 -0
92 lines not on this page · raw message
hw/misc/macio/Kconfig new file +11 -0
@@ -0,0 +1,11 @@ +config CUDA + bool + +config MAC_PMU + bool + +config MAC_DBDMA + bool + +config MACIO_GPIO + bool
hw/moxie/Kconfig new file +2 -0
@@ -0,0 +1,2 @@ +config MOXIE + bool
hw/net/Kconfig new file +92 -0
92 lines not on this page · raw message
hw/nios2/Kconfig new file +5 -0
@@ -0,0 +1,5 @@ +config NIOS2_10M50 + bool + +config NIOS2 + bool
hw/nvram/Kconfig new file +8 -0
@@ -0,0 +1,8 @@ +config DS1225Y + bool + +config AT24C + bool + +config MAC_NVRAM + bool
hw/openrisc/Kconfig new file +2 -0
@@ -0,0 +1,2 @@ +config OPENRISC + bool
hw/pci-bridge/Kconfig new file +20 -0
@@ -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
hw/pci-host/Kconfig new file +35 -0
@@ -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
hw/pci/Kconfig new file +2 -0
@@ -0,0 +1,2 @@ +config PCI + bool
hw/pcmcia/Kconfig new file +2 -0
@@ -0,0 +1,2 @@ +config PCMCIA + bool
hw/ppc/Kconfig new file +56 -0
56 lines not on this page · raw message
hw/riscv/Kconfig new file +19 -0
@@ -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
hw/s390x/Kconfig new file +2 -0
@@ -0,0 +1,2 @@ +config S390_CCW_VIRTIO + bool
hw/scsi/Kconfig new file +26 -0
@@ -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
hw/sd/Kconfig new file +11 -0
@@ -0,0 +1,11 @@ +config PL181 + bool + +config SSI_SD + bool + +config SD + bool + +config SDHCI + bool
hw/sh4/Kconfig new file +11 -0
@@ -0,0 +1,11 @@ +config R2D + bool + +config SHIX + bool + +config SH7750 + bool + +config SH4 + bool
hw/smbios/Kconfig new file +2 -0
@@ -0,0 +1,2 @@ +config SMBIOS + bool
hw/sparc/Kconfig new file +11 -0
@@ -0,0 +1,11 @@ +config SUN4M + bool + +config LEON3 + bool + +config GRLIB + bool + +config SLAVIO + bool
hw/sparc64/Kconfig new file +5 -0
@@ -0,0 +1,5 @@ +config SUN4U + bool + +config NIAGARA + bool
hw/ssi/Kconfig new file +14 -0
@@ -0,0 +1,14 @@ +config PL022 + bool + +config SSI + bool + +config XILINX_SPI + bool + +config XILINX_SPIPS + bool + +config STM32F2XX_SPI + bool
hw/timer/Kconfig new file +53 -0
53 lines not on this page · raw message
hw/tpm/Kconfig new file +14 -0
@@ -0,0 +1,14 @@ +config TPM + bool + +config TPM_TIS + bool + +config TPM_CRB + bool + +config TPM_PASSTHROUGH + bool + +config TPM_EMULATOR + bool
hw/tricore/Kconfig new file +2 -0
@@ -0,0 +1,2 @@ +config TRICORE + bool
hw/unicore32/Kconfig new file +2 -0
@@ -0,0 +1,2 @@ +config PUV3 + bool
hw/usb/Kconfig new file +53 -0
53 lines not on this page · raw message
hw/vfio/Kconfig new file +23 -0
@@ -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
hw/virtio/Kconfig new file +17 -0
@@ -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
hw/watchdog/Kconfig new file +11 -0
@@ -0,0 +1,11 @@ +config CMSDK_APB_WATCHDOG + bool + +config WDT_IB6300ESB + bool + +config WDT_IB700 + bool + +config WDT_DIAG288 + bool
hw/xtensa/Kconfig new file +5 -0
@@ -0,0 +1,5 @@ +config XTENSA_SIM + bool + +config XTENSA_FPGA + bool
scripts/minikconf.py +32 -3
@@ -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()
Signature · 1 line
1.8.3.1
Re: [Qemu-devel] [PATCH 32/52] kconfig: introduce kconfig files
On 2019-01-25 11:06, Paolo Bonzini wrote:
[...]
Quoted 17 lines
hw/misc/macio/Kconfig new file +11
-0@@ -0,0 +1,11 @@ +config CUDA + bool + +config MAC_PMU + bool + +config MAC_DBDMA + bool + +config MACIO_GPIO + bool
[...]
Quoted 5 lines
hw/ppc/Kconfig new file +0
-0
[...]
Quoted 8 lines
hw/ppc/Kconfig new file +8
-0+ +config MAC_DBDMA + bool + +config MAC_PMU + bool + +config XIVE
hw/ppc/Kconfig line 56
Quoted 10 lines
hw/ppc/Kconfig new file +10
-0+ 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
Re: [Qemu-devel] [PATCH 32/52] kconfig: introduce kconfig files
Quoted 40 lines · Thomas Huth
On 2019-01-25 11:06, Paolo Bonzini wrote:
[...]Quoted 17 lines
hw/misc/macio/Kconfig new file +11
-0@@ -0,0 +1,11 @@ +config CUDA + bool + +config MAC_PMU + bool + +config MAC_DBDMA + bool + +config MACIO_GPIO + bool[...]
Quoted 5 lines
hw/ppc/Kconfig new file +0
-0[...]
Quoted 14 lines
hw/ppc/Kconfig new file +14
-0+ +config MAC_DBDMA + bool + +config MAC_PMU + bool + +config XIVE + bool + +config MACIO_GPIO + bool + +config XIVE_SPAPR
Quoted 8 lines
hw/ppc/Kconfig line 56
Quoted 4 lines
hw/ppc/Kconfig new file +4
-0+ bool + +config CUDA + boolI 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
PATCH v5 33/52 build: switch to Kconfig
In reply to Paolo BonziniThe 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.
Message-Id: <[email protected]>
--- 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
Kconfig.host +2 -1
@@ -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
Makefile +16 -3
@@ -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 $@ > [email protected],"GEN","[email protected]") +# 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) > [email protected], "GEN", "[email protected]") $(call quiet-command, if test -f $@; then \ if cmp -s [email protected] $@; then \ mv [email protected] $@; \
Makefile.target +6 -1
@@ -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
configure +3 -0
@@ -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
default-configs/arm-softmmu.mak +0 -2
@@ -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
default-configs/i386-softmmu.mak +1 -4
@@ -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
default-configs/lm32-softmmu.mak +0 -1
@@ -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
default-configs/pci.mak +0 -1
@@ -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
default-configs/ppc-softmmu.mak +0 -1
@@ -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
default-configs/ppc64-softmmu.mak +0 -6
@@ -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
default-configs/s390x-softmmu.mak +1 -3
@@ -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
default-configs/virtio.mak +0 -3
@@ -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)
hw/9pfs/Kconfig +1 -0
@@ -2,3 +2,4 @@ config VIRTFS config VIRTIO_9P bool + default y if VIRTFS
hw/block/Kconfig +1 -0
@@ -27,3 +27,4 @@ config VIRTIO_BLK config VHOST_USER_BLK bool + default y if VHOST_USER && LINUX
hw/display/Kconfig +4 -0
@@ -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
hw/i386/Kconfig +5 -1
@@ -1,4 +1,8 @@ -config KVM +config SEV + bool + default y if PC && KVM + +config PC bool config I440FX
hw/input/Kconfig +5 -0
@@ -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
hw/intc/Kconfig +12 -0
@@ -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
hw/misc/Kconfig +2 -0
@@ -48,6 +48,8 @@ config MACIO config IVSHMEM_DEVICE bool + default y + depends on PCI config ECCMEMCTL bool
hw/ppc/Kconfig +4 -0
@@ -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
hw/scsi/Kconfig +6 -0
@@ -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
hw/tpm/Kconfig +2 -0
@@ -3,6 +3,8 @@ config TPM config TPM_TIS bool + default y if PC + depends on TPM config TPM_CRB bool
hw/vfio/Kconfig +11 -0
@@ -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
rules.mak +1 -1
@@ -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
scripts/make_device_config.sh deleted +0 -30
@@ -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
Signature · 1 line
1.8.3.1
Re: [Qemu-devel] [PATCH 33/52] build: switch to Kconfig
Hi Paolo,
Quoted 66 lines · Paolo Bonzini
The
make_device_config.shscript 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.hostand hw/Kconfig. One difference withmake_device_config.shis that all symbols have to be defined in aKconfigfile, including those coming from the configure script. This is the reason for theKconfig.hostfile 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 aKconfigdependency; this part must be done already in this patch for bisectability.Signed-off-by Paolo Bonzini <[email protected]>Signed-off-by Yang Zhong <[email protected]>Acked-by Thomas Huth <[email protected]>Message-Id: <[email protected]>
Signed-off-by Paolo Bonzini <[email protected]>--- 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.shKconfig.host +2
-1@@ -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 boolMakefile +0
-0@@ -326,9 +326,22 @@ endif -include $(SUBDIR_DEVICES_MAK_DEP)
Makefile endif · line 335
Quoted 10 lines
Makefile +7
-3-%/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 $@ > [email protected],"GEN","[email protected]") +# 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.
Quoted 461 lines
Makefile +9
-0+ 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) > [email protected], "GEN", "[email protected]") $(call quiet-command, if test -f $@; then \ if cmp -s [email protected] $@; then \ mv [email protected] $@; \Makefile.target +6
-1@@ -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.aconfigure +3
-0@@ -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_makdefault-configs/arm-softmmu.mak +0
-2@@ -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=ydefault-configs/i386-softmmu.mak +1
-4@@ -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=ydefault-configs/lm32-softmmu.mak +0
-1@@ -2,7 +2,6 @@ CONFIG_LM32=y CONFIG_MILKYMIST=y -CONFIG_MILKYMIST_TMU2=$(CONFIG_OPENGL) CONFIG_FRAMEBUFFER=y CONFIG_PTIMER=y CONFIG_PFLASH_CFI01=ydefault-configs/pci.mak +0
-1@@ -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=ydefault-configs/ppc-softmmu.mak +0
-1@@ -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=ydefault-configs/ppc64-softmmu.mak +0
-6@@ -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=ydefault-configs/s390x-softmmu.mak +1
-3@@ -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=ydefault-configs/virtio.mak +0
-3@@ -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)hw/9pfs/Kconfig +1
-0@@ -2,3 +2,4 @@ config VIRTFS config VIRTIO_9P bool + default y if VIRTFShw/block/Kconfig +1
-0@@ -27,3 +27,4 @@ config VIRTIO_BLK config VHOST_USER_BLK bool + default y if VHOST_USER && LINUXhw/display/Kconfig +4
-0@@ -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 boolhw/i386/Kconfig +5
-1@@ -1,4 +1,8 @@ -config KVM +config SEV + bool + default y if PC && KVM + +config PC bool config I440FXhw/input/Kconfig +5
-0@@ -19,5 +19,10 @@ config TSC2005 config VIRTIO_INPUT bool +config VIRTIO_INPUT_HOST + bool + default y if LINUX + depends on LINUX + config TSC210X boolhw/intc/Kconfig +12
-0@@ -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 boolhw/misc/Kconfig +2
-0@@ -48,6 +48,8 @@ config MACIO config IVSHMEM_DEVICE bool + default y + depends on PCI config ECCMEMCTL boolhw/ppc/Kconfig +4
-0@@ -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 boolhw/scsi/Kconfig +6
-0@@ -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 && LINUXhw/tpm/Kconfig +2
-0@@ -3,6 +3,8 @@ config TPM config TPM_TIS bool + default y if PC + depends on TPM config TPM_CRB boolhw/vfio/Kconfig +11
-0@@ -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 LINUXrules.mak +1
-1@@ -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, dirscripts/make_device_config.sh deleted +0
-30@@ -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
Re: [Qemu-devel] [PATCH 33/52] build: switch to Kconfig
Quoted 10 lines · Philippe Mathieu-Daudé
There is something I don't understand here: Does
CONFIG_XENinKconfig.hosttake 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
Re: [Qemu-devel] [PATCH 33/52] build: switch to Kconfig
Quoted 12 lines · Paolo Bonzini
Quoted 10 lines · Philippe Mathieu-Daudé
There is something I don't understand here: Does
CONFIG_XENinKconfig.hosttake 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
Quoted 2 lines
You're right,
Kconfig.hostshould containCONFIG_XEN_BACKENDand notCONFIG_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.
Re: [Qemu-devel] [PATCH 33/52] build: switch to Kconfig
Quoted 12 lines · Philippe Mathieu-Daudé
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 toxen_invalidate_map_cache_entry' /usr/bin/ld: exec.o: in functionqemu_ram_ptr_length':qemu/exec.c:2531: undefined reference toxen_map_cache' /usr/bin/ld: exec.o: in functionqemu_map_ram_ptr':qemu/exec.c:2498: undefined reference toxen_map_cache' /usr/bin/ld: exec.o: in functionqemu_ram_block_from_host':qemu/exec.c:2573: undefined reference toxen_ram_addr_from_mapcache' /usr/bin/ld: exec.o: in functionaddress_space_unmap':qemu/exec.c:3699: undefined reference to `xen_invalidate_map_cache_entry'
Quoted 8 lines
/usr/bin/ld: exec.o: in function `address_space_cache_destroy':qemu/exec.c:3791: undefined reference toxen_invalidate_map_cache_entry' /usr/bin/ld: exec.o: in functionqemu_ram_ptr_length':qemu/exec.c:2528: undefined reference toxen_map_cache' /usr/bin/ld: exec.o: in functionqemu_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
Re: [Qemu-devel] [PATCH 33/52] build: switch to Kconfig
In reply to Philippe Mathieu-DaudéQuoted 37 lines · Philippe Mathieu-Daudé
Quoted 12 lines · Paolo Bonzini
Quoted 10 lines · Philippe Mathieu-Daudé
There is something I don't understand here: Does
CONFIG_XENinKconfig.hosttake 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
fiQuoted 2 lines
You're right,
Kconfig.hostshould containCONFIG_XEN_BACKENDand notCONFIG_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 toxen_invalidate_map_cache_entry' /usr/bin/ld: exec.o: in functionqemu_ram_ptr_length':qemu/exec.c:2531: undefined reference toxen_map_cache' /usr/bin/ld: exec.o: in functionqemu_map_ram_ptr':qemu/exec.c:2498: undefined reference toxen_map_cache' /usr/bin/ld: exec.o: in functionqemu_ram_block_from_host':qemu/exec.c:2573: undefined reference toxen_ram_addr_from_mapcache' /usr/bin/ld: exec.o: in functionaddress_space_unmap':qemu/exec.c:3699: undefined reference toxen_invalidate_map_cache_entry' /usr/bin/ld: exec.o: in functionaddress_space_cache_destroy':qemu/exec.c:3791: undefined reference toxen_invalidate_map_cache_entry' /usr/bin/ld: exec.o: in functionqemu_ram_ptr_length':qemu/exec.c:2528: undefined reference toxen_map_cache' /usr/bin/ld: exec.o: in functionqemu_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
Quoted 3 lines
Moving those function stubs into a real
xen-stub.cfile 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
Re: [Qemu-devel] [PATCH 33/52] build: switch to Kconfig
In reply to Philippe Mathieu-DaudéQuoted 1 line · Philippe Mathieu-Daudé
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,
Signature · 1 line
Anthony PERARD
Re: [Qemu-devel] [PATCH 33/52] build: switch to Kconfig
Quoted 8 lines · Anthony PERARD
I've tested the series, and here is the first issue:
CChw/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_opsis 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.
Quoted 8 lines
Building QEMU with --disable-virtfs works. (Same as commenting out the line that uses
xen_9pfs_opsin xen-legacy-backend.) Part of the other options I have for configure: --enable-xen --target-list=i386-softmmu --disable-user --cpu=x86_64I did also other build tests and one without --target-list, and that fails, but not because of xen:
Quoted 15 lines
$ ./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
PATCH v5 34/52 minikconf: implement allnoconfig and defconfig
In reply to Paolo BonziniApart 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.
--- Makefile | 8 +++++--- scripts/minikconf.py | 39 ++++++++++++++++++++++++++++++++++----- 2 files changed, 39 insertions(+), 8 deletions(-)
Makefile +5 -3
@@ -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) > [email protected], "GEN", "[email protected]") $(call quiet-command, if test -f $@; then \
@@ -360,9 +365,6 @@ MINIKCONF = $(PYTHON) $(SRC_PATH)/scripts/minikconf.py \ cp -p $@ [email protected]; \ fi,"GEN","$@"); -defconfig: - rm -f config-all-devices.mak $(SUBDIR_DEVICES_MAK) - ifneq ($(wildcard config-host.mak),) include $(SRC_PATH)/Makefile.objs endif
scripts/minikconf.py +34 -5
@@ -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)
Signature · 1 line
1.8.3.1
PATCH v5 35/52 ide: express dependencies with Kconfig
In reply to Paolo BonziniMessage-Id: <[email protected]>
--- default-configs/alpha-softmmu.mak | 2 -- default-configs/pci.mak | 3 --- hw/ide/Kconfig | 15 +++++++++++++++ 3 files changed, 15 insertions(+), 5 deletions(-)
default-configs/alpha-softmmu.mak +0 -2
@@ -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
default-configs/pci.mak +0 -3
@@ -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
hw/ide/Kconfig +15 -0
@@ -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
Signature · 1 line
1.8.3.1
PATCH v5 36/52 hw/pci/Makefile.objs: make pcie configurable
In reply to Paolo BonziniFrom: Yang Zhong <[email protected]>
Make pcie splited from pci and make it configurable.
Message-Id: <[email protected]>
--- 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(-)
default-configs/arm-softmmu.mak +1 -0
@@ -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
default-configs/i386-softmmu.mak +1 -0
@@ -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
default-configs/mips64el-softmmu.mak +1 -0
@@ -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
default-configs/ppc-softmmu.mak +1 -0
@@ -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
default-configs/riscv32-softmmu.mak +1 -0
@@ -8,6 +8,7 @@ CONFIG_VIRTIO_MMIO=y CONFIG_CADENCE=y +CONFIG_PCI_EXPRESS=y CONFIG_PCI_EXPRESS_GENERIC_BRIDGE=y CONFIG_VGA=y
default-configs/riscv64-softmmu.mak +1 -0
@@ -8,6 +8,7 @@ CONFIG_VIRTIO_MMIO=y CONFIG_CADENCE=y +CONFIG_PCI_EXPRESS=y CONFIG_PCI_EXPRESS_GENERIC_BRIDGE=y CONFIG_VGA=y
hw/pci/Kconfig +4 -0
@@ -1,2 +1,6 @@ config PCI bool + +config PCI_EXPRESS + bool + select PCI
hw/pci/Makefile.objs +7 -2
@@ -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
Signature · 1 line
1.8.3.1
PATCH v5 37/52 build: convert pci.mak to Kconfig
In reply to Paolo BonziniInstead 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.makfollowed by replacing a few "depends on" clauses with "select" whenever the symbol is not really related to PCI.
Message-Id: <[email protected]>
--- 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
default-configs/alpha-softmmu.mak +2 -1
@@ -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
default-configs/arm-softmmu.mak +2 -1
@@ -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
default-configs/hppa-softmmu.mak +2 -2
@@ -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
default-configs/i386-softmmu.mak +2 -3
@@ -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
default-configs/mips-softmmu-common.mak +2 -1
@@ -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
default-configs/pci.mak deleted +0 -48
48 lines not on this page · raw message
default-configs/ppc-softmmu.mak +2 -1
@@ -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
default-configs/riscv32-softmmu.mak +2 -2
@@ -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
default-configs/riscv64-softmmu.mak +2 -2
@@ -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
default-configs/sh4-softmmu.mak +2 -1
@@ -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
default-configs/sh4eb-softmmu.mak +2 -1
@@ -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
default-configs/sparc64-softmmu.mak +2 -1
@@ -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
docs/devel/build-system.txt +0 -1
@@ -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)
hw/audio/Kconfig +6 -0
@@ -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
hw/block/Kconfig +2 -0
@@ -21,6 +21,8 @@ config ONENAND config NVME_PCI bool + default y if PCI_DEVICES + depends on PCI config VIRTIO_BLK bool
hw/char/Kconfig +2 -0
@@ -15,6 +15,8 @@ config SERIAL_ISA config SERIAL_PCI bool + default y if PCI_DEVICES + depends on PCI config VIRTIO_SERIAL bool
hw/display/Kconfig +16 -0
@@ -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
hw/ide/Kconfig +3 -0
@@ -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
hw/ipack/Kconfig +2 -0
@@ -1,2 +1,4 @@ config IPACK bool + default y if PCI_DEVICES + depends on PCI
hw/misc/Kconfig +5 -1
@@ -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
hw/net/Kconfig +23 -0
@@ -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
hw/pci-bridge/Kconfig +8 -0
@@ -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
hw/pci-host/Kconfig +10 -0
@@ -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
hw/pci/Kconfig +3 -0
@@ -4,3 +4,6 @@ config PCI config PCI_EXPRESS bool select PCI + +config PCI_DEVICES + bool
hw/scsi/Kconfig +11 -0
@@ -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
hw/sd/Kconfig +3 -0
@@ -9,3 +9,6 @@ config SD config SDHCI bool + default y if PCI_DEVICES + depends on PCI + select SD
hw/usb/Kconfig +10 -0
@@ -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
hw/virtio/Kconfig +3 -0
@@ -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
hw/watchdog/Kconfig +2 -0
@@ -3,6 +3,8 @@ config CMSDK_APB_WATCHDOG config WDT_IB6300ESB bool + default y if PCI_DEVICES + depends on PCI config WDT_IB700 bool
Signature · 1 line
1.8.3.1
PATCH v5 38/52 build: convert sound.mak to Kconfig
In reply to Paolo BonziniThere 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.makMessage-Id: <[email protected]>
--- 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
default-configs/i386-softmmu.mak +1 -1
@@ -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
default-configs/mips-softmmu-common.mak +1 -1
@@ -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
default-configs/ppc-softmmu.mak +1 -1
@@ -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
default-configs/sound.mak deleted +0 -4
@@ -1,4 +0,0 @@ -CONFIG_SB16=y -CONFIG_ADLIB=y -CONFIG_GUS=y -CONFIG_CS4231A=y
hw/audio/Kconfig +8 -0
@@ -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
Signature · 1 line
1.8.3.1
PATCH v5 39/52 build: convert usb.mak to Kconfig
In reply to Paolo BonziniInstead 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.
Message-Id: <[email protected]>
--- 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
default-configs/alpha-softmmu.mak +0 -1
@@ -1,6 +1,5 @@ # Default configuration for alpha-softmmu -include usb.mak CONFIG_PCI=y CONFIG_PCI_DEVICES=y CONFIG_SERIAL=y
default-configs/arm-softmmu.mak +0 -2
@@ -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
default-configs/hppa-softmmu.mak +0 -1
@@ -1,4 +1,3 @@ -include usb.mak CONFIG_PCI=y CONFIG_PCI_DEVICES=y CONFIG_SERIAL=y
default-configs/i386-softmmu.mak +0 -1
@@ -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
default-configs/mips-softmmu-common.mak +0 -1
@@ -1,6 +1,5 @@ # Common mips*-softmmu CONFIG defines -include usb.mak CONFIG_ISA_BUS=y CONFIG_PCI=y CONFIG_PCI_DEVICES=y
default-configs/ppc-softmmu.mak +0 -1
@@ -1,6 +1,5 @@ # Default configuration for ppc-softmmu -include usb.mak CONFIG_PCI=y CONFIG_PCI_DEVICES=y CONFIG_ISA_BUS=y
default-configs/riscv32-softmmu.mak +0 -1
@@ -1,6 +1,5 @@ # Default configuration for riscv-softmmu -include usb.mak CONFIG_PCI=y CONFIG_PCI_DEVICES=y CONFIG_SERIAL=y
default-configs/riscv64-softmmu.mak +0 -1
@@ -1,6 +1,5 @@ # Default configuration for riscv-softmmu -include usb.mak CONFIG_PCI=y CONFIG_PCI_DEVICES=y CONFIG_SERIAL=y
default-configs/sh4-softmmu.mak +0 -1
@@ -1,6 +1,5 @@ # Default configuration for sh4-softmmu -include usb.mak CONFIG_PCI=y CONFIG_PCI_DEVICES=y CONFIG_SERIAL=y
default-configs/sh4eb-softmmu.mak +0 -1
@@ -1,6 +1,5 @@ # Default configuration for sh4eb-softmmu -include usb.mak CONFIG_PCI=y CONFIG_PCI_DEVICES=y CONFIG_SERIAL=y
default-configs/sparc64-softmmu.mak +0 -1
@@ -1,6 +1,5 @@ # Default configuration for sparc64-softmmu -include usb.mak CONFIG_PCI=y CONFIG_PCI_DEVICES=y CONFIG_M48T59=y
default-configs/usb.mak deleted +0 -11
@@ -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
hw/usb/Kconfig +26 -0
@@ -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
Signature · 1 line
1.8.3.1
PATCH v5 40/52 scsi: express dependencies with Kconfig
In reply to Paolo BonziniThis automatically removes the SCSI subsystem from the binary altogether if no controllers are selected.
Message-Id: <[email protected]>
--- hw/scsi/Kconfig | 11 ++++++++++- hw/scsi/Makefile.objs | 2 +- hw/usb/Kconfig | 2 ++ 3 files changed, 13 insertions(+), 2 deletions(-)
hw/scsi/Kconfig +10 -1
@@ -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
hw/scsi/Makefile.objs +1 -1
@@ -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
hw/usb/Kconfig +2 -0
@@ -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
Signature · 1 line
1.8.3.1
Re: [Qemu-devel] [PATCH 40/52] scsi: express dependencies with Kconfig
hw/scsi/Makefile.objs common-obj-$(CONFIG_MEGASAS_SCSI_PCI) += megasas.o
Quoted 68 lines · Paolo Bonzini
This automatically removes the SCSI subsystem from the binary altogether if no controllers are selected.
Signed-off-by Paolo Bonzini <[email protected]>Signed-off-by Yang Zhong <[email protected]>Message-Id: <[email protected]>
Signed-off-by Paolo Bonzini <[email protected]>--- hw/scsi/Kconfig | 11 ++++++++++- hw/scsi/Makefile.objs | 2 +- hw/usb/Kconfig | 2 ++ 3 files changed, 13 insertions(+), 2 deletions(-)hw/scsi/Kconfig +10
-1@@ -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 && LINUXhw/scsi/Makefile.objs +0
-0@@ -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
Quoted 27 lines
hw/scsi/Makefile.objs +1
-1common-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.ohw/usb/Kconfig +2
-0@@ -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
Re: [Qemu-devel] [PATCH 40/52] scsi: express dependencies with Kconfig
Review
Quoted 7 lines · Philippe Mathieu-Daudé
You missed:
(quoted diff) +2
-2-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
PATCH v5 41/52 isa: express dependencies with kconfig
In reply to Paolo BonziniMessage-Id: <[email protected]>
--- 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(-)
default-configs/i386-softmmu.mak +0 -9
@@ -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
hw/audio/Kconfig +2 -0
@@ -35,6 +35,8 @@ config HDA config PCSPK bool + default y + depends on I8254 config WM8750 bool
hw/block/Kconfig +2 -0
@@ -1,5 +1,7 @@ config FDC bool + default y + depends on ISA_BUS config SSI_M25P80 bool
hw/char/Kconfig +6 -0
@@ -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
hw/display/Kconfig +3 -0
@@ -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
hw/dma/Kconfig +1 -0
@@ -9,6 +9,7 @@ config PL330 config I82374 bool + select I8257 config I8257 bool
hw/i386/Kconfig +1 -0
@@ -10,6 +10,7 @@ config I440FX config ISAPC bool + select ISA_BUS config Q35 bool
hw/ide/Kconfig +1 -0
@@ -12,6 +12,7 @@ config IDE_PCI config IDE_ISA bool + depends on ISA_BUS select IDE_QDEV config IDE_PIIX
hw/input/Kconfig +2 -0
@@ -6,6 +6,8 @@ config LM832X config PCKBD bool + default y + depends on ISA_BUS config PL050 bool
hw/isa/Kconfig +7 -0
@@ -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
hw/misc/Kconfig +4 -0
@@ -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
hw/net/Kconfig +3 -0
@@ -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
hw/sparc64/Kconfig +1 -0
@@ -1,5 +1,6 @@ config SUN4U bool + select ISA_BUS config NIAGARA bool
hw/watchdog/Kconfig +2 -0
@@ -8,6 +8,8 @@ config WDT_IB6300ESB config WDT_IB700 bool + default y + depends on ISA_BUS config WDT_DIAG288 bool
Signature · 1 line
1.8.3.1
Re: [Qemu-devel] [PATCH 41/52] isa: express dependencies with kconfig
Quoted 272 lines · Paolo Bonzini
Signed-off-by Paolo Bonzini <[email protected]>Signed-off-by Yang Zhong <[email protected]>Message-Id: <[email protected]>
Reviewed-by Thomas Huth <[email protected]>Signed-off-by Paolo Bonzini <[email protected]>--- 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(-)default-configs/i386-softmmu.mak +0
-9@@ -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=yhw/audio/Kconfig +2
-0@@ -35,6 +35,8 @@ config HDA config PCSPK bool + default y + depends on I8254 config WM8750 boolhw/block/Kconfig +2
-0@@ -1,5 +1,7 @@ config FDC bool + default y + depends on ISA_BUS config SSI_M25P80 boolhw/char/Kconfig +6
-0@@ -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 boolhw/display/Kconfig +3
-0@@ -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 boolhw/dma/Kconfig +1
-0@@ -9,6 +9,7 @@ config PL330 config I82374 bool + select I8257 config I8257 boolhw/i386/Kconfig +1
-0@@ -10,6 +10,7 @@ config I440FX config ISAPC bool + select ISA_BUS config Q35 boolhw/ide/Kconfig +1
-0@@ -12,6 +12,7 @@ config IDE_PCI config IDE_ISA bool + depends on ISA_BUS select IDE_QDEV config IDE_PIIXhw/input/Kconfig +2
-0@@ -6,6 +6,8 @@ config LM832X config PCKBD bool + default y + depends on ISA_BUS config PL050 boolhw/isa/Kconfig +7
-0@@ -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_ICHhw/misc/Kconfig +4
-0@@ -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 boolhw/net/Kconfig +3
-0@@ -48,6 +48,9 @@ config LAN9118 config NE2000_ISA bool + default y + depends on ISA_BUS + depends on PCI # for NE2000State config OPENCORES_ETH boolhw/sparc64/Kconfig +1
-0@@ -1,5 +1,6 @@ config SUN4U bool + select ISA_BUS config NIAGARA boolhw/watchdog/Kconfig +0
-0
hw/watchdog/Kconfig config WDT_IB6300ESB · line 12
Quoted 5 lines
hw/watchdog/Kconfig +2
-0@@ -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
Re: [Qemu-devel] [PATCH 41/52] isa: express dependencies with kconfig
Quoted 6 lines · Thomas Huth
Quoted 6 lines
hw/watchdog/Kconfig +0
-0@@ -8,6 +8,8 @@ config WDT_IB6300ESB
Quoted 9 lines
hw/watchdog/Kconfig config WDT_IB6300ESB · line 12
Quoted 4 lines
hw/watchdog/Kconfig +2
-0config WDT_IB700 bool + default y + depends on ISA_BUSBy the way, for pluggable ISA devices (like
NE2000_ISAorWDT_IB700), it would be great to have aISA_DEVICESconfig 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
Re: [Qemu-devel] [PATCH 41/52] isa: express dependencies with kconfig
Quoted 17 lines · Paolo Bonzini
Quoted 6 lines · Thomas Huth
Quoted 6 lines
hw/watchdog/Kconfig +0
-0@@ -8,6 +8,8 @@ config WDT_IB6300ESBQuoted 9 lines
hw/watchdog/Kconfig config WDT_IB6300ESB · line 12
Quoted 4 lines
hw/watchdog/Kconfig +2
-0config WDT_IB700 bool + default y + depends on ISA_BUSBy the way, for pluggable ISA devices (like
NE2000_ISAorWDT_IB700), it would be great to have aISA_DEVICESconfig 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.
Quoted 2 lines
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?
Quoted 3 lines
Is there a use case for disabling
CONFIG_ISA_DEVICESbut 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
Re: [Qemu-devel] [PATCH 41/52] isa: express dependencies with kconfig
Quoted 6 lines · Thomas Huth
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.
Quoted 14 lines
Quoted 3 lines
Is there a use case for disabling
CONFIG_ISA_DEVICESbut 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_DEVICEShere intead for my tests for the hard requirements, and then I ran into this error:
Quoted 8 lines
hw/net/ne2000-isa.c:65: undefined reference tone2000_setup_io' hw/net/ne2000-isa.c:71: undefined reference tone2000_reset' ../hw/net/ne2000-isa.o:(.data.rel+0x1d0): undefined reference tovmstate_ne2000' ../hw/net/ne2000-isa.o:(.data.rel+0x270): undefined reference tone2000_receive'That's why I thought a
CONFIG_ISA_DEVICESswitch would be good, too. But we likely should simply fix the dependency of theNE2000_ISAswitch instead.
Ok!
Paolo
Re: [Qemu-devel] [PATCH 41/52] isa: express dependencies with kconfig
In reply to Paolo BonziniQuoted 6 lines · Paolo Bonzini
Signed-off-by Paolo Bonzini <[email protected]>Signed-off-by Yang Zhong <[email protected]>Message-Id: <[email protected]>
Reviewed-by Thomas Huth <[email protected]>Signed-off-by Paolo Bonzini <[email protected]>---
[...]
hw/net/Kconfig config LAN9118 · line 53
Quoted 11 lines
hw/net/Kconfig +3
-0@@ -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
Re: [Qemu-devel] [PATCH 41/52] isa: express dependencies with kconfig
Quoted 22 lines · Thomas Huth
Quoted 6 lines · Paolo Bonzini
Signed-off-by Paolo Bonzini <[email protected]>Signed-off-by Yang Zhong <[email protected]>Message-Id: <[email protected]>
Reviewed-by Thomas Huth <[email protected]>Signed-off-by Paolo Bonzini <[email protected]>---
[...]
hw/net/Kconfig config LAN9118 · line 53
Quoted 11 lines
hw/net/Kconfig +3
-0@@ -48,6 +48,9 @@ config LAN9118 config NE2000_ISA bool + default y + depends on ISA_BUS + depends on PCI # for NE2000StateYang,
Quoted 7 lines
for the time being, could you please change the last line into
depends on
NE2000_PCIinstead? Otherwise, it's still possible to enable
NE2000_ISAwhileNE2000_PCIis 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
Quoted 6 lines
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
Re: [Qemu-devel] [PATCH 41/52] isa: express dependencies with kconfig
In reply to Paolo BonziniHi Paolo,
Quoted 196 lines · Paolo Bonzini
Signed-off-by Paolo Bonzini <[email protected]>Signed-off-by Yang Zhong <[email protected]>Message-Id: <[email protected]>
Reviewed-by Thomas Huth <[email protected]>Signed-off-by Paolo Bonzini <[email protected]>--- 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(-)default-configs/i386-softmmu.mak +0
-9@@ -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=yhw/audio/Kconfig +2
-0@@ -35,6 +35,8 @@ config HDA config PCSPK bool + default y + depends on I8254 config WM8750 boolhw/block/Kconfig +2
-0@@ -1,5 +1,7 @@ config FDC bool + default y + depends on ISA_BUS config SSI_M25P80 boolhw/char/Kconfig +6
-0@@ -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 boolhw/display/Kconfig +3
-0@@ -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 boolhw/dma/Kconfig +1
-0@@ -9,6 +9,7 @@ config PL330 config I82374 bool + select I8257 config I8257 boolhw/i386/Kconfig +1
-0@@ -10,6 +10,7 @@ config I440FX config ISAPC bool + select ISA_BUS config Q35 boolhw/ide/Kconfig +1
-0@@ -12,6 +12,7 @@ config IDE_PCI config IDE_ISA bool + depends on ISA_BUS select IDE_QDEV config IDE_PIIXhw/input/Kconfig +2
-0@@ -6,6 +6,8 @@ config LM832X config PCKBD bool + default y + depends on ISA_BUS config PL050 boolhw/isa/Kconfig +2
-0@@ -6,18 +6,25 @@ config APM config I82378 bool + select ISA_BUS config PC87312 bool + select ISA_BUS config PIIX4
hw/isa/Kconfig config APM · line 25
Quoted 10 lines
hw/isa/Kconfig +3
-0bool + 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_ISAconfig 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.
Quoted 75 lines
hw/isa/Kconfig +2
-0config LPC_ICH9 bool + select ISA_BUS + select ACPI_X86_ICHhw/misc/Kconfig +4
-0@@ -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 boolhw/net/Kconfig +3
-0@@ -48,6 +48,9 @@ config LAN9118 config NE2000_ISA bool + default y + depends on ISA_BUS + depends on PCI # for NE2000State config OPENCORES_ETH boolhw/sparc64/Kconfig +1
-0@@ -1,5 +1,6 @@ config SUN4U bool + select ISA_BUS config NIAGARA boolhw/watchdog/Kconfig +2
-0@@ -8,6 +8,8 @@ config WDT_IB6300ESB config WDT_IB700 bool + default y + depends on ISA_BUS config WDT_DIAG288 bool
Re: [Qemu-devel] [PATCH 41/52] isa: express dependencies with kconfig
Quoted 6 lines · Philippe Mathieu-Daudé
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 revieweae2e2e96bffrom Thomas where is introducedCONFIG_SMC37C669).
So introducingISA_SUPERIOsimplifies 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
Re: [Qemu-devel] [PATCH 41/52] isa: express dependencies with kconfig
Quoted 8 lines · Paolo Bonzini
Quoted 6 lines · Philippe Mathieu-Daudé
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 revieweae2e2e96bffrom Thomas where is introducedCONFIG_SMC37C669).
So introducingISA_SUPERIOsimplifies this files and SouthBridge devices. I'm not sure how to provide this patch:
Quoted 6 lines
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?
Re: [Qemu-devel] [PATCH 41/52] isa: express dependencies with kconfig
Quoted 9 lines · Philippe Mathieu-Daudé
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
PATCH v5 42/52 i386: express dependencies with Kconfig
In reply to Paolo BonziniThis way, the default-configs file only need to specify the boards and any optional devices.
Message-Id: <[email protected]>
--- 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(-)
default-configs/i386-softmmu.mak +8 -36
@@ -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
hw/acpi/Kconfig +3 -0
@@ -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
hw/i2c/Makefile.objs +1 -1
@@ -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
hw/i386/Kconfig +54 -0
77 lines not on this page · raw message
hw/isa/Kconfig +1 -0
@@ -27,4 +27,5 @@ config SMC37C669 config LPC_ICH9 bool select ISA_BUS + select ACPI_SMBUS select ACPI_X86_ICH
hw/pci-host/Kconfig +4 -0
@@ -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
hw/tpm/Kconfig +2 -0
@@ -8,6 +8,8 @@ config TPM_TIS config TPM_CRB bool + default y + depends on TPM && PC config TPM_PASSTHROUGH bool
Signature · 1 line
1.8.3.1
Re: [Qemu-devel] [PATCH 42/52] i386: express dependencies with Kconfig
Quoted 8 lines · Paolo Bonzini
This way, the default-configs file only need to specify the boards and any optional devices.
Signed-off-by Paolo Bonzini <[email protected]>Signed-off-by Yang Zhong <[email protected]>Message-Id: <[email protected]>
Signed-off-by Paolo Bonzini <[email protected]>---
[...]
Quoted 7 lines
hw/i386/Kconfig +0
-0@@ -5,20 +5,73 @@ config SEV config PC bool
hw/i386/Kconfig config SEV · line 16
Quoted 10 lines
hw/i386/Kconfig +9
-0+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
Re: [Qemu-devel] [PATCH 42/52] i386: express dependencies with Kconfig
In reply to Paolo BonziniHi Paolo,
Quoted 185 lines · Paolo Bonzini
This way, the default-configs file only need to specify the boards and any optional devices.
Signed-off-by Paolo Bonzini <[email protected]>Signed-off-by Yang Zhong <[email protected]>Message-Id: <[email protected]>
Signed-off-by Paolo Bonzini <[email protected]>--- 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(-)default-configs/i386-softmmu.mak +8
-36@@ -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=yhw/acpi/Kconfig +3
-0@@ -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 boolhw/i2c/Makefile.objs +1
-1@@ -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.ohw/i386/Kconfig +41
-0@@ -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
hw/i386/Kconfig config SEV · line 67
Quoted 10 lines
hw/i386/Kconfig +10
-0+ 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"?
Quoted 58 lines
hw/i386/Kconfig +3
-0config 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 VMPORThw/isa/Kconfig +1
-0@@ -27,4 +27,5 @@ config SMC37C669 config LPC_ICH9 bool select ISA_BUS + select ACPI_SMBUS select ACPI_X86_ICHhw/pci-host/Kconfig +4
-0@@ -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 boolhw/tpm/Kconfig +2
-0@@ -8,6 +8,8 @@ config TPM_TIS config TPM_CRB bool + default y + depends on TPM && PC config TPM_PASSTHROUGH bool
Re: [Qemu-devel] [PATCH 42/52] i386: express dependencies with Kconfig
Quoted 5 lines · Philippe Mathieu-Daudé
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
Quoted 23 lines
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"?
Re: [Qemu-devel] [PATCH 42/52] i386: express dependencies with Kconfig
In reply to Philippe Mathieu-DaudéQuoted 5 lines · Philippe Mathieu-Daudé
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
Re: [Qemu-devel] [PATCH 42/52] i386: express dependencies with Kconfig
Quoted 7 lines · Paolo Bonzini
Quoted 5 lines · Philippe Mathieu-Daudé
This lacks a DISPLAY dependency?
$ i386-softmmu/qemu-system-i386 -M q35 qemu-system-i386: Unknown device 'VGA' for bus 'PCIE' Aborted (core dumped)
Quoted 5 lines
If you got this with --without-default-devices, then it's intended behavior.
VGA_PCIis selected viaCONFIG_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?
Signature · 1 line
MST
Re: [Qemu-devel] [PATCH 42/52] i386: express dependencies with Kconfig
Quoted 8 lines · Michael S. Tsirkin
Quoted 7 lines · Paolo Bonzini
Quoted 5 lines · Philippe Mathieu-Daudé
This lacks a DISPLAY dependency?
$ i386-softmmu/qemu-system-i386 -M q35 qemu-system-i386: Unknown device 'VGA' for bus 'PCIE' Aborted (core dumped)
Quoted 6 lines
Quoted 3 lines
If you got this with --without-default-devices, then it's intended behavior.
VGA_PCIis selected viaCONFIG_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
PATCH v5 43/52 i2c: express dependencies with Kconfig
In reply to Paolo BonziniMessage-Id: <[email protected]>
--- 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(-)
default-configs/i386-softmmu.mak +0 -2
@@ -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:
hw/Makefile.objs +1 -1
@@ -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/
hw/audio/Kconfig +1 -0
@@ -40,6 +40,7 @@ config PCSPK config WM8750 bool + depends on I2C config PL041 bool
hw/display/Kconfig +3 -0
@@ -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
hw/gpio/Kconfig +1 -0
@@ -1,5 +1,6 @@ config MAX7310 bool + depends on I2C config PL061 bool
hw/i2c/Kconfig +6 -0
@@ -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
hw/i386/Kconfig +1 -0
@@ -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
hw/input/Kconfig +1 -0
@@ -3,6 +3,7 @@ config ADB config LM832X bool + depends on I2C config PCKBD bool
hw/isa/Kconfig +1 -0
@@ -19,6 +19,7 @@ config PIIX4 config VT82C686 bool select ISA_BUS + select ACPI_SMBUS config SMC37C669 bool
hw/misc/Kconfig +4 -0
@@ -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
hw/timer/Kconfig +3 -0
@@ -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
Signature · 1 line
1.8.3.1
Re: [Qemu-devel] [PATCH 43/52] i2c: express dependencies with Kconfig
Hi Paolo,
Quoted 97 lines · Paolo Bonzini
Signed-off-by Paolo Bonzini <[email protected]>Signed-off-by Yang Zhong <[email protected]>Acked-by Thomas Huth <[email protected]>Message-Id: <[email protected]>
Signed-off-by Paolo Bonzini <[email protected]>--- 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(-)default-configs/i386-softmmu.mak +0
-2@@ -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:hw/Makefile.objs +1
-1@@ -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/hw/audio/Kconfig +1
-0@@ -40,6 +40,7 @@ config PCSPK config WM8750 bool + depends on I2C config PL041 boolhw/display/Kconfig +3
-0@@ -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 boolhw/gpio/Kconfig +1
-0@@ -1,5 +1,6 @@ config MAX7310 bool + depends on I2C config PL061 boolhw/i2c/Kconfig +0
-0
hw/i2c/Kconfig config I2C · line 6
Quoted 4 lines
hw/i2c/Kconfig +1
-0@@ -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')
hw/i2c/Kconfig config I2C · line 18
Quoted 12 lines
hw/i2c/Kconfig +3
-0config DDC bool + depends on I2C config VERSATILE_I2C bool + select I2C config ACPI_SMBUS bool + select I2C
select SMBUS
Quoted 102 lines
hw/i2c/Kconfig +2
-0config BITBANG_I2C bool + select I2C config IMX_I2C bool + select I2Chw/i386/Kconfig +1
-0@@ -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 I440FXhw/input/Kconfig +1
-0@@ -3,6 +3,7 @@ config ADB config LM832X bool + depends on I2C config PCKBD boolhw/isa/Kconfig +1
-0@@ -19,6 +19,7 @@ config PIIX4 config VT82C686 bool select ISA_BUS + select ACPI_SMBUS config SMC37C669 boolhw/misc/Kconfig +4
-0@@ -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 I2Chw/timer/Kconfig +3
-0@@ -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
Re: [Qemu-devel] [PATCH 43/52] i2c: express dependencies with Kconfig
Quoted 9 lines · Philippe Mathieu-Daudé
config SMBUS
bool
select I2Cconfig
SMBUS_EEPROM
bool
select SMBUS(or 'depends on')
Sure.
Paolo
PATCH v5 44/52 ptimer: express dependencies with Kconfig
In reply to Paolo BonziniMessage-Id: <[email protected]>
--- 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(-)
default-configs/arm-softmmu.mak +0 -1
@@ -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
default-configs/cris-softmmu.mak +0 -1
@@ -2,6 +2,5 @@ CONFIG_ETRAXFS=y CONFIG_NAND=y -CONFIG_PTIMER=y CONFIG_PFLASH_CFI02=y CONFIG_AXIS=y
default-configs/lm32-softmmu.mak +0 -1
@@ -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
default-configs/m68k-softmmu.mak +0 -1
@@ -1,6 +1,5 @@ # Default configuration for m68k-softmmu CONFIG_COLDFIRE=y -CONFIG_PTIMER=y CONFIG_AN5206=y CONFIG_MCF5208=y
default-configs/microblaze-softmmu.mak +0 -1
@@ -1,6 +1,5 @@ # Default configuration for microblaze-softmmu -CONFIG_PTIMER=y CONFIG_PFLASH_CFI01=y CONFIG_SERIAL=y CONFIG_XILINX=y
default-configs/nios2-softmmu.mak +0 -1
@@ -2,6 +2,5 @@ CONFIG_NIOS2=y CONFIG_SERIAL=y -CONFIG_PTIMER=y CONFIG_ALTERA_TIMER=y CONFIG_NIOS2_10M50=y
default-configs/ppc-softmmu.mak +0 -1
@@ -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
default-configs/sh4-softmmu.mak +0 -1
@@ -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
default-configs/sh4eb-softmmu.mak +0 -1
@@ -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
default-configs/sparc-softmmu.mak +0 -1
@@ -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
default-configs/sparc64-softmmu.mak +0 -1
@@ -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
default-configs/unicore32-softmmu.mak +0 -1
@@ -1,5 +1,4 @@ # Default configuration for unicore32-softmmu CONFIG_ISA_BUS=y CONFIG_PUV3=y -CONFIG_PTIMER=y CONFIG_PCKBD=y
hw/Kconfig +2 -0
@@ -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
hw/arm/Kconfig +4 -0
@@ -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
hw/cris/Kconfig +1 -0
@@ -3,3 +3,4 @@ config AXIS config ETRAXFS bool + select PTIMER
hw/lm32/Kconfig +2 -0
@@ -1,5 +1,7 @@ config LM32 bool + select PTIMER config MILKYMIST bool + select PTIMER
hw/m68k/Kconfig +2 -0
@@ -3,6 +3,8 @@ config AN5206 config MCF5206 bool + select PTIMER config MCF5208 bool + select PTIMER
hw/mips/Kconfig +1 -0
@@ -15,6 +15,7 @@ config FULONG config MIPS_CPS bool + select PTIMER config MIPS_BOSTON bool
hw/misc/Kconfig +1 -0
@@ -66,6 +66,7 @@ config ECCMEMCTL config IMX bool + select PTIMER config STM32F2XX_SYSCFG bool
hw/net/Kconfig +2 -0
@@ -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
hw/sh4/Kconfig +1 -0
@@ -9,3 +9,4 @@ config SH7750 config SH4 bool + select PTIMER
hw/sparc/Kconfig +2 -0
@@ -6,6 +6,8 @@ config LEON3 config GRLIB bool + select PTIMER config SLAVIO bool + select PTIMER
hw/timer/Kconfig +6 -0
@@ -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
hw/unicore32/Kconfig +1 -0
@@ -1,2 +1,3 @@ config PUV3 bool + select PTIMER
hw/watchdog/Kconfig +1 -0
@@ -1,5 +1,6 @@ config CMSDK_APB_WATCHDOG bool + select PTIMER config WDT_IB6300ESB bool
Signature · 1 line
1.8.3.1
PATCH v5 45/52 display: express dependencies with kconfig
In reply to Paolo BonziniFrom: Yang Zhong <[email protected]>
Message-Id: <[email protected]>
--- hw/display/Kconfig | 4 +++- hw/i2c/Kconfig | 1 + 2 files changed, 4 insertions(+), 1 deletion(-)
hw/display/Kconfig +3 -1
@@ -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
hw/i2c/Kconfig +1 -0
@@ -8,6 +8,7 @@ config SMBUS_EEPROM config DDC bool depends on I2C + select EDID config VERSATILE_I2C bool
Signature · 1 line
1.8.3.1
PATCH v5 46/52 hyperv: express dependencies with kconfig
In reply to Paolo BonziniFrom: Yang Zhong <[email protected]>
remove default-configs/hyperv.mak and make dependencies with Kconfig.
Message-Id: <[email protected]>
--- 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
default-configs/hyperv.mak deleted +0 -2
@@ -1,2 +0,0 @@ -CONFIG_HYPERV=$(CONFIG_KVM) -CONFIG_HYPERV_TESTDEV=y
default-configs/i386-softmmu.mak +0 -1
@@ -1,6 +1,5 @@ # Default configuration for i386-softmmu -include hyperv.mak CONFIG_VMXNET3_PCI=y CONFIG_VIRTIO_VGA=y CONFIG_IPMI=y
hw/hyperv/Kconfig +4 -0
@@ -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
Signature · 1 line
1.8.3.1
PATCH v5 47/52 vfio: express vfio dependencies with Kconfig
In reply to Paolo Bonzini--- hw/vfio/Kconfig | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-)
hw/vfio/Kconfig +10 -8
@@ -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
Signature · 1 line
1.8.3.1
Re: [Qemu-devel] [PATCH 47/52] vfio: express vfio dependencies with Kconfig
Quoted 10 lines · On Fri, 25 Jan 2019 11:07:06 +0100 Paolo Bonzini <[email protected]> wrote:
Signed-off-by Paolo Bonzini <[email protected]>--- hw/vfio/Kconfig | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-)hw/vfio/Kconfig +0
-0
hw/vfio/Kconfig config VFIO_PCI · line 13
Quoted 7 lines
hw/vfio/Kconfig +0
-4@@ -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
Quoted 31 lines
hw/vfio/Kconfig +10
-4- 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
Re: [Qemu-devel] [PATCH 47/52] vfio: express vfio dependencies with Kconfig
Quoted 9 lines · Alex Williamson
hw/vfio/Kconfig config VFIO_PCI · line 13
Quoted 5 lines
hw/vfio/Kconfig +0
-4-config VFIO_SPAPR - bool - default y - depends on VFIO && LINUX && PSERIESI 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_SPAPRcame 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.
Quoted 4 lines
.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
PATCH v5 48/52 virtio: express virtio dependencies with Kconfig
In reply to Paolo BonziniFrom: Yang Zhong <[email protected]>
Message-Id: <[email protected]>
--- 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
default-configs/i386-softmmu.mak +0 -1
@@ -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
default-configs/s390x-softmmu.mak +0 -1
@@ -1,6 +1,5 @@ CONFIG_PCI=y CONFIG_VIRTIO_PCI=y -include virtio.mak CONFIG_SCLPCONSOLE=y CONFIG_TERMINAL3270=y CONFIG_S390_FLIC=y
default-configs/virtio.mak deleted +0 -12
@@ -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
hw/9pfs/Kconfig +1 -0
@@ -3,3 +3,4 @@ config VIRTFS config VIRTIO_9P bool default y if VIRTFS + depends on VIRTIO
hw/block/Kconfig +5 -1
@@ -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
hw/char/Kconfig +2 -0
@@ -26,6 +26,8 @@ config SERIAL_PCI config VIRTIO_SERIAL bool + default y + depends on VIRTIO config STM32F2XX_USART bool
hw/display/Kconfig +4 -2
@@ -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
hw/input/Kconfig +3 -1
@@ -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
hw/net/Kconfig +2 -0
@@ -94,6 +94,8 @@ config XILINX_ETHLITE config VIRTIO_NET bool + default y + depends on VIRTIO config ETSEC bool
hw/scsi/Kconfig +3 -1
@@ -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
hw/virtio/Kconfig +7 -0
@@ -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
Signature · 1 line
1.8.3.1
PATCH v5 49/52 tpm: express dependencies with Kconfig
In reply to Paolo BonziniThis automatically removes the SCSI subsystem from the binary altogether if no controllers are selected.
Message-Id: <[email protected]>
--- hw/tpm/Kconfig | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
hw/tpm/Kconfig +11 -2
@@ -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
Signature · 1 line
1.8.3.1
PATCH v5 50/52 isa: express SuperIO dependencies with Kconfig
In reply to Paolo Bonzini--- 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(-)
default-configs/alpha-softmmu.mak +0 -5
@@ -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
default-configs/ppc-softmmu.mak +0 -9
@@ -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
default-configs/sh4-softmmu.mak +2 -7
@@ -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
default-configs/sh4eb-softmmu.mak +0 -6
@@ -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
hw/isa/Kconfig +21 -0
@@ -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
Signature · 1 line
1.8.3.1
Re: [Qemu-devel] [PATCH 50/52] isa: express SuperIO dependencies with Kconfig
Quoted 158 lines · Paolo Bonzini
Signed-off-by Paolo Bonzini <[email protected]>--- 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(-)default-configs/alpha-softmmu.mak +0
-5@@ -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=ydefault-configs/ppc-softmmu.mak +0
-9@@ -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=ydefault-configs/sh4-softmmu.mak +2
-7@@ -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=ydefault-configs/sh4eb-softmmu.mak +0
-6@@ -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=yhw/isa/Kconfig +17
-0@@ -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
hw/isa/Kconfig config APM · line 53
Quoted 10 lines
hw/isa/Kconfig +4
-0+ 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.
PATCH v5 51/52 i386-softmmu.mak: remove all CONFIG_* except boards definitions
In reply to Paolo BonziniFrom: Yang Zhong <[email protected]>
%-softmmu.mak only keep boards definitions in Kconfig mode.
Message-Id: <[email protected]>
--- 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(-)
default-configs/i386-softmmu.mak +0 -18
@@ -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:
hw/acpi/Kconfig +6 -0
@@ -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
hw/i386/Kconfig +5 -0
@@ -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
hw/ipmi/Kconfig +8 -0
@@ -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
hw/mem/Kconfig +2 -0
@@ -6,3 +6,5 @@ config MEM_DEVICE config NVDIMM bool + default y + depends on PC
hw/misc/Kconfig +4 -0
@@ -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
hw/pci-bridge/Kconfig +1 -0
@@ -5,6 +5,7 @@ config PCIE_PORT config PXB bool + default y if Q35 config XIO3130 bool
hw/timer/Kconfig +1 -0
@@ -15,6 +15,7 @@ config DS1338 config HPET bool + default y if PC config I8254 bool
Signature · 1 line
1.8.3.1
PATCH v5 52/52 kconfig: introduce CONFIG_TEST_DEVICES
In reply to Paolo BonziniThis 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.
--- 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(-)
default-configs/alpha-softmmu.mak +1 -1
@@ -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
default-configs/i386-softmmu.mak +1 -0
@@ -3,6 +3,7 @@ # Optional devices: # CONFIG_PCI_DEVICES=y +CONFIG_TEST_DEVICES=y # Boards: #
default-configs/mips-softmmu-common.mak +1 -1
@@ -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
default-configs/ppc-softmmu.mak +1 -1
@@ -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
default-configs/sh4-softmmu.mak +1 -2
@@ -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
default-configs/sh4eb-softmmu.mak +1 -1
@@ -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
default-configs/sparc64-softmmu.mak +1 -1
@@ -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
hw/Kconfig +3 -0
@@ -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
hw/hyperv/Kconfig +1 -1
@@ -5,5 +5,5 @@ config HYPERV config HYPERV_TESTDEV bool - default y if PC + default y if TEST_DEVICES depends on HYPERV
hw/misc/Kconfig +4 -3
@@ -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
Signature · 1 line
1.8.3.1
Quoted 35 lines · Paolo Bonzini
(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=nto 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.
Quoted 6 lines
For the previous discussions on the
Kconfigdesign, see
http://lists.nongnu.org/archive/html/qemu-devel/2018-09/msg02827.htmlPatches 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
Quoted 293 lines
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
RemovedCONFIG_TYPHOON(patch 20)
RemovedCONFIG_DINO(patch 22)
ported minikconf to python 3
improved some minikconf error messages
added missing symbols in patch 32
addedCONFIG_VHOST_USERandCONFIG_LINUX, madeCONFIG_KVMper target (patch 33) removed $(...) assignments from default-configs/ (patch 33)
moved allnoconfig patch earlier, removed allyesconfig/randconfig addCONFIG_PCI_EXPRESSto non-x86 targets (patch 36)
addedCONFIG_PCI_DEVICESin 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 "selectISA_BUS" to I82378 and SUN4U (patch 41)
changed QXL/VTD/AMD_IOMMU from "select" to "default y if ..." (patch 42) moved "select PAM" and "selectISA_BUS" from board to device (patch 42) brought patch 44 up to date
fixedMILKYMIST_TMU2to only apply to MILKYMIST (patch 45)
new config symbolVIRTIO_INPUT_HOST
fixed select/depends for virtio (patch 48)
moved some ACPI dependencies from board to devices (patch 51)Paolo Bonzini (27):
arm: disableCONFIG_SERIAL_ISA
ide: split ioport registration to a separate file
vfio: move conditional up to hw/Makefile.objs
build: actually useCONFIG_PAM
hw/i386/Makefile.objs: Build pc_piix* andpc_q35boards 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 toKconfig
minikconf: implement allnoconfig and defconfig
ide: express dependencies withKconfig
build: convert pci.mak toKconfig
build: convert sound.mak toKconfig
build: convert usb.mak toKconfig
scsi: express dependencies withKconfig
isa: express dependencies with kconfig
i386: express dependencies withKconfig
i2c: express dependencies withKconfig
ptimer: express dependencies withKconfig
vfio: express vfio dependencies withKconfig
tpm: express dependencies withKconfig
isa: express SuperIO dependencies withKconfig
kconfig: introduceCONFIG_TEST_DEVICESYang Zhong (17):
hw/pci-host/Makefile.objs: make CONFIGS clear for PCI EXPRESS hw/arm/Makefile.objs:CONFIG_VIRTcreated 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 withKconfigi386-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: Buildxtensa_simandxtensa_fpga
conditionallyKconfig.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.pySignature · 1 line
1.8.3.1
Patchew URL: https://patchew.org/QEMU/[email protected]/
Patchew URL: https://patchew.org/QEMU/[email protected]/
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: [email protected]
=== 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_DEVICES8152c3cdcd i386-softmmu.mak: remove all CONFIG_* except boards definitions 9125dc81b3 isa: express SuperIO dependencies with Kconfigd5069fb84d tpm: express dependencies with Kconfig95cedf00b5 virtio: express virtio dependencies with Kconfigc08aa5bf58 vfio: express vfio dependencies with Kconfigfd1c33aa2b hyperv: express dependencies with kconfig113498fae7 display: express dependencies with kconfiga8e13fa63b ptimer: express dependencies with Kconfiga1bc5ac825 i2c: express dependencies with Kconfig77fbb8a4f9 i386: express dependencies with Kconfig15f86dff14 isa: express dependencies with kconfig07a5dd70ec scsi: express dependencies with Kconfige3be0ba561 build: convert usb.mak to Kconfig289f8ee6eb build: convert sound.mak to Kconfigcc9459f304 build: convert pci.mak to Kconfige9e0f95878 hw/pci/Makefile.objs: make pcie configurablecb484d2faa ide: express dependencies with Kconfig34ef087788 minikconf: implement allnoconfig and defconfig6d20af9496 build: switch to Kconfig633d26b675 kconfig: introduce kconfig files6894a6f9ac hw/display: make edid configurable545dfba6e3 minikconfig: add semantic analysis3f7644c209 minikconfig: add AST019214c143 minikconfig: add parser skeleton471f15950f 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 tricore0ffeea9e1d hw/openrisc/Makefile.objs: Create CONFIG_* for openrisc3bb75e756c hw/moxie/Makefile.objs: Conditionally build moxie9254086f91 hw/hppa/Makefile.objs: Create CONFIG_* for hppa48afb37c92 hw/cris/Makefile.objs: Create CONFIG_* for cris5e20c54774 hw/alpha/Makefile.objs: Create CONFIG_* for alpha166db688d0 hw/sparc64/Makefile.objs: Create CONFIG_* for sparc64901c168998 hw/riscv/Makefile.objs: Create CONFIG_* for riscv boardsdfad8241eb hw/nios2/Makefile.objs: Conditionally build nios218a4fba2fa 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 boards89445f8a5c hw/arm/Makefile.objs: CONFIG_VIRT created for virt board074cee383c hw/i386/Makefile.objs: Build pc_piix* and pc_q35 boards562fe684db build: actually use CONFIG_PAMaf189a2289 hw/pci-host/Makefile.objs: make CONFIGS clear for PCI EXPRESS 144835aff2 vfio: move conditional up to hw/Makefile.objs8318087cea ide: split ioport registration to a separate filef0334c7173 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/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to [email protected]
Patchew URL: https://patchew.org/QEMU/[email protected]/
Patchew URL: https://patchew.org/QEMU/[email protected]/
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: [email protected]
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/[email protected] -> patchew/[email protected]
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/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to [email protected]
Patchew URL: https://patchew.org/QEMU/[email protected]/
Patchew URL: https://patchew.org/QEMU/[email protected]/
Hi,
This series seems to have some coding style problems. See output below for more information:
Type: series
Message-id: [email protected]
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/[email protected] -> patchew/[email protected]
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/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to [email protected]
Patchew URL: https://patchew.org/QEMU/[email protected]/
Patchew URL: https://patchew.org/QEMU/[email protected]/
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: [email protected]
=== 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/[email protected] -> patchew/[email protected]
Switched to a new branch 'test'12539e4899 kconfig: introduce CONFIG_TEST_DEVICES2fadac69d9 i386-softmmu.mak: remove all CONFIG_* except boards definitions 8c1fb84ff4 isa: express SuperIO dependencies with Kconfig8e3174384e tpm: express dependencies with Kconfig7ffb3fa21b virtio: express virtio dependencies with Kconfig5a72a0c385 vfio: express vfio dependencies with Kconfiga597633380 hyperv: express dependencies with kconfig1ef5cc5fb7 display: express dependencies with kconfigfdd2c128b7 ptimer: express dependencies with Kconfigfdf78be1f4 i2c: express dependencies with Kconfig9b937662f4 i386: express dependencies with Kconfig583608364d isa: express dependencies with kconfig7a26eaae95 scsi: express dependencies with Kconfig74950a85f9 build: convert usb.mak to Kconfig069934d3cb build: convert sound.mak to Kconfig5d186272f9 build: convert pci.mak to Kconfigf08f56a670 hw/pci/Makefile.objs: make pcie configurablef4642a7c62 ide: express dependencies with Kconfig5a452a1fc1 minikconf: implement allnoconfig and defconfig8aa73695da build: switch to Kconfig26b1ac2c0b kconfig: introduce kconfig filesc4119d6e81 hw/display: make edid configurable9a6e43617c minikconfig: add semantic analysisafcf405ac2 minikconfig: add AST2f64711b7c minikconfig: add parser skeleton18ac9b6814 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 tricore150eb60214 hw/openrisc/Makefile.objs: Create CONFIG_* for openriscb1fe09618b hw/moxie/Makefile.objs: Conditionally build moxiebaf0d866cb hw/hppa/Makefile.objs: Create CONFIG_* for hppa13aa0274be hw/cris/Makefile.objs: Create CONFIG_* for cris1098821e31 hw/alpha/Makefile.objs: Create CONFIG_* for alphaaa55c758c4 hw/sparc64/Makefile.objs: Create CONFIG_* for sparc643d4876ad59 hw/riscv/Makefile.objs: Create CONFIG_* for riscv boardsc2ce7cf461 hw/nios2/Makefile.objs: Conditionally build nios260bf62c31c 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 boards9321f38d4c hw/arm/Makefile.objs: CONFIG_VIRT created for virt board67293f7ac0 hw/i386/Makefile.objs: Build pc_piix* and pc_q35 boardsa2f1b83828 build: actually use CONFIG_PAM48ca0b0bb0 hw/pci-host/Makefile.objs: make CONFIGS clear for PCI EXPRESS f9385aff8c vfio: move conditional up to hw/Makefile.objs3c1f0c425e ide: split ioport registration to a separate filede15bc290e 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/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to [email protected]
Patchew URL: https://patchew.org/QEMU/[email protected]/
Patchew URL: https://patchew.org/QEMU/[email protected]/
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: [email protected]
=== 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/[email protected] -> patchew/[email protected]
Switched to a new branch 'test'a79752a802 kconfig: introduce CONFIG_TEST_DEVICESc9d0fe6e67 i386-softmmu.mak: remove all CONFIG_* except boards definitions 6f1e6af4d9 isa: express SuperIO dependencies with Kconfigdc95811473 tpm: express dependencies with Kconfigaf23f11ab9 virtio: express virtio dependencies with Kconfigfc253a0747 vfio: express vfio dependencies with Kconfig04964cac83 hyperv: express dependencies with kconfig0e23a1e99a display: express dependencies with kconfig8d0e47d5b0 ptimer: express dependencies with Kconfig70ffc63c86 i2c: express dependencies with Kconfig1b10271dfb i386: express dependencies with Kconfig4d30a49e26 isa: express dependencies with kconfigf4d520f1f7 scsi: express dependencies with Kconfig36465626a3 build: convert usb.mak to Kconfig47589bdbf2 build: convert sound.mak to Kconfigb96574e955 build: convert pci.mak to Kconfig8cc438ca12 hw/pci/Makefile.objs: make pcie configurablefcc8bb50ce ide: express dependencies with Kconfig860ef3a709 minikconf: implement allnoconfig and defconfig934e48569c build: switch to Kconfigd253933815 kconfig: introduce kconfig files47c5e5d250 hw/display: make edid configurable3c7f935afa minikconfig: add semantic analysis36b08f2e7a minikconfig: add AST1ad0a25337 minikconfig: add parser skeleton1733dbf5ab 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 tricorea9bf8be75a hw/openrisc/Makefile.objs: Create CONFIG_* for openriscd2cdd2af82 hw/moxie/Makefile.objs: Conditionally build moxie892410c5e9 hw/hppa/Makefile.objs: Create CONFIG_* for hppaae6333d373 hw/cris/Makefile.objs: Create CONFIG_* for crisb9d2911c9d hw/alpha/Makefile.objs: Create CONFIG_* for alpha3c3acae8cd hw/sparc64/Makefile.objs: Create CONFIG_* for sparc640a96788079 hw/riscv/Makefile.objs: Create CONFIG_* for riscv boards530165e2ef hw/nios2/Makefile.objs: Conditionally build nios2fbaef04334 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 boards530a866837 hw/arm/Makefile.objs: CONFIG_VIRT created for virt boardfa54373219 hw/i386/Makefile.objs: Build pc_piix* and pc_q35 boards1b6abb71d5 build: actually use CONFIG_PAMf6b12fb162 hw/pci-host/Makefile.objs: make CONFIGS clear for PCI EXPRESS 14d967c0bd vfio: move conditional up to hw/Makefile.objsbfa4428a4f ide: split ioport registration to a separate file305912d25e 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/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to [email protected]
Patchew URL: https://patchew.org/QEMU/[email protected]/
Patchew URL: https://patchew.org/QEMU/[email protected]/
Hi,
This series seems to have some coding style problems. See output below for more information:
Type: series
Message-id: [email protected]
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/[email protected] -> patchew/[email protected]
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/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to [email protected]