qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH V1 0/3] tpm: Eliminate TPM related code if CONFIG_TPM is


From: Markus Armbruster
Subject: Re: [RFC PATCH V1 0/3] tpm: Eliminate TPM related code if CONFIG_TPM is not set
Date: Mon, 14 Jun 2021 10:34:13 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Stefan Berger <stefanb@linux.ibm.com> writes:

> The following patches entirely elimiante TPM related code if CONFIG_TPM
> is not set.
>
>   Stefan

I believe this is on top of Philippe's "[PATCH v2 2/2] tpm: Return QMP
error when TPM is disabled in build"

Based-on: <20210609184955.1193081-3-philmd@redhat.com>

However, it should probably go *first*, so the additional 'if' to
suppress warnings about unused qmp_marshal_output_TpmFOO() can be
squashed into Philippe's patch.

Apart from that, this looks good to me!

Additional 'if':

diff --git a/qapi/tpm.json b/qapi/tpm.json
index 09332e6f99..e74c881ea6 100644
--- a/qapi/tpm.json
+++ b/qapi/tpm.json
@@ -17,7 +17,9 @@
 #
 # Since: 1.5
 ##
-{ 'enum': 'TpmModel', 'data': [ 'tpm-tis', 'tpm-crb', 'tpm-spapr' ] }
+{ 'enum': 'TpmModel', 'data': [ 'tpm-tis', 'tpm-crb', 'tpm-spapr' ],
+  'if': 'defined(CONFIG_TPM)' }
+
 ##
 # @query-tpm-models:
 #
@@ -47,7 +49,8 @@
 #
 # Since: 1.5
 ##
-{ 'enum': 'TpmType', 'data': [ 'passthrough', 'emulator' ] }
+{ 'enum': 'TpmType', 'data': [ 'passthrough', 'emulator' ],
+  'if': 'defined(CONFIG_TPM)' }
 
 ##
 # @query-tpm-types:
@@ -124,7 +127,8 @@
 { 'struct': 'TPMInfo',
   'data': {'id': 'str',
            'model': 'TpmModel',
-           'options': 'TpmTypeOptions' } }
+           'options': 'TpmTypeOptions' },
+  'if': 'defined(CONFIG_TPM)' }
 
 ##
 # @query-tpm:




reply via email to

[Prev in Thread] Current Thread [Next in Thread]