[Qemu-devel] [PATCH 24/51] tpm: express dependencies with Kconfig

Paolo Bonzini posted 51 patches 6 years, 10 months ago
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, Alistair Francis <alistair@alistair23.me>, Peter Maydell <peter.maydell@linaro.org>, Sagar Karandikar <sagark@eecs.berkeley.edu>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Bastian Koppelmann <kbastian@mail.uni-paderborn.de>, Eduardo Habkost <ehabkost@redhat.com>, Cleber Rosa <crosa@redhat.com>, Michael Walle <michael@walle.cc>, Igor Mammedov <imammedo@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Cornelia Huck <cohuck@redhat.com>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Palmer Dabbelt <palmer@sifive.com>, Paolo Bonzini <pbonzini@redhat.com>, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, Christian Borntraeger <borntraeger@de.ibm.com>, Max Reitz <mreitz@redhat.com>, Stefan Berger <stefanb@linux.ibm.com>, Max Filippov <jcmvbkbc@gmail.com>, Jason Wang <jasowang@redhat.com>, Marek Vasut <marex@denx.de>, Stefan Hajnoczi <stefanha@redhat.com>, Corey Minyard <minyard@acm.org>, Gerd Hoffmann <kraxel@redhat.com>, John Snow <jsnow@redhat.com>, Halil Pasic <pasic@linux.ibm.com>, "Philippe Mathieu-Daudé" <philmd@redhat.com>, Kevin Wolf <kwolf@redhat.com>, Guan Xuetao <gxt@mprc.pku.edu.cn>, "Michael S. Tsirkin" <mst@redhat.com>, Chris Wulff <crwulff@gmail.com>, Richard Henderson <rth@twiddle.net>, Aleksandar Rikalo <arikalo@wavecomp.com>, Stafford Horne <shorne@gmail.com>, Greg Kurz <groug@kaod.org>, David Gibson <david@gibson.dropbear.id.au>, Alberto Garcia <berto@igalia.com>, Aurelien Jarno <aurelien@aurel32.net>, Fam Zheng <fam@euphon.net>, Artyom Tarasenko <atar4qemu@gmail.com>, Alex Williamson <alex.williamson@redhat.com>, David Hildenbrand <david@redhat.com>, Aleksandar Markovic <amarkovic@wavecomp.com>, Anthony Green <green@moxielogic.com>
[Qemu-devel] [PATCH 24/51] tpm: express dependencies with Kconfig
Posted by Paolo Bonzini 6 years, 10 months ago
This automatically removes the SCSI subsystem from the
binary altogether if no controllers are selected.

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

diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
index 2da10af..73d33e9 100644
--- a/hw/i386/Kconfig
+++ b/hw/i386/Kconfig
@@ -7,6 +7,7 @@ config PC
     imply HYPERV
     imply QXL
     imply SEV
+    imply TPM_CRB
     imply TPM_TIS
     select I8259
     select I8254
diff --git a/hw/tpm/Kconfig b/hw/tpm/Kconfig
index b0c2c05..6fc6a2c 100644
--- a/hw/tpm/Kconfig
+++ b/hw/tpm/Kconfig
@@ -1,17 +1,25 @@
 config TPM
     bool
 
+config TPMDEV
+    bool
+
 config TPM_TIS
     bool
     depends on TPM && ISA_BUS
+    select TPMDEV
 
 config TPM_CRB
     bool
-    default y
-    depends on TPM && PC
+    depends on TPM
+    select TPMDEV
 
 config TPM_PASSTHROUGH
     bool
+    default y
+    depends on TPMDEV
 
 config TPM_EMULATOR
     bool
+    default y
+    depends on TPMDEV
-- 
1.8.3.1