From nobody Fri Nov 7 04:11:24 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1545893370361477.4918470969644; Wed, 26 Dec 2018 22:49:30 -0800 (PST) Received: from localhost ([127.0.0.1]:49814 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gcPU0-0003PO-FP for importer@patchew.org; Thu, 27 Dec 2018 01:49:28 -0500 Received: from eggs.gnu.org ([208.118.235.92]:54819) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gcPGd-0003FC-4z for qemu-devel@nongnu.org; Thu, 27 Dec 2018 01:35:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gcPGN-0004LZ-QO for qemu-devel@nongnu.org; Thu, 27 Dec 2018 01:35:30 -0500 Received: from mga11.intel.com ([192.55.52.93]:57858) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gcPGN-0004B3-Fi for qemu-devel@nongnu.org; Thu, 27 Dec 2018 01:35:23 -0500 Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Dec 2018 22:35:15 -0800 Received: from he.bj.intel.com ([10.238.157.85]) by orsmga006.jf.intel.com with ESMTP; 26 Dec 2018 22:35:14 -0800 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,404,1539673200"; d="scan'208";a="103617308" From: Yang Zhong To: qemu-devel@nongnu.org Date: Thu, 27 Dec 2018 14:34:04 +0800 Message-Id: <20181227063419.12981-11-yang.zhong@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181227063419.12981-1-yang.zhong@intel.com> References: <20181227063419.12981-1-yang.zhong@intel.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 192.55.52.93 Subject: [Qemu-devel] [RFC PATCH 10/25] build: convert pci.mak to Kconfig X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: yang.zhong@intel.com, peter.maydell@linaro.org, thuth@redhat.com, sameo@linux.intel.com, pbonzini@redhat.com, ehabkost@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Paolo Bonzini Instead of including the same list of devices for each target, set CONFIG_PCI to true, and make the devices default to present whenever PCI is available. Done mostly with the following script: while read i; do i=3D${i%=3Dy}; i=3D${i#CONFIG_} sed -i -e'/^config '$i'$/!b' -en \ -e'a\' -e' default y\' -e' depends on PCI' \ `grep -lw $i hw/*/Kconfig` done < default-configs/pci.mak followed by replacing a few "depends on" clauses with "select" whenever the symbol is not really related to PCI. Signed-off-by: Paolo Bonzini Signed-off-by: Yang Zhong --- default-configs/i386-softmmu.mak | 2 +- default-configs/pci.mak | 47 -------------------------------- hw/audio/Kconfig | 6 ++++ hw/block/Kconfig | 2 ++ hw/char/Kconfig | 2 ++ hw/display/Kconfig | 12 +++++++- hw/ide/Kconfig | 6 ++++ hw/ipack/Kconfig | 2 ++ hw/misc/Kconfig | 4 +++ hw/net/Kconfig | 19 +++++++++++++ hw/scsi/Kconfig | 11 ++++++++ hw/sd/Kconfig | 3 ++ hw/usb/Kconfig | 10 +++++++ hw/virtio/Kconfig | 3 ++ hw/watchdog/Kconfig | 2 ++ 15 files changed, 82 insertions(+), 49 deletions(-) delete mode 100644 default-configs/pci.mak diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmm= u.mak index 560250c998..61f19e5231 100644 --- a/default-configs/i386-softmmu.mak +++ b/default-configs/i386-softmmu.mak @@ -1,6 +1,6 @@ # Default configuration for i386-softmmu =20 -include pci.mak +CONFIG_PCI=3Dy include sound.mak include usb.mak include hyperv.mak diff --git a/default-configs/pci.mak b/default-configs/pci.mak deleted file mode 100644 index c1b64922b9..0000000000 --- a/default-configs/pci.mak +++ /dev/null @@ -1,47 +0,0 @@ -CONFIG_PCI=3Dy -# For now, CONFIG_IDE_CORE requires ISA, so we enable it here -CONFIG_ISA_BUS=3Dy -CONFIG_VIRTIO_PCI=3Dy -include virtio.mak -CONFIG_USB_UHCI=3Dy -CONFIG_USB_OHCI=3Dy -CONFIG_USB_EHCI=3Dy -CONFIG_USB_XHCI=3Dy -CONFIG_USB_XHCI_NEC=3Dy -CONFIG_NE2000_PCI=3Dy -CONFIG_EEPRO100_PCI=3Dy -CONFIG_PCNET_PCI=3Dy -CONFIG_PCNET_COMMON=3Dy -CONFIG_AC97=3Dy -CONFIG_HDA=3Dy -CONFIG_ES1370=3Dy -CONFIG_SCSI=3Dy -CONFIG_LSI_SCSI_PCI=3Dy -CONFIG_VMW_PVSCSI_SCSI_PCI=3Dy -CONFIG_MEGASAS_SCSI_PCI=3Dy -CONFIG_MPTSAS_SCSI_PCI=3Dy -CONFIG_RTL8139_PCI=3Dy -CONFIG_E1000_PCI=3Dy -CONFIG_E1000E_PCI=3Dy -CONFIG_AHCI=3Dy -CONFIG_ESP=3Dy -CONFIG_ESP_PCI=3Dy -CONFIG_SERIAL=3Dy -CONFIG_SERIAL_ISA=3Dy -CONFIG_SERIAL_PCI=3Dy -CONFIG_CAN_BUS=3Dy -CONFIG_CAN_SJA1000=3Dy -CONFIG_CAN_PCI=3Dy -CONFIG_IPACK=3Dy -CONFIG_WDT_IB6300ESB=3Dy -CONFIG_PCI_TESTDEV=3Dy -CONFIG_NVME_PCI=3Dy -CONFIG_SD=3Dy -CONFIG_SDHCI=3Dy -CONFIG_EDU=3Dy -CONFIG_VGA=3Dy -CONFIG_VGA_PCI=3Dy -CONFIG_BOCHS_DISPLAY=3Dy -CONFIG_IVSHMEM_DEVICE=3D$(CONFIG_IVSHMEM) -CONFIG_ROCKER=3Dy -CONFIG_EDID=3Dy diff --git a/hw/audio/Kconfig b/hw/audio/Kconfig index 207baee6e1..af34bbcf0c 100644 --- a/hw/audio/Kconfig +++ b/hw/audio/Kconfig @@ -3,9 +3,13 @@ config SB16 =20 config ES1370 bool + default y + depends on PCI =20 config AC97 bool + default y + depends on PCI =20 config ADLIB bool @@ -18,6 +22,8 @@ config CS4231A =20 config HDA bool + default y + depends on PCI =20 config PCSPK bool diff --git a/hw/block/Kconfig b/hw/block/Kconfig index 9d418bce4d..3710434436 100644 --- a/hw/block/Kconfig +++ b/hw/block/Kconfig @@ -21,6 +21,8 @@ config ONENAND =20 config NVME_PCI bool + default y + depends on PCI =20 config VIRTIO_BLK bool diff --git a/hw/char/Kconfig b/hw/char/Kconfig index 26c13243cf..1ed6f0dbce 100644 --- a/hw/char/Kconfig +++ b/hw/char/Kconfig @@ -15,6 +15,8 @@ config SERIAL_ISA =20 config SERIAL_PCI bool + default y + depends on PCI =20 config VIRTIO_SERIAL bool diff --git a/hw/display/Kconfig b/hw/display/Kconfig index 132aeffdbe..5e73277cc2 100644 --- a/hw/display/Kconfig +++ b/hw/display/Kconfig @@ -30,6 +30,9 @@ config SSD0323 =20 config VGA_PCI bool + default y + depends on PCI + select VGA =20 config VGA_ISA bool @@ -39,9 +42,15 @@ config VGA_ISA_MM =20 config VMWARE_VGA bool + default y + depends on PCI + select VGA =20 config BOCHS_DISPLAY bool + default y + depends on PCI + select VGA =20 config BLIZZARD bool @@ -67,7 +76,8 @@ config VGA =20 config QXL bool - depends on SPICE + depends on SPICE && PCI + select VGA =20 config VIRTIO_GPU bool diff --git a/hw/ide/Kconfig b/hw/ide/Kconfig index 091f3a81c9..0f25b27163 100644 --- a/hw/ide/Kconfig +++ b/hw/ide/Kconfig @@ -7,6 +7,7 @@ config IDE_QDEV =20 config IDE_PCI bool + depends on PCI select IDE_CORE =20 config IDE_ISA @@ -15,10 +16,12 @@ config IDE_ISA =20 config IDE_PIIX bool + depends on PCI select IDE_QDEV =20 config IDE_CMD646 bool + select IDE_PCI select IDE_QDEV =20 config IDE_MACIO @@ -31,6 +34,7 @@ config IDE_MMIO =20 config IDE_VIA bool + select IDE_PCI select IDE_QDEV =20 config MICRODRIVE @@ -39,6 +43,8 @@ config MICRODRIVE =20 config AHCI bool + default y + depends on PCI select IDE_QDEV =20 config IDE_SII3112 diff --git a/hw/ipack/Kconfig b/hw/ipack/Kconfig index 481e0d2e64..98bd21cf0f 100644 --- a/hw/ipack/Kconfig +++ b/hw/ipack/Kconfig @@ -1,2 +1,4 @@ config IPACK bool + default y + depends on PCI diff --git a/hw/misc/Kconfig b/hw/misc/Kconfig index cc8dbed24e..1ca4b2464e 100644 --- a/hw/misc/Kconfig +++ b/hw/misc/Kconfig @@ -21,9 +21,13 @@ config ISA_TESTDEV =20 config PCI_TESTDEV bool + default y + depends on PCI =20 config EDU bool + default y + depends on PCI =20 config PCA9552 bool diff --git a/hw/net/Kconfig b/hw/net/Kconfig index 6b2ec971b5..c87375ee52 100644 --- a/hw/net/Kconfig +++ b/hw/net/Kconfig @@ -3,27 +3,42 @@ config DP8393X =20 config NE2000_PCI bool + default y + depends on PCI =20 config EEPRO100_PCI bool + default y + depends on PCI =20 config PCNET_PCI bool + default y + depends on PCI + select PCNET_COMMON =20 config PCNET_COMMON bool =20 config E1000_PCI bool + default y + depends on PCI =20 config E1000E_PCI bool + default y + depends on PCI =20 config RTL8139_PCI bool + default y + depends on PCI =20 config VMXNET3_PCI bool + default y + depends on PCI =20 config SMC91C111 bool @@ -81,12 +96,16 @@ config ETSEC =20 config ROCKER bool + default y + depends on PCI =20 config CAN_BUS bool =20 config CAN_PCI bool + default y + depends on PCI =20 config CAN_SJA1000 bool diff --git a/hw/scsi/Kconfig b/hw/scsi/Kconfig index c48bf4e8d0..6e7575397f 100644 --- a/hw/scsi/Kconfig +++ b/hw/scsi/Kconfig @@ -3,21 +3,32 @@ config SCSI =20 config LSI_SCSI_PCI bool + default y + depends on PCI =20 config MPTSAS_SCSI_PCI bool + default y + depends on PCI =20 config MEGASAS_SCSI_PCI bool + default y + depends on PCI =20 config VMW_PVSCSI_SCSI_PCI bool + default y + depends on PCI =20 config ESP bool =20 config ESP_PCI bool + default y + depends on PCI + select ESP =20 config PSERIES bool diff --git a/hw/sd/Kconfig b/hw/sd/Kconfig index 4f43bbb352..90ac74950a 100644 --- a/hw/sd/Kconfig +++ b/hw/sd/Kconfig @@ -9,3 +9,6 @@ config SD =20 config SDHCI bool + default y + depends on PCI + select SD diff --git a/hw/usb/Kconfig b/hw/usb/Kconfig index cbf5c5d761..f23c542d27 100644 --- a/hw/usb/Kconfig +++ b/hw/usb/Kconfig @@ -3,21 +3,31 @@ config USB =20 config USB_UHCI bool + default y + depends on PCI =20 config USB_OHCI bool + default y + depends on PCI =20 config USB_EHCI bool + default y + depends on PCI =20 config USB_EHCI_SYSBUS bool =20 config USB_XHCI bool + default y + depends on PCI =20 config USB_XHCI_NEC bool + default y + depends on PCI =20 config USB_MUSB bool diff --git a/hw/virtio/Kconfig b/hw/virtio/Kconfig index ebf18124fb..aabd6d4d96 100644 --- a/hw/virtio/Kconfig +++ b/hw/virtio/Kconfig @@ -6,6 +6,9 @@ config VIRTIO_RNG =20 config VIRTIO_PCI bool + default y + depends on PCI + select VIRTIO =20 config VIRTIO_MMIO bool diff --git a/hw/watchdog/Kconfig b/hw/watchdog/Kconfig index cd0244f4e1..4e24bf8240 100644 --- a/hw/watchdog/Kconfig +++ b/hw/watchdog/Kconfig @@ -3,6 +3,8 @@ config CMSDK_APB_WATCHDOG =20 config WDT_IB6300ESB bool + default y + depends on PCI =20 config WDT_IB700 bool --=20 2.17.1