From patchwork Fri Jan 18 11:23:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Zhong X-Patchwork-Id: 10769839 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0523B13B4 for ; Fri, 18 Jan 2019 11:52:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E31222E6F6 for ; Fri, 18 Jan 2019 11:52:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D79682E6F1; Fri, 18 Jan 2019 11:52:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 678582E6F1 for ; Fri, 18 Jan 2019 11:52:41 +0000 (UTC) Received: from localhost ([127.0.0.1]:37016 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gkShU-0005jP-Kq for patchwork-qemu-devel@patchwork.kernel.org; Fri, 18 Jan 2019 06:52:40 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36822) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gkSId-0001Vg-Lz for qemu-devel@nongnu.org; Fri, 18 Jan 2019 06:27:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gkSIc-0007Zl-KM for qemu-devel@nongnu.org; Fri, 18 Jan 2019 06:26:59 -0500 Received: from mga06.intel.com ([134.134.136.31]:47041) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gkSIb-0005r5-Oj for qemu-devel@nongnu.org; Fri, 18 Jan 2019 06:26:57 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jan 2019 03:25:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,491,1539673200"; d="scan'208";a="292570860" Received: from he.bj.intel.com ([10.238.157.85]) by orsmga005.jf.intel.com with ESMTP; 18 Jan 2019 03:25:38 -0800 From: Yang Zhong To: qemu-devel@nongnu.org Date: Fri, 18 Jan 2019 19:23:59 +0800 Message-Id: <20190118112410.3010-33-yang.zhong@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190118112410.3010-1-yang.zhong@intel.com> References: <20190118112410.3010-1-yang.zhong@intel.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 134.134.136.31 Subject: [Qemu-devel] [RFC PATCH v3 32/43] scsi: express dependencies with Kconfig X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: yang.zhong@intel.com, peter.maydell@linaro.org, thuth@redhat.com, sameo@linux.intel.com, pbonzini@redhat.com, ehabkost@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Paolo Bonzini This automatically removes the SCSI subsystem from the binary altogether if no controllers are selected. Signed-off-by: Paolo Bonzini Signed-off-by: Yang Zhong --- hw/scsi/Kconfig | 12 ++++++++++++ hw/scsi/Makefile.objs | 2 +- hw/usb/Kconfig | 2 ++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/hw/scsi/Kconfig b/hw/scsi/Kconfig index 812a12522b..7a9d373382 100644 --- a/hw/scsi/Kconfig +++ b/hw/scsi/Kconfig @@ -5,24 +5,29 @@ config LSI_SCSI_PCI bool default y depends on PCI + select SCSI config MPTSAS_SCSI_PCI bool default y depends on PCI + select SCSI config MEGASAS_SCSI_PCI bool default y depends on PCI + select SCSI config VMW_PVSCSI_SCSI_PCI bool default y depends on PCI + select SCSI config ESP bool + select SCSI config ESP_PCI bool @@ -30,8 +35,15 @@ config ESP_PCI depends on PCI select ESP +config SPAPR_VSCSI + bool + depends on PSERIES + select SCSI + config VIRTIO_SCSI bool + default y + select SCSI config VHOST_USER_SCSI bool diff --git a/hw/scsi/Makefile.objs b/hw/scsi/Makefile.objs index 45167baeaf..54b36ed8b1 100644 --- a/hw/scsi/Makefile.objs +++ b/hw/scsi/Makefile.objs @@ -6,7 +6,7 @@ common-obj-$(CONFIG_MEGASAS_SCSI_PCI) += megasas.o common-obj-$(CONFIG_VMW_PVSCSI_SCSI_PCI) += vmw_pvscsi.o common-obj-$(CONFIG_ESP) += esp.o common-obj-$(CONFIG_ESP_PCI) += esp-pci.o -obj-$(CONFIG_PSERIES) += spapr_vscsi.o +obj-$(CONFIG_SPAPR_VSCSI) += spapr_vscsi.o ifeq ($(CONFIG_VIRTIO_SCSI),y) obj-y += virtio-scsi.o virtio-scsi-dataplane.o diff --git a/hw/usb/Kconfig b/hw/usb/Kconfig index 0b8f41040e..db46c56cc8 100644 --- a/hw/usb/Kconfig +++ b/hw/usb/Kconfig @@ -52,11 +52,13 @@ config USB_STORAGE_BOT bool default y depends on USB + select SCSI config USB_STORAGE_UAS bool default y depends on USB + select SCSI config USB_AUDIO bool