From nobody Sun Nov 9 22:41:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1551968303057985.235360308349; Thu, 7 Mar 2019 06:18:23 -0800 (PST) Received: from localhost ([127.0.0.1]:52520 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1tqj-0003Rp-RO for importer@patchew.org; Thu, 07 Mar 2019 09:18:17 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42892) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1tpB-0002n2-LS for qemu-devel@nongnu.org; Thu, 07 Mar 2019 09:16:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h1tp5-0006M8-Vk for qemu-devel@nongnu.org; Thu, 07 Mar 2019 09:16:41 -0500 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:45006) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h1tp5-0006L4-LE for qemu-devel@nongnu.org; Thu, 07 Mar 2019 09:16:35 -0500 Received: by mail-wr1-x436.google.com with SMTP id w2so17603322wrt.11 for ; Thu, 07 Mar 2019 06:16:35 -0800 (PST) Received: from 640k.localdomain ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id v6sm2753342wml.42.2019.03.07.06.16.33 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Mar 2019 06:16:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references; bh=qHuVpmKxowub8my+uwthYvPUMElRf4Wpw0cYf+nZXaI=; b=WwNCQbsh/c2fPvzcyOd/qqscfBkOaUHR//sxH8qTImUMkiPRbD7iLuWzgDwXD5+IUZ pP72B1nrzKGdSuR0WhsULdT6BYtqfIOQwJLdMw/BV3dFykVJxkjR3ZxbSeY+k7+jb6ud ka9HLZCaezG35E5sGjfo7xZUxBmyoVAAReEaj99tS4WmZ1elNKZ84rpOLylg4nMMc+zM 6T/jpeAcxzl7BbpKc9rabqTqqmU8b3XCtwhuhESSwo8hf1IV4s9Y+VG1NUzHqoShsOwt A5h8SjwMGMu7t8WEo19tFaEt74WSc0InSzw3QxlAG1U5A5Q6SanO35PYQfEdxC/3JG2e nwDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references; bh=qHuVpmKxowub8my+uwthYvPUMElRf4Wpw0cYf+nZXaI=; b=q5lM0AZ+gECq1l0UlRBkn6OUT7BArI02joi2853IgmQHL+ia+Qgs4frXGLGeMv11QZ z8eSMUMCo3XtoSoQZKiYukGQJDgUcIS4zUvySCWe01kZnYtMa9MoLYd3eWCt+UKkerNL O3uaWkjCUoMx1FotQUo4aV+X4W9vjCAuioFgMT4VlBKEkQ9dEovFklxgh+POXqU+GV3V F9DwnEm/X+TFPdGA/n1jwZvT+q9gwSoNh7mWjapM+X0hZOwfiht8H7iNJ+huBbkAPVhl bsZTtmQwpZVUIX4XviFyy9U5zt1Um+7IVInn75QbbS1ItUUtTRZxUecUpEKv+AOngpV+ ZQow== X-Gm-Message-State: APjAAAVFcoPw+V73PlsvAJ+cokfg9L05TZyEkWONcpbplmG16Om1jYyS nuI+W/YDCVg5lDp25+1k01vMKY7z X-Google-Smtp-Source: APXvYqyFIRFs/KXQl7EgcZj8fGe9+p8s55le2Z1NNvxx/eFSLSJEtfYx23H8dKNHQ07ibCGalJWK9A== X-Received: by 2002:a5d:6983:: with SMTP id g3mr7272391wru.286.1551968194181; Thu, 07 Mar 2019 06:16:34 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 7 Mar 2019 15:16:31 +0100 Message-Id: <1551968191-10821-2-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1551968191-10821-1-git-send-email-pbonzini@redhat.com> References: <1551968191-10821-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::436 Subject: [Qemu-devel] [PULL v2 26/54] tpm: 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This automatically removes the TPM backends from the binary altogether if no front-ends are selected. Signed-off-by: Paolo Bonzini --- configure | 24 ++++++++++++------------ hw/tpm/Kconfig | 10 +++++++++- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/configure b/configure index 0fdbab4..0fb4dce 100755 --- a/configure +++ b/configure @@ -466,7 +466,7 @@ gcrypt_hmac=3D"no" auth_pam=3D"" vte=3D"" virglrenderer=3D"" -tpm=3D"yes" +tpm=3D"" libssh2=3D"" live_block_migration=3D"yes" numa=3D"" @@ -3877,20 +3877,20 @@ EOF fi =20 ########################################## -# TPM passthrough is only on x86 Linux +# TPM emulation is only on POSIX =20 -if test "$targetos" =3D Linux && { test "$cpu" =3D i386 || test "$cpu" =3D= x86_64; }; then - tpm_passthrough=3D$tpm -else - tpm_passthrough=3Dno +if test "$tpm" =3D ""; then + if test "$mingw32" =3D "yes"; then + tpm=3Dno + else + tpm=3Dyes + fi +elif test "$tpm" =3D "yes"; then + if test "$mingw32" =3D "yes" ; then + error_exit "TPM emulation only available on POSIX systems" + fi fi =20 -# TPM emulator is for all posix systems -if test "$mingw32" !=3D "yes"; then - tpm_emulator=3D$tpm -else - tpm_emulator=3Dno -fi ########################################## # attr probe =20 diff --git a/hw/tpm/Kconfig b/hw/tpm/Kconfig index f654f0f..4c8ee87 100644 --- a/hw/tpm/Kconfig +++ b/hw/tpm/Kconfig @@ -1,16 +1,24 @@ -config TPM +config TPMDEV bool + depends on TPM =20 config TPM_TIS bool depends on TPM && ISA_BUS + select TPMDEV =20 config TPM_CRB bool depends on TPM && PC + select TPMDEV =20 config TPM_PASSTHROUGH bool + default y + # FIXME: should check for x86 host as well + depends on TPMDEV && LINUX =20 config TPM_EMULATOR bool + default y + depends on TPMDEV --=20 1.8.3.1